-
Notifications
You must be signed in to change notification settings - Fork 14
test!(ipip-523): prefer format query param over accept header #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
When both are present, allow the query param to override the accept header
|
Results against Kubo latest: Summary
|
|
Results against Kubo master: Important See the action summary for full results. This PR cannot be merged until there is a Kubo PR that uses tests from this branch and passes CI. Link related PRs (boxo, kubo) in the PR description. Summary
|
BREAKING CHANGE: these tests expect URL query parameters to take precedence over Accept header, which reverses the previous behavior. adds tests verifying URL query parameters take precedence over Accept header: - TestTrustlessCarFormatPrecedence: format=car/raw overrides Accept header - TestTrustlessCarParamPrecedence: car-order and car-dups override Accept params - moves "format=car respects Accept header CAR params" test to param precedence - updates hint in existing JSON format precedence test
When testing against Kubo master, display a note in job summary and PR comment explaining that failing tests require a companion Kubo PR that uses tests from this branch and passes CI.
…pt header this change simplifies precedence rules by making the ?format= URL query parameter always take priority over the Accept HTTP header when both are present. in practice, this is largely compatible with existing browser use cases since browsers send Accept headers with wildcards which were already treated as non-specific. prioritizing ?format= also ensures deterministic HTTP caching behavior, protecting against CDNs that comingle different response types under the same cache key. the only breaking change is for edge cases where a client sends both a specific Accept header and a different ?format= value. previously Accept would win, now ?format= wins. this scenario is rare and arguably represents client misconfiguration. when detected, gateway returns HTTP 400 to signal the ambiguity. specs: ipfs/specs#523 tests: ipfs/gateway-conformance#252
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
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I've added a few more tests and implemented the IPIP-523 in:
- ipfs/boxo#1074
- ipfs/kubo#11086 (this is where we use everything end-to-end and want CI to be green – and it is!)
and works as expected.
If no concerns I'm going to release this later this week after I finish reviewing other IPIPs.
When both are present, allow the query param to override the accept header.
BREAKING CHANGE: these tests expect URL query parameters to take precedence over Accept header, which reverses the previous behavior, needs to be released as minor release.