Skip to content

Commit

Permalink
ipip-445: HTTP 400 on raw root cid
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Oct 25, 2023
1 parent 131b29d commit f96a92a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/http-gateways/trustless-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,8 @@ It accepts two values:

When not specified a gateway implementation MUST assume `n`.

:::note Notes for implementers

A `skip-raw-blocks=y` request for a content path with `raw` root CID does not
make sense and SHOULD NOT be sent by clients.

A Gateway SHOULD return HTTP error 400 Bad Request

:::
A Gateway MUST return HTTP error 400 Bad Request when `skip-raw-blocks=y` is
sent for a content path with a root CID with the `raw` multicodec.

# HTTP Response

Expand Down
1 change: 1 addition & 0 deletions src/ipips/ipip-0445.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ This IPIP does not impact security model of trustless gateway.
TODO: update below section with CIDs or CARs from conformance tests

Scenarios we should check:
- [ ] request for `/ipfs/cid` where CID has `raw` codec MUST return HTTP 400 (Bad Request)
- [ ] reuse existing UnixFS DAG that has raw-leaves, request it with
`skip-raw-blocks=n`, confirm the response includes expected raw leaves' CIDs
- [ ] create a new CAR fixture that only have non-raw blocks. Request it with
Expand Down

0 comments on commit f96a92a

Please sign in to comment.