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
I've observed that if a URL with port specified, and scheme unspecified, is supplied to url.parse, the hostname is set as protocol, and port as hostname in the result:
I believe this is expected behavior as the url module cannot know that there is a missing protocol (because there is no hardcoded protocol list to verify against) and what that missing protocol is supposed to be.
Also, the url module supports urls of the form <protocol>:... like mailto:foo@bar.com and magnet:?xt=urn:sha1:40AE8A90DE40CA3AFA763C8EDB43FC1FC47D75F1, so that is why it's parsed the way you currently see it.
Expected behaviour, your protocol is localhost:, though you probably didn't intend it that way. Or maybe you do have a protocol called "localhost", who's to tell?
I've observed that if a URL with port specified, and scheme unspecified, is supplied to url.parse, the hostname is set as protocol, and port as hostname in the result:
I'm unsure of whether this is a bug, but I figured I'd report the behavior. I'm using version v0.12.7, on OS X.
The text was updated successfully, but these errors were encountered: