You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the server responds with a relativ URL in the Location header (e.g. in case of 201 Created), it causes an "Uncaught TypeError: Invalid URL" error, since there is no second parameter to the URL constructor in:
Environment
httpxy 0.1.5
node 20 (but doesn't really matter)
Reproduction
not needed, I think
Describe the bug
If the server responds with a relativ URL in the Location header (e.g. in case of 201 Created), it causes an "Uncaught TypeError: Invalid URL" error, since there is no second parameter to the URL constructor in:
httpxy/src/middleware/web-outgoing.ts
Line 38 in 1f62fff
For example:
Additional context
The Location response header is allowed to contain a relativ URL, according to: https://www.rfc-editor.org/rfc/rfc9110#field.location
The URL constructor needs a
base
argument in that case: https://nodejs.org/api/url.html#new-urlinput-baseLogs
No response
The text was updated successfully, but these errors were encountered: