-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
url.path vs url.pathname #72
Comments
@julien-f nice catch. url.format({protocol: 'http:', host: 'localhost', port: 6767});
// => http://localhost without port So in error messages (that was generated from got with Object as first argument) we don't have port now. :( May be it worth trying to replace |
It's because |
Parse url at the top of got function and work with request object all the way down. This reduces complexity and unnecessary delete calls in redirects. Also this fixes #72.
Parse url at the top of got function and work with request object all the way down. This reduces complexity and unnecessary delete calls in redirects. Also this fixes #72.
Should we maybe open an issue on iojs? Seems like that should be consistent. |
It seems that
http(s).request(url)
usesurl.path
whileurlLib.format(url)
usesurl.pathname
.I do not have the time to look further but I think it can cause some issues (for instance when displaying the URL in an error message).
The text was updated successfully, but these errors were encountered: