-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: use headers.entries() instead of headers.raw()
#7150
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
fix: use headers.entries() instead of headers.raw()
#7150
Conversation
🦋 Changeset detectedLatest commit: 0689d14 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
e66c63f to
1f1862d
Compare
packages/remix-express/server.ts
Outdated
| for (let [key, values] of nodeResponse.headers.entries()) { | ||
| for (let value of values) { | ||
| res.append(key, value); | ||
| } |
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.
This breaks for me since entries returns strings, not arrays in values like raw did so this then iterates over the characters in the values string.
I think the original bug actually boils down to a bug in the node-fetch entries implementation (which we inherited into the Remix fork) - I pushed a potential fix here: remix-run/web-std-io#39
If we were to merge that fix, then I think this would become:
| for (let [key, values] of nodeResponse.headers.entries()) { | |
| for (let value of values) { | |
| res.append(key, value); | |
| } | |
| for (let [key, value] of nodeResponse.headers.entries()) { | |
| res.append(key, value); |
4306373 to
2d2d2e2
Compare
brophdawg11
left a comment
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.
Requesting changes just to keep this on hold until we can get remix-run/web-std-io#39 merged.
1ce1e9b to
0689d14
Compare
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
Closes #4354