Repository navigation
[Claimed #3422] fix(extension): keep empty response header values on HTTP/2 - #3437
Merged
Merged
Conversation
splitHeaderValues() discarded empty values, so a header sent with an empty value vanished from headersArray() whenever Chrome supplied no raw header text, which is the case for HTTP/2. headerValue() then returned null and headerValues() returned [] while headers() and allHeaders() still reported the header. Fixes #3421
…22' into external-contributor-pr-3422
Contributor
Author
|
This mirrored PR has been merged into |
🦋 Changeset detectedLatest commit: 6a08917 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
shrey150
approved these changes
Nov 10, 2026
shrey150
left a comment
Collaborator
There was a problem hiding this comment.
CI green. Matches Playwright's empty-header behavior over HTTP/1.1 and HTTP/2. Thanks @aryansahai22!
This was referenced Nov 10, 2026
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.
Mirrored from external contributor PR #3422 after approval by @shrey150.
Original author: @aryansahai22
Original PR: #3422
Approved source head SHA:
3bfc4a715f9798e2ee44ded4a9d01e2d354d88a5@aryansahai22, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here.
Original description
why
Fixes #3421.
Over HTTP/2, a response header sent with an empty value disappears from
response.headersArray().headerValue()then returnsnullandheaderValues()returns[], even thoughheaders()andallHeaders()report the header as""on the same response. Over HTTP/1.1 all of them agree.what changed
splitHeaderValues()inpackages/extension/understudy/response.tsno longer filters out empty values. That was the only place the value was lost:headersArray()falls back to the header map when Chrome sends no raw header text, which is the case for HTTP/2.packages/extension/tests/response-rpc.test.ts:response.headers_arraythrough the RPC router for a header map with an empty value, before and after extra info arrives and next to a duplicated header;No protocol or SDK code changes. Both SDKs already return
""for a present empty value once the runtime includes it inresponse.headers_array.test plan
vitest run packages/extension/tests packages/extension/understudy: 73 files, 1190 tests pass. Both new tests fail without the source change.tsc --noEmit -p packages/extension/tsconfig.json, plusoxfmt --checkandoxlinton the changed files: clean.node:http2fixture from the issue. Before:headerValue('x-empty')isnulland the header is missing fromheadersArray(). After:""and present, matching HTTP/1.1.packages/sdk-ts/tests/integration/pageGotoResponse.test.tsstill passes against the rebuilt extension.uvorgoinstalled. The change touches no generated code and no protocol schema.One note for whoever runs
just check:scripts/release/check-changesets.tscurrently fails onmainbecause ofagent-discoverability-metadata.md. The changeset added here validates on its own.Summary by cubic
Fixes HTTP/2 responses dropping headers sent with an empty value from
headersArray(), which madeheaderValue()returnnullandheaderValues()return[]even thoughheaders()reported the header as"". HTTP/1.1 responses already reported the header consistently across all methods.splitHeaderValues(), the only place the value was lost when Chrome sends no raw header text.Written for commit 3bfc4a7. Summary will update on new commits.