test: IPIP-523 format query precedence over Accept header (#11086)
* 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 * chore: update boxo and gateway-conformance for IPIP-523 testing - boxo@9aeb0c835899fedb4f886040a4ccf3ba09fd97d4 - gateway-conformance@c82a2a9bc79303e0f07216a80cf454ef2a1e042c * chore(ci): switch to gateway-conformance@v0.9 * chore: update boxo with IPIP-523 changes * chore: update boxo to main after ipfs/boxo#1074 merge * docs: add gateway-conformance v0.9 to changelog
Marcin Rataj committed
Feb 4, 2026 at 05:48 UTC
df9574e090c9a2b25692614d72169bb4ad6d612c
8 files changed
+23
-13
.github/workflows/gateway-conformance.yml
+4
-4
@@ -41,7 +41,7 @@ jobs:
41
steps:
42
# 1. Download the gateway-conformance fixtures
43
- name: Download gateway-conformance fixtures
44
- uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.8
44
+ uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.9
45
with:
46
output: fixtures
47
@@ -93,7 +93,7 @@ jobs:
93
94
# 6. Run the gateway-conformance tests
95
- name: Run gateway-conformance tests
96
- uses: ipfs/gateway-conformance/.github/actions/test@v0.8
96
+ uses: ipfs/gateway-conformance/.github/actions/test@v0.9
97
with:
98
gateway-url: http://127.0.0.1:8080
99
subdomain-url: http://localhost:8080
@@ -127,7 +127,7 @@ jobs:
127
steps:
128
# 1. Download the gateway-conformance fixtures
129
- name: Download gateway-conformance fixtures
130
- uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.8
130
+ uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.9
131
with:
132
output: fixtures
133
@@ -199,7 +199,7 @@ jobs:
199
200
# 9. Run the gateway-conformance tests over libp2p
201
- name: Run gateway-conformance tests over libp2p
202
- uses: ipfs/gateway-conformance/.github/actions/test@v0.8
202
+ uses: ipfs/gateway-conformance/.github/actions/test@v0.9
203
with:
204
gateway-url: http://127.0.0.1:8092
205
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
docs/changelogs/v0.40.md
+10
@@ -13,6 +13,7 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team.
13
- [🧹 Automatic cleanup of interrupted imports](#-automatic-cleanup-of-interrupted-imports)
14
- [Routing V1 HTTP API now exposed by default](#routing-v1-http-api-now-exposed-by-default)
15
- [Track total size when adding pins](#track-total-size-when-adding-pins)
16
+ - [IPIP-523: `?format=` takes precedence over `Accept` header](#ipip-523-format-takes-precedence-over-accept-header)
17
- [Improved IPNS over PubSub validation](#improved-ipns-over-pubsub-validation)
18
- [New `ipfs diag datastore` commands](#new-ipfs-diag-datastore-commands)
19
- [🚇 Improved `ipfs p2p` tunnels with foreground mode](#-improved-ipfs-p2p-tunnels-with-foreground-mode)
@@ -55,6 +56,14 @@ Example output:
56
Fetched/Processed 336 nodes (83 MB)
57
```
58
59
+#### IPIP-523: `?format=` takes precedence over `Accept` header
60
+
61
+[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.
62
+
63
+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.
64
+
65
+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 `?format=` always wins.
66
+
67
#### Improved IPNS over PubSub validation
68
69
[IPNS over PubSub](https://specs.ipfs.tech/ipns/ipns-pubsub-router/) implementation in Kubo is now more reliable. Duplicate messages are rejected even in large networks where messages may cycle back after the in-memory cache expires.
@@ -195,6 +204,7 @@ The `ipfs ls` command now supports `--long` (`-l`) flag for displaying Unix-styl
204
- update `go-libp2p-pubsub` to [v0.15.0](https://github.com/libp2p/go-libp2p-pubsub/releases/tag/v0.15.0)
205
- update `boxo` to [v0.36.0](https://github.com/ipfs/boxo/releases/tag/v0.36.0)
206
- update `go-libp2p-kad-dht` to [v0.37.1](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.37.1) (includes [v0.37.0](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.37.0))
207
+- update `gateway-conformance` tests to [v0.9](https://github.com/ipfs/gateway-conformance/releases/tag/v0.9.0)
208
209
### 📝 Changelog
210
docs/examples/kubo-as-a-library/go.mod
+1
-1
@@ -7,7 +7,7 @@ go 1.25
7
replace github.com/ipfs/kubo => ./../../..
8
9
require (
10
- github.com/ipfs/boxo v0.36.0
10
+ github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981
11
github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
12
github.com/libp2p/go-libp2p v0.47.0
13
github.com/multiformats/go-multiaddr v0.16.1
docs/examples/kubo-as-a-library/go.sum
+2
-2
@@ -267,8 +267,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 h1:OqNqsGZPX8zh3eFMO8Lf8EHRRnSGBMqcd
267
github.com/ipfs-shipyard/nopfs/ipfs v0.25.0/go.mod h1:BxhUdtBgOXg1B+gAPEplkg/GpyTZY+kCMSfsJvvydqU=
268
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
269
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
270
-github.com/ipfs/boxo v0.36.0 h1:DarrMBM46xCs6GU6Vz+AL8VUyXykqHAqZYx8mR0Oics=
271
-github.com/ipfs/boxo v0.36.0/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
270
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981 h1:Q3XjjicNTpok8gD0WwbLYZpmbRoykNTiCLbpj3EjnPc=
271
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
272
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
273
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
274
github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk=
go.mod
+1
-1
@@ -21,7 +21,7 @@ require (
21
github.com/hashicorp/go-version v1.8.0
22
github.com/ipfs-shipyard/nopfs v0.0.14
23
github.com/ipfs-shipyard/nopfs/ipfs v0.25.0
24
- github.com/ipfs/boxo v0.36.0
24
+ github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981
25
github.com/ipfs/go-block-format v0.2.3
26
github.com/ipfs/go-cid v0.6.0
27
github.com/ipfs/go-cidutil v0.1.0
go.sum
+2
-2
@@ -337,8 +337,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 h1:OqNqsGZPX8zh3eFMO8Lf8EHRRnSGBMqcd
337
github.com/ipfs-shipyard/nopfs/ipfs v0.25.0/go.mod h1:BxhUdtBgOXg1B+gAPEplkg/GpyTZY+kCMSfsJvvydqU=
338
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
339
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
340
-github.com/ipfs/boxo v0.36.0 h1:DarrMBM46xCs6GU6Vz+AL8VUyXykqHAqZYx8mR0Oics=
341
-github.com/ipfs/boxo v0.36.0/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
340
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981 h1:Q3XjjicNTpok8gD0WwbLYZpmbRoykNTiCLbpj3EjnPc=
341
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
342
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
343
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
344
github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk=
test/dependencies/go.mod
+1
-1
@@ -135,7 +135,7 @@ require (
135
github.com/huin/goupnp v1.3.0 // indirect
136
github.com/inconshreveable/mousetrap v1.1.0 // indirect
137
github.com/ipfs/bbloom v0.0.4 // indirect
138
- github.com/ipfs/boxo v0.36.0 // indirect
138
+ github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981 // indirect
139
github.com/ipfs/go-bitfield v1.1.0 // indirect
140
github.com/ipfs/go-block-format v0.2.3 // indirect
141
github.com/ipfs/go-cid v0.6.0 // indirect
test/dependencies/go.sum
+2
-2
@@ -296,8 +296,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
296
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
297
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
298
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
299
-github.com/ipfs/boxo v0.36.0 h1:DarrMBM46xCs6GU6Vz+AL8VUyXykqHAqZYx8mR0Oics=
300
-github.com/ipfs/boxo v0.36.0/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
299
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981 h1:Q3XjjicNTpok8gD0WwbLYZpmbRoykNTiCLbpj3EjnPc=
300
+github.com/ipfs/boxo v0.36.1-0.20260204011824-2688767ff981/go.mod h1:92hnRXfP5ScKEIqlq9Ns7LR1dFXEVADKWVGH0fjk83k=
301
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
302
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
303
github.com/ipfs/go-block-format v0.2.3 h1:mpCuDaNXJ4wrBJLrtEaGFGXkferrw5eqVvzaHhtFKQk=