Skip to content

feat(gateway): IPIP-0524 Gateway.AllowCodecConversion config option#11090

Merged
lidel merged 5 commits intomasterfrom
feat/ipip-0524-codec-conversion-config
Feb 6, 2026
Merged

feat(gateway): IPIP-0524 Gateway.AllowCodecConversion config option#11090
lidel merged 5 commits intomasterfrom
feat/ipip-0524-codec-conversion-config

Conversation

@lidel
Copy link
Member

@lidel lidel commented Dec 3, 2025

Wire up boxo's AllowCodecConversion config to control codec conversion behavior per IPIP-0524. When false (default), the gateway returns 406 Not Acceptable if the requested format doesn't match the block's codec.

Clients should fetch raw blocks (?format=raw) and convert client-side.

TODO

  • land boxo in main and switch this pr to that
  • release gateway conformance and switch this pr's workflow to release

Wire up boxo's AllowCodecConversion config to control codec conversion
behavior per IPIP-0524. When false (default), the gateway returns
406 Not Acceptable if the requested format doesn't match the block's
codec.

Clients should fetch raw blocks (`?format=raw`) and convert client-side.

Ref: ipfs/specs#524
Ref: ipfs/boxo#1077
Ref: ipfs/gateway-conformance#254
@lidel lidel force-pushed the feat/ipip-0524-codec-conversion-config branch from 2a78d61 to 60e5668 Compare December 3, 2025 04:23
lidel added 3 commits February 5, 2026 19:41
…c-conversion-config

# Conflicts:
#	.github/workflows/gateway-conformance.yml
#	docs/changelogs/v0.40.md
#	docs/examples/kubo-as-a-library/go.mod
#	docs/examples/kubo-as-a-library/go.sum
#	go.mod
#	go.sum
#	test/dependencies/go.mod
#	test/dependencies/go.sum
boxo now returns an actionable hint when codec conversion is rejected:
suggests fetching raw block with ?format=raw and converting client-side.
@lidel lidel marked this pull request as ready for review February 6, 2026 00:29
@lidel lidel requested a review from a team as a code owner February 6, 2026 00:29
@lidel
Copy link
Member Author

lidel commented Feb 6, 2026

Updated:

This is low risk due to niche feature being removed and keeping opt-in flag that restores removed functionality + we have tests for both behaviors.

Merging to include in Kubo 0.40 RC1 together with the other two IPIPs (#11086 and #11148).

@lidel lidel merged commit 3a6b1ee into master Feb 6, 2026
25 of 27 checks passed
@lidel lidel deleted the feat/ipip-0524-codec-conversion-config branch February 6, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant