Skip to content

Commit 09d808b

Browse files
committed
http gateway: document Content-Location
1 parent 6783eaa commit 09d808b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/http-gateways/path-gateway.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,17 @@ Returned only when request was a [`Range`](#range-request-header) request.
499499

500500
See Section 14.4 of :cite[rfc9110].
501501

502+
### `Content-Location` (response header)
503+
504+
Returned when a non-default content format has been negotiated with the
505+
[`Accept` header](#accept-request-header). The value of this field SHOULD include
506+
the URL of the resource with the `format` query parameter included, so that
507+
generic HTTP caches can store deserialized, CAR, and block responses separately.
508+
509+
For example, a request to `/ipfs/{cid}` with `Accept: application/vnd.ipld.raw`
510+
SHOULD return a `Content-Location: /ipfs/{cid}?format=raw` header in order for
511+
this request to be able to be successfully cached.
512+
502513
### `Accept-Ranges` (response header)
503514

504515
Optional, returned to explicitly indicate if gateway supports partial HTTP

0 commit comments

Comments
 (0)