Skip to content

Commit 69cfd1b

Browse files
hsanjuanlidel
andcommitted
path/trustless gateway spec: take review comments.
Co-Authored-By: Marcin Rataj <lidel@lidel.org>
1 parent dc770e6 commit 69cfd1b

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

src/http-gateways/path-gateway.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ This error response SHOULD include
389389
[`Retry-After`](#retry-after-response-header) HTTP header to indicate how long
390390
the client should wait before retrying.
391391

392-
Gateways MUST return `404` instead of `502` when the content is known to be
393-
unretrivable: for example, when the Gateway is
392+
Gateways SHOULD return `404` instead of `502` when the content is known to be
393+
unretrievable: for example, when the Gateway is
394394
[non-recursive](#recursive-vs-non-recursive-gateways) and the content is known
395395
to not be available.
396396

@@ -408,12 +408,11 @@ This error response SHOULD include
408408
[`Retry-After`](#retry-after-response-header) HTTP header to indicate how long
409409
the client should wait before retrying.
410410

411-
Gateways MUST return `404` instead of `504` when the content is known to be
412-
unretrivable: for example, when the Gateway is
411+
Gateways SHOULD return `404` instead of `504` when the content is known to be
412+
unretrievable: for example, when the Gateway is
413413
[non-recursive](#recursive-vs-non-recursive-gateways) and the content is known
414414
to not be available.
415415

416-
417416
## Response Headers
418417

419418
### `Etag` (response header)
@@ -888,7 +887,7 @@ suggest that clients retry failed requests later via `502` and `504` respones
888887
status codes.
889888

890889
A *non-recursive Gateway* is gateway which accesses a known content-set and,
891-
under normal operation conditions, knows with certainity whether content
890+
under normal operation conditions, knows with certainty whether content
892891
requested can be obtained or not. Non-recursive gateways SHOULD prevent
893892
unnecessary retries from clients when the content is known to be unavailable
894893
by returning `404`.

src/http-gateways/trustless-gateway.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ Optional `path` is permitted for requests that specify CAR format (`?format=car`
4747

4848
For block requests (`?format=raw` or `Accept: application/vnd.ipld.raw`), only `GET /ipfs/{cid}[?{params}]` is supported.
4949

50-
It is RECOMMENDED to additionally implement the [`GET` probe path](#dedicated-probe-paths).
50+
Client and Server implementations SHOULD include support for the [`GET` probe path](#dedicated-probe-paths).
5151

5252
## `HEAD /ipfs/{cid}[/{path}][?{params}]`
5353

5454
Same as GET, but does not return any payload.
5555

56-
It is RECOMMENDED to additionally implement the [`HEAD` probe path](#dedicated-probe-paths).
56+
Client and Server implementations SHOULD include support for the [`HEAD` probe path](#dedicated-probe-paths).
5757

5858
## `GET /ipns/{key}[?{params}]`
5959

@@ -456,15 +456,13 @@ Trustless gateways SHOULD provide probing endpoints as described below.
456456
`bafkqaaa` is the identity empty CID. This endpoint can be used to probe that
457457
that the endpoint corresponds to a trustless gateway.
458458

459-
For block requests (`?format=raw`), when supported, it must return `200 OK`
459+
For block requests (`?format=raw`), when supported, it MUST return `200 OK`
460460
and an empty body.
461461

462-
For CAR requests (`?format=car`), when supported, it must return `200 OK` and
463-
CAR file with root set to `bafkqaaa` and a single `bafkqaaa` block (which is
464-
empty).
462+
For CAR requests (`?format=car`), when supported, it MUST return `200 OK` and a valid CAR file with CAR Header `roots` set to `bafkqaaa`. Identity block MAY be skipped in the CAR Data section.
465463

466-
We recommend supporting only this specific identity CID and not random
467-
identity CIDs.
464+
This specific identity CID is special for probing. Other random
465+
identity CIDs SHOULD not be handled.
468466

469467
### `HEAD /ipfs/bafkqaaa`
470468

@@ -473,5 +471,5 @@ MUST support [`HEAD` requests](#head-ipfs-cid-path-params).
473471

474472
It must return `200 OK` in all cases.
475473

476-
We recommend supporting only this specific identity CID and not random
477-
identity CIDs.
474+
This specific identity CID is special for probing. Other random
475+
identity CIDs SHOULD not be handled.

0 commit comments

Comments
 (0)