Closed asselstine closed 4 years ago
url.parse('https://www.w.org') should yield:
url.parse('https://www.w.org')
{ slashes: true, host: 'www.e.org', hostname: 'www.e.org', protocol: 'https:', search: null, hash: null, query: null, pathname: '/', path: '/', auth: null, port: null, href: 'https://www.e.org/' }
The above actually returns:
But instead we get:
{ slashes: true, host: null, hostname: null, protocol: 'https:', search: null, hash: null, query: null, pathname: '/', path: '/', auth: null, port: null, href: 'https:///' }
Try parsing a url whose hostname begins with 'www.w':
Fails: url.parse('https://www.w.org')
Succeeds: url.parse('https://w.org')
url.parse('https://w.org')
This should also be tested with https://www.wikipedia.org/
Thanks for posting this. This should be fixed.
Expected Behavior
url.parse('https://www.w.org')
should yield:Actual Behavior
The above actually returns:
But instead we get:
Steps to Reproduce the Problem
Try parsing a url whose hostname begins with 'www.w':
Fails:
url.parse('https://www.w.org')
Succeeds:
url.parse('https://w.org')
Specifications