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
When passing in a URL object (or string) to got, the path changes from what was originally passed in.
Actual behavior
Given the following url:
consturi=newURL('https://www.external.com/path/morepath?someparam&¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=');gotInstance.stream(uri,{}).on('error',(error)=>{next();}).on('request',(req)=>{// At this point, req.path now equals '/path/morepath?someparam=¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6='}).pipe(res);
The initial URL path is: /path/morepath?someparam&¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=
After passing through got, the path becomes: /path/morepath?someparam=¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=
...
Expected behavior
got should not be modifying the url I am passing in, as it causes the requested resource to respond with an error. The endpoint (which I have no control over) is expecting the original url path and query string.
...
Code to reproduce
see above
I've created the following (hack) workaround by doing the following:
Describe the bug
When passing in a URL object (or string) to got, the path changes from what was originally passed in.
Actual behavior
Given the following url:
The initial URL path is:
/path/morepath?someparam&¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=
After passing through got, the path becomes:
/path/morepath?someparam=¶m=value¶m2=value2¶m3=value3¶m4=value4¶m5=value5¶m6=
...
Expected behavior
got should not be modifying the url I am passing in, as it causes the requested resource to respond with an error. The endpoint (which I have no control over) is expecting the original url path and query string.
...
Code to reproduce
see above
I've created the following (hack) workaround by doing the following:
As far as I can tell, this is happening due to the following code in
source/core/index.ts
:got/source/core/index.ts
Line 732 in 429db40
Checklist
The text was updated successfully, but these errors were encountered: