You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: IPIP-523 format query precedence over Accept header
update boxo to ipfs/boxo#1074 and gateway-conformance tests
to ipfs/gateway-conformance#252 for testing IPIP-523 changes
where ?format= URL query parameter takes precedence over
Accept HTTP header
Copy file name to clipboardExpand all lines: docs/changelogs/v0.40.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team.
11
11
-[Overview](#overview)
12
12
-[🔦 Highlights](#-highlights)
13
13
-[Routing V1 HTTP API now exposed by default](#routing-v1-http-api-now-exposed-by-default)
14
+
-[IPIP-523: `?format=` takes precedence over `Accept` header](#ipip-523-format-takes-precedence-over-accept-header)
14
15
-[📝 Changelog](#-changelog)
15
16
-[👨👩👧👦 Contributors](#-contributors)
16
17
@@ -22,6 +23,14 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team.
22
23
23
24
The [Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) is now exposed by default at `http://127.0.0.1:8080/routing/v1`. This allows light clients in browsers to use Kubo Gateway as a delegated routing backend instead of running a full DHT client. Support for [IPIP-476: Delegated Routing DHT Closest Peers API](https://github.com/ipfs/specs/pull/476) is included. Can be disabled via [`Gateway.ExposeRoutingAPI`](https://github.com/ipfs/kubo/blob/master/docs/config.md#gatewayexposeroutingapi).
24
25
26
+
#### IPIP-523: `?format=` takes precedence over `Accept` header
27
+
28
+
[IPIP-523](https://github.com/ipfs/specs/pull/523) simplifies HTTP content negotiation by making the `?format=` URL query parameter always take priority over the `Accept` HTTP header when both are present.
29
+
30
+
This ensures deterministic HTTP caching behavior and protects against CDNs that commingle different response types under the same cache key. It also allows browsers to use `?format=` reliably even when they send `Accept` headers with specific content types.
31
+
32
+
The only breaking change is for edge cases where a client sends both a specific `Accept` header and a different `?format=` value for an explicitly supported format (`tar`, `raw`, `car`, `dag-json`, `dag-cbor`, etc.). Previously `Accept` would win. Now, when both specify conflicting formats, the gateway returns HTTP 400 rather than silently picking one.
0 commit comments