-
Notifications
You must be signed in to change notification settings - Fork 532
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
Node's fetch implementation does not allow changing headers on request object #1433
Comments
I think this was fixed in #1401 |
I'm not fully certain if #1401 tests for the the exact same issue. One thing that's at least different is that I'm changing a header after constructing the |
Could you verify if this still applies to undici v5.2.0? |
I imported Undici in my project directly, overwrite |
Version
v18.1.0
Platform
Linux evertbook6 5.15.0-27-generic nodejs/node#28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Node will lose headers that were added to the request after constructing the Request object, but_only_ if a custom Headers object was also passed in. This reproduces the issue
This does not happen when a headers object was not passed in:
Oof this took a lot of experimentation to get to :S
I think this was introduced with Node 18.1.0, because I have a feeling my my tests passed with 18.0.0
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The following headers on the server:
What do you see instead?
@jasnell
The text was updated successfully, but these errors were encountered: