-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
HTTPS proxy connection not initialized if first request is chunked #3844
Comments
Can you provide some more information please? What requests version are you using. What proxy? What Python version? |
I work with Brent. I've seen this issue on both Linux and OSX. On Linux I've seen it with python 2.7.11 and requests 2.11.1. On OSX (my laptop) I've seen it with python 2.7.11+requests 2.11.1, python 2.7.11+requests 2.13.0 and python 3.5.1+requests 2.13.0. I believe Brent used Apache as a proxy, but I'm not positive. I think, though, that given the patch, (btw, it's around like 432 of requests/adapters.py), it's probably not relevant what the proxy software was. |
I'm using apache2. Config below (don't do this unless server is secure). Like Sean said, though, I don't think it's relevant. Packet captures clearly show that CONNECT request isn't sent. add to ports.confListen 1080 add to a file in sites-enabled<VirtualHost *:1080> |
Yeah, I suspect this is a real problem. I think this can be resolved by writing a patch to use the |
Found this thread when searching for the "unknonw protocol" problem. |
(as commented on #4179) I was experiencing the same issue (chunked encoding through an HTTPS proxy tunnel resulting in an SSL unknown protocol error) with requests 2.22.0. I upgraded to a9ee0ee and the issue disappeared 👍 . After spending some time analyzing the issue I'm confident that the fix came from #5128. Since as of Jan 10, 2020 the fix is not released I used this command to upgrade requests to head of master branch: |
* Fix psf#3844 * Use urllib for chunked --------- Co-authored-by: James Pickering <[email protected]> Co-authored-by: Leon Verrall <[email protected]>
Using code below, will produce 403 error without https_proxy:
But ssl error with https_proxy (because CONNECT request is never sent):
For now, I'm patching my local requests/adaptor.py to init proxy when first conn use is with chunked request:
The text was updated successfully, but these errors were encountered: