ipfs / specs

Technical specifications for the IPFS protocol stack
https://specs.ipfs.tech
1.15k stars 232 forks source link

bug: accept header vs format query param precedence #458

Closed SgtPooki closed 5 months ago

SgtPooki commented 5 months ago

https://github.com/ipfs/specs/blob/f2160562aa169704c34cd3ba86e30119caf1e5d0/src/http-gateways/path-gateway.md?plain=1#L227-L240

We should clarify which takes precedence. Adin pointed me to https://github.com/ipfs/boxo/blob/4c3a1f2f343637b615c26a27a55afa12dd5aaed5/gateway/handler.go#L620-L621 which says Accept header should take priority.

// First, inspect Accept header, as it may not only include content type, but also optional parameters. // such as CAR version or additional ones from IPIP-412.