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 }}
Repository navigation
URL with omitted protocol is not parsed properly. #5
Activity
defunctzombie commentedon Jun 6, 2014
This is mostly a copy of the node.js url code. Do they have an open issue about this?
https://github.com/joyent/node
theetrain commentedon Apr 10, 2017
I ran into this issue myself, and the solution was right under my nose. Change your code to:
This will parse the host and hostname correctly, but bear in mind the returned
object.protocolwill benull. More details in the node docs: https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost