Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-22708: Fix http protocol version in CONNECT method, support IDN #742

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

Closed
wants to merge 1 commit into from

Conversation

vo-va
Copy link

@vo-va vo-va commented Mar 20, 2017

Original author of this patch demianbrecht@gmail.com

HTTP/1.0 not supported CONNECT method, fix http version.
Support for IDN.

https://bugs.python.org/issue22708

Original author of this patch demianbrecht@gmail.com
@brettcannon
Copy link
Member

FYI for any other core dev, Demian Brecht has signed the CLA.

Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

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

Please also include the NEWS entry in the original patch and append "Patch by Demian Brecht.".

@@ -1877,6 +1877,16 @@ def test_connect_with_tunnel(self):
# This test should be removed when CONNECT gets the HTTP/1.1 blessing
self.assertNotIn(b'Host: proxy.com', self.conn.sock.data)

def test_connect_with_tunnel_idna(self):
dest = '\u03b4\u03c0\u03b8.gr'
expected = 'CONNECT %s:%d HTTP/1.1\r\n'.encode('ascii') % (
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to not use b'CONNECT %s:%d HTTP/1.1\r\n' instead? We already know that "HTTP/1.1", dest.encode('idna') and client.HTTP_PORT don't contain any non-ASCII chars so there is no need to encode it ASCII.

@berkerpeksag
Copy link
Member

And please rebase your branch so we can run the tests on AppVeyor.

@@ -1877,6 +1877,16 @@ def test_connect_with_tunnel(self):
# This test should be removed when CONNECT gets the HTTP/1.1 blessing
Copy link
Member

Choose a reason for hiding this comment

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

This comment is now redundant and can be removed, but I don't see a reason to remove the test itself.

@brettcannon
Copy link
Member

To try and help move older pull requests forward, we are going through and backfilling 'awaiting' labels on pull requests that are lacking the label. Based on the current reviews, the best we can tell in an automated fashion is that a core developer requested changes to be made to this pull request.

If/when the requested changes have been made, please leave a comment that says, I have made the requested changes; please review again. That will trigger a bot to flag this pull request as ready for a follow-up review.

@berkerpeksag
Copy link
Member

Superseded by PR #8305.

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

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.