-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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.parse("http://:::1") is parsed as "http://:1/::" #2929
Comments
Literal IPv6 URLs need to be enclosed in
I'm not so sure it shouldn't throw an error or at least a warning on the example you provide, though. |
Yeah, not saying it's correct use of IPv6, but I would expect it to not mess up the parsing at least (i.e. input ~= output). |
I believe the two main rules for the
Focusing on the first rule for now, here's what I get from
For comparison, I did this in Chrome:
Then I inspected
Given all that, I would say it's a mess either way and (given the second bullet point above) probably not worth "fixing". The exception is the |
Related: For an impressive list of URLs along with how they are parsed by Chrome: http://src.chromium.org/viewvc/chrome/trunk/src/url/url_parse_unittest.cc |
It's interesting that it's parsed the same way in chrome... anyway, I'm not really bothered by this myself and while it's not great, as you say more harm can (will) come from trying to fix it than just leaving it as it is. Leaving it for you to close (your decision). |
Another result from Chrome: |
That result makes a lot more sense to me. Do you know if the implementation is in Blink/Chromium code or in v8? I'm guessing it's not in v8 but if I'm wrong, is it absurdly naive of me to ask if it's possible that Node can hook into it and maybe it can be called by |
It's not V8. ;-) |
Closing due to inactivity and an apparent general consensus that the cure may be worse than the disease. |
webpack/webpack-dev-server#240 (comment)
The text was updated successfully, but these errors were encountered: