[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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

bpo-24209: Adds IPv6 support when invoking http.server directly. #10595

Merged
merged 1 commit into from Nov 26, 2018

Conversation

Copy link
Contributor

lisroach commented Nov 19, 2018

Copy link
Member

gpshead left a comment

Makes sense to me. I'll let you do the merge.

lisroach merged commit 433433f into python:master Nov 26, 2018
lisroach deleted the issue_24209 branch Nov 26, 2018
Copy link
Member

jaraco left a comment

Thanks so much for taking this on and effecting the change. I apologize for being so late in review. This change is an excellent first approach, taking on the unit test as well.

I'll take on the responsibility to follow up on the above concerns, whether that's to address them directly or file tickets.

@@ -1226,6 +1226,9 @@ def test(HandlerClass=BaseHTTPRequestHandler,
"""
server_address = (bind, port)

if ':' in bind:
Copy link
Member

jaraco Dec 17, 2018

Choose a reason for hiding this comment

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

Although : is sufficient to indicate that the family should be INET6, it's not necessary. For example, one could specify localhost, which may resolve to 127.0.0.1 or ::1 or both. Or one may bind to '' or None, which will resolve to all interfaces. In that case, INET6 or AF_UNSPEC might be more appropriate.

Plus, I'd prefer that the default behavior should be to bind to IPv6, which in many cases also supports binding to IPv4 (at least for ::, all interfaces), and only fall back to the older IPv4 standard when necessary or directed. I do say though, with as few people familiar with IPv6, it's probably a hard sell to make it the default, even if that's eventually where the code should end up and it's been more than a decade in the transition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants