-
-
Notifications
You must be signed in to change notification settings - Fork 685
Description
Bug Description
Noticed that in our product using Node 18 that we encountered a slew of issues when moving forward to 18.18.2 that included a CVE fix for undici. Debugging into the issue it appears that in the CVE fix a class name was changed resulting in incorrect behavior. See the screenshot below and I believe it should be a simple fix. The headers copying logic fell down the wrong path when it failed to recognize that the passed in Object was already a Headers object.
Reproducible By
I dont have a minimal repro handy but it should be just creating a new Request with both an existing request with headers to copy and an init param.
Expected Behavior
When creating a new request with both a Request object to copy and an init set of options, the headers from the request are preserved.
Logs & Screenshots
Environment
Node v18.18.2
