Skip to content
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

[remix] Fix sending multiple response headers with the same name with Node.js #9533

Merged
merged 15 commits into from
Feb 27, 2023

Conversation

TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Feb 24, 2023

i.e. Set-Cookie. Right now only one will be sent and others will be lost. This update matches the code being used in @remix-run/vercel.

i.e. `Set-Cookie`. Right now only one will be sent and others will be lost.
@TooTallNate TooTallNate changed the title [remix] Fix sending multiple response headers with the same name [remix] Fix sending multiple response headers with the same name with Node.js Feb 24, 2023
TooTallNate added a commit that referenced this pull request Feb 24, 2023
Updates the `responseHeaders` probe checks to properly test for multiple
headers with the same name.

Previously the probes were using `headers.get()` which concats multiple
headers into a single string, which results in the check not really
checking if there are in fact multiple headers with the same name.
Using `headers.raw()` allows us to properly test for that.

A couple of Python tests that were already checking for multiple
`set-cookie` headers needed to be updated to match the full value, since
the check now properly validates the full string match of each header
(before it was basically just doing a `string.includes()` check).

This is a precursor for #9533.
kodiakhq bot pushed a commit that referenced this pull request Feb 24, 2023
…9538)

Updates the `responseHeaders` probe checks to properly test for multiple headers with the same name.

Previously the probes were using `headers.get()` which concats multiple headers into a single string, which results in the test not really checking if there are in fact multiple headers with the same name. Using `headers.raw()` allows us to properly test for that.

A couple of Python tests that were already checking for multiple `set-cookie` headers needed to be updated to match the full value, since the check now properly validates the full string match of each header (before it was basically just doing a `string.includes()` check).

This is a precursor for #9533.
@TooTallNate TooTallNate added the pr: automerge Automatically merge the PR when checks pass label Feb 26, 2023
@kodiakhq kodiakhq bot merged commit 4e6659a into main Feb 27, 2023
@kodiakhq kodiakhq bot deleted the fix/remix-set-cookie branch February 27, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: remix pr: automerge Automatically merge the PR when checks pass semver: patch PR contains bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants