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
Description: An attempt to call supertest.agent.query(<object>) fails with "TypeError: Invalid URL". This does not happen in Node v20.19.1, but does so in 20.19.2, apparently because of llhttp upgrade. The "query" is another HTTP method and methods.forEach() in agent.js overwrites the query() function in superagent. (However, it looks like the same mistake is made in superagent as well)
Verified that same happens in Node 22.15.1
Actual behavior
The call fails with TypeError.
node:internal/url:818
href = bindingUrl.parse(input, base, true);
^
TypeError: Invalid URL
at new URL (node:internal/url:818:25)
at TestAgent._attachCookies (.../node_modules/superagent/lib/node/agent.js:69:17)
at TestAgent.<computed> [as query] (.../node_modules/supertest/lib/agent.js:77:10
Expected behavior
This call is expected to store query parameters map in Agent's "defaults" to be re-used with following post()/get()/put() etc calls.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Node.js version: 20.19.2
OS version: Mac OS 15.4.1
Description: An attempt to call
supertest.agent.query(<object>)
fails with "TypeError: Invalid URL". This does not happen in Node v20.19.1, but does so in 20.19.2, apparently because of llhttp upgrade. The "query" is another HTTP method andmethods.forEach()
in agent.js overwrites thequery()
function in superagent. (However, it looks like the same mistake is made in superagent as well)Verified that same happens in Node 22.15.1
Actual behavior
The call fails with TypeError.
Expected behavior
This call is expected to store query parameters map in Agent's "defaults" to be re-used with following post()/get()/put() etc calls.
Code to reproduce
Checklist
The text was updated successfully, but these errors were encountered: