Repository navigation
fix: parse multiple Link header relations - #1863
Open
Aurantium-47 wants to merge 1 commit into
Open
Aurantium-47 wants to merge 1 commit into
Aurantium-47 wants to merge 1 commit into
Conversation
Split a rel value on ASCII spaces so res.links exposes every relation. Keep unsafe-key filtering per relation and add parser and HTTP regressions. Assisted-by: OpenAI GPT-6 <noreply@openai.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For
Link: <https://example.com/page2>; rel="next last",res.linkscurrently contains a single"next last"key, so callers followingres.links.nextmiss the next page. RFC 8288 section 3.3 allows multiple space-separated relations for one target.Split the relation value on ASCII spaces and apply the existing unsafe-key filter to each relation. The first-rel behavior is unchanged. Added parser regressions for repeated spaces and unsafe keys, plus a shared browser/Node HTTP response test.
Validation on Windows with Node 24: all three new regressions fail before the change; the complete HTTP/1 suite passes (410 passing, 9 pending), as does HTTP/2 (404 passing, 13 pending). Library/browser builds, source/generated-code lint, Markdown checks and commitlint pass. The complete shared
test/basic.jssuite passes in real Edge (48 tests); its new regression fails on the original parser. The broader browser suite has 207 passing and six existing failures, all six reproduced on the base. Independent checks cover 159 assertions against the original and patched parsers.Prepared and tested with OpenAI Codex.
Checklist