I use Requests 1.2.3 on Windows 7 x64 and try to connect to (any) site via HTTPS using an HTTPS proxy, passing the proxies argument to the request.
I do not experience this error when using urllib2 ProxyHandler , so I do not think about it on my proxy side.
>>> opener = urllib2.build_opener(urllib2.ProxyHandler({'https': 'IP:PORT'})) >>> resp = opener.open('https://www.google.com') >>> resp.url 'https://www.google.co.uk/' >>> resp = requests.get('https://www.google.com', proxies={'https': 'IP:PORT'}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\requests\api.py", line 55, in get return request('get', url, **kwargs) File "C:\Python27\lib\site-packages\requests\api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 335, in request resp = self.send(prep, **send_kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 438, in send r = adapter.send(request, **kwargs) File "C:\Python27\lib\site-packages\requests\adapters.py", line 331, in send raise SSLError(e) requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol
I should notice that the error repeats if I pass the verify=False request.
Any suggestions? I looked at related questions, but there was nothing that would work for me.
source share