Skip to content

Bugfix: ipv6 host support#332

Merged
digitalresistor merged 3 commits into
masterfrom
bugfix/ipv6_host_support
Jun 30, 2017
Merged

Bugfix: ipv6 host support#332
digitalresistor merged 3 commits into
masterfrom
bugfix/ipv6_host_support

Conversation

@digitalresistor
Copy link
Copy Markdown
Member

@digitalresistor digitalresistor commented Jun 30, 2017

Closes #331

@digitalresistor digitalresistor mentioned this pull request Jun 30, 2017
Copy link
Copy Markdown
Member

@mmerickel mmerickel left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/webob/request.py Outdated
@@ -414,7 +414,7 @@ def host_port(self):
host = e.get('HTTP_HOST')
if host is not None:
if ':' in host:
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.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

@digitalresistor digitalresistor force-pushed the bugfix/ipv6_host_support branch from dd75551 to 6a6e174 Compare June 30, 2017 20:48
Don't split on IPv6 address if no port
@digitalresistor digitalresistor force-pushed the bugfix/ipv6_host_support branch from 6a6e174 to 0aac1a0 Compare June 30, 2017 20:49
@digitalresistor digitalresistor merged commit 0207d21 into master Jun 30, 2017
@digitalresistor digitalresistor deleted the bugfix/ipv6_host_support branch June 30, 2017 21:10
digitalresistor 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants