Skip to content

Commit f96a92a

Browse files
committed
ipip-445: HTTP 400 on raw root cid
Ref. #445 (comment)
1 parent 131b29d commit f96a92a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/http-gateways/trustless-gateway.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,8 @@ It accepts two values:
196196

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

199-
:::note Notes for implementers
200-
201-
A `skip-raw-blocks=y` request for a content path with `raw` root CID does not
202-
make sense and SHOULD NOT be sent by clients.
203-
204-
A Gateway SHOULD return HTTP error 400 Bad Request
205-
206-
:::
199+
A Gateway MUST return HTTP error 400 Bad Request when `skip-raw-blocks=y` is
200+
sent for a content path with a root CID with the `raw` multicodec.
207201

208202
# HTTP Response
209203

src/ipips/ipip-0445.md

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ This IPIP does not impact security model of trustless gateway.
152152
TODO: update below section with CIDs or CARs from conformance tests
153153

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

0 commit comments

Comments
 (0)