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
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
If you url.parse a url, alter the pathname, and then pass it to http.request, path takes precedence. However, if you first url.format the url, pathname takes precedence:
Obviously, this is because http.request does not consider pathname. However, this is inconsistent then with the url.parse's partial compliance regarding hostname:
hostname: To support url.parse() hostname is preferred over host
and the options string:
options can be an object or a string. If options is a string, it is automatically parsed with url.parse().
Hey @tjfontaine, can I get a quick thumbs up or down on whether we're okay with (slightly) breaking backwards compat in order to unify behaviors a bit?
Related to #1390.
If you
url.parse
a url, alter the pathname, and then pass it tohttp.request
, path takes precedence. However, if you firsturl.format
the url, pathname takes precedence:Obviously, this is because http.request does not consider pathname. However, this is inconsistent then with the
url.parse
's partial compliance regardinghostname
:and the options string:
See documentation.
The text was updated successfully, but these errors were encountered: