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

Bugfix: ipv6 host support #332

Merged
merged 3 commits into from Jun 30, 2017

Conversation

Projects
None yet
2 participants
@bertjwregeer
Copy link
Member

bertjwregeer commented Jun 30, 2017

Closes #331

@bertjwregeer bertjwregeer referenced this pull request Jun 30, 2017

Closed

IPv6 support #331

@mmerickel
Copy link
Member

mmerickel left a comment

Any concerns here about badly formatted headers? Even as simple as a host header with no port will split the IPv6 address when it shouldn't right now.

@@ -414,7 +414,7 @@ def host_port(self):
host = e.get('HTTP_HOST')
if host is not None:
if ':' in host:

This comment has been minimized.

@mmerickel

mmerickel Jun 30, 2017

Member

This check is not enough to determine to split it based on :. The IPv6 address may not have a port but still has : characters.

This comment has been minimized.

@bertjwregeer

@bertjwregeer bertjwregeer force-pushed the bugfix/ipv6_host_support branch from dd75551 to 6a6e174 Jun 30, 2017

Use rsplit instead of split
Don't split on IPv6 address if no port

@bertjwregeer bertjwregeer force-pushed the bugfix/ipv6_host_support branch from 6a6e174 to 0aac1a0 Jun 30, 2017

@bertjwregeer bertjwregeer merged commit 0207d21 into master Jun 30, 2017

0 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@bertjwregeer bertjwregeer deleted the bugfix/ipv6_host_support branch Jun 30, 2017

bertjwregeer added a commit that referenced this pull request Jun 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment