-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
aiohttp.web.run_app displays wrong URI for IPv6 addresses (e.g. http://::1:1234/) #1139
Comments
Would you create a patch? |
Is there a generic way to construct network location part of Currently I don't see any way of handling IPv6 brackets other than somehow check is string is IPv6 address and append brackets if it is. Other issue that we allow to use integer representation of IP addresses, like:
and |
So I suggest to use code like this: https://github.com/aio-libs/yarl/blob/master/yarl/__init__.py#L324-L330 |
@asvetlov Yes,
and if we bind on |
Oops. We are not supposed to keep such weird functionality. |
@asvetlov so, should we keep this functionality (-h 2130706433 equals 127.0.0.1) or not ? should this issue just include brackets ? |
No, we shouldn't.
|
@asvetlov looks like it'a valid functionality, it's not weird. I have to explicitly check if hostname is integer representation of ip address
|
Just add lines like:
We may relax the rule by accepting |
I've started doing something like this, is this too much ? regex is from django
|
You don't need any regex check. |
Use of
aiohttp.web
with IPv6 addresses produces wrong URI:According to RFC 2732 IPv6 should be included in brackets:
http://[::1]:1234/
.The text was updated successfully, but these errors were encountered: