We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems there was a breaking change to the way that port numbers are parsed. Take this example:
var URL = require('url-parse'); var url = new URL('localhost:8000'); console.log(url);
The current version (1.1.9) produces the following output:
{ slashes: false, protocol: 'localhost:', hash: '', query: '', pathname: '8000', auth: '', host: '', port: '', hostname: '', password: '', username: '', origin: 'null', href: 'localhost:8000' }
When previous versions (1.0.5), produce this:
URL { hash: '', query: '', protocol: '', pathname: '', auth: '', host: 'localhost:8000', port: '8000', hostname: 'localhost', password: '', username: '', href: '//localhost:8000' }
The text was updated successfully, but these errors were encountered:
This changed with #22 but I would argue that it's not a breaking change but a bug fix.
Node.js url.parse():
url.parse()
> url.parse('localhost:8000') Url { protocol: 'localhost:', slashes: null, auth: null, host: '8000', port: null, hostname: '8000', hash: null, search: null, query: null, pathname: null, path: null, href: 'localhost:8000' }
Firefox 54.0.1:
new URL('localhost:8000') URL { href: "localhost:8000", origin: "null", protocol: "localhost:", username: "", password: "", host: "", hostname: "", port: "", pathname: "8000", search: "" }
Sorry, something went wrong.
@lpinca so this is the expected behavior?
Yes.
No branches or pull requests
It seems there was a breaking change to the way that port numbers are parsed. Take this example:
The current version (1.1.9) produces the following output:
When previous versions (1.0.5), produce this:
The text was updated successfully, but these errors were encountered: