Skip to content

Commit

Permalink
Merge branch 'feat/improving-trustless-gateways' into ipip-car-order-…
Browse files Browse the repository at this point in the history
…signaling
  • Loading branch information
lidel authored Jul 12, 2023
2 parents 1d4a263 + ffb1550 commit ec39376
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/http-gateways/trustless-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ When the terminating entity at the end of the specified content path:
Gateway MUST return only the minimal set of blocks necessary to verify the
specified byte range of that entity.

- When dealing with a sharded UnixFS file (`dag-pb`, `0x70`) and a non-zero
`from` value, the UnixFS values `filesize` and `blocksizes` determine the
corresponding starting block for a given `from` offset.

- cannot be interpreted as a continuous array of bytes (such as a DAG-CBOR/JSON
map or UnixFS directory), the parameter MUST be ignored, and the request is
equivalent to `dag-scope=entity`.
Expand Down Expand Up @@ -171,6 +175,14 @@ returned:
- This allows client to produce a meaningful error (e.g, in case of UnixFS,
leverage `Data.blocksizes` information present in the root `dag-pb` block).

- In streaming scenarios, if a Gateway is capable of returning the root block
but lacks prior knowledge of the final component of the requested content
path being invalid or absent in the DAG, a Gateway SHOULD respond with HTTP 200.
- This behavior is a consequence of HTTP streaming limitations: blocks are
not buffered, by the time a related parent block is being parsed and
returned to the client, the HTTP status code has already been sent to the
client.

# HTTP Response

Below MUST be implemented **in addition** to "HTTP Response" of :cite[path-gateway].
Expand Down

0 comments on commit ec39376

Please sign in to comment.