Skip to content
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

1507158: Provide Host: in http CONNECT header #1735

Merged
merged 1 commit into from Nov 29, 2017
Merged

Conversation

jirihnidek
Copy link
Contributor

proxy_headers = {'User-Agent': self.user_agent}
proxy_headers = {
'User-Agent': self.user_agent,
'Host': '%s:%s' % (self.host, safe_int(self.ssl_port))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please normalize host for IPv6 compatibility as in #1725. (See

if ':' in self.host:
host_normalized = '[%s]' % self.host
else:
host_normalized = self.host
final_headers = {"Host": "%s:%s" % (host_normalized, self.ssl_port),
"Content-Length": "0",
"User-Agent": self.user_agent}
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing!

@kahowell kahowell self-assigned this Nov 27, 2017
@kahowell
Copy link
Contributor

@jirihnidek looks good. Please squash.

* Bug fix: https://bugzilla.redhat.com/show_bug.cgi?id=1507158
* Handle properly situation, when proxy server uses IPv6 address
  and we don't use hostname of proxy server only IPv6 address
* TODO: verify this bug fix with proxy server requiring this
  header. Waiting for more info from BZ reporter.
@jirihnidek
Copy link
Contributor Author

@kahowell squashed.

@kahowell kahowell merged commit c5e745a into master Nov 29, 2017
@kahowell kahowell deleted the jhnidek/1507158 branch November 29, 2017 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants