Skip to content

Added IPv6 address support in ClientRequest.update_host#425

Merged
asvetlov merged 2 commits intoaio-libs:masterfrom
ffix:master
Jun 26, 2015
Merged

Added IPv6 address support in ClientRequest.update_host#425
asvetlov merged 2 commits intoaio-libs:masterfrom
ffix:master

Conversation

@ffix
Copy link
Copy Markdown
Contributor

@ffix ffix commented Jun 26, 2015

Current version of aiohttp doesn't support ipv6 addresses in url (like http://[2001:db8::1]/). It fails with exception here.

This pull request should fix it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make code simpler:

url_parsed = urllib.parse.urlsplit(url)
scheme, netloc, path, query, fragment = url_parsed

One-liners are not always the best solution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even drop second line from my previous comment and use url_parsed everywhere in the method.

asvetlov added a commit that referenced this pull request Jun 26, 2015
Added IPv6 address support in ClientRequest.update_host
@asvetlov asvetlov merged commit fd119b9 into aio-libs:master Jun 26, 2015
@asvetlov
Copy link
Copy Markdown
Member

Perfect! Thanks!

@lock
Copy link
Copy Markdown

lock bot commented Oct 30, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants