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
But URI->new(...)->canonical() does not modify any of them, and consequently URI->new('http://120.144.171.205/')->eq(...) reports false for all of them. Is that on purpose? If http://localhost/ and http://lOcAlHoSt are equal, then http://127.0.0.1 and http://0x7f.0.0.01 should be equal as well because they point to the same resource.
On the other hand, all of these URLs are invalid because of integer overflow but they are accepted by URI->new():
If you have a web server running on port 8080, all of these URLs should open the exact same page and show the canonical form http://127.0.0.1:8080/ in the browser address bar.
The text was updated successfully, but these errors were encountered:
I found the below with URI version 1.76.
These (valid!) URLs should all be equivalent:
But
URI->new(...)->canonical()
does not modify any of them, and consequentlyURI->new('http://120.144.171.205/')->eq(...)
reports false for all of them. Is that on purpose? If http://localhost/ and http://lOcAlHoSt are equal, then http://127.0.0.1 and http://0x7f.0.0.01 should be equal as well because they point to the same resource.On the other hand, all of these URLs are invalid because of integer overflow but they are accepted by
URI->new()
:A similar problem appears to exist with IPv6 addresses. These are equal:
I think, the following decimal to hex normalizations should also be performed by
URI->canonical()
:And these IPv6 addresses are invalid:
My blog post http://www.guido-flohr.net/the-gory-details-of-url-validation/ contains a little bit more information about the topic.
The following list of URLs may be more convenient for testing browser behavior:
If you have a web server running on port 8080, all of these URLs should open the exact same page and show the canonical form http://127.0.0.1:8080/ in the browser address bar.
The text was updated successfully, but these errors were encountered: