-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
I try to sending a HTTPS requests by http proxy.
the code is like
proxy = 'host:port'
proxies = {'https' : proxy}
r = requests.post('https://url', proxies=proxies, timeout=10)
But it just raises the error below, while I tested it OK when using pycurl.
Traceback (most recent call last):
File "c:\python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\packages\urllib3\connectionpool.py", line 421, in urlopen
body=body, headers=headers)
File "c:\python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\packages\urllib3\connectionpool.py", line 273, in _make_request
conn.request(method, url, **httplib_request_kw)
File "c:\python32\lib\http\client.py", line 964, in request
self._send_request(method, url, body, headers)
File "c:\python32\lib\http\client.py", line 1002, in _send_request
self.endheaders(body)
File "c:\python32\lib\http\client.py", line 960, in endheaders
self._send_output(message_body)
File "c:\python32\lib\http\client.py", line 805, in _send_output
self.send(msg)
File "c:\python32\lib\http\client.py", line 743, in send
self.connect()
File "c:\python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\packages\urllib3\connectionpool.py", line 104, in connect
ssl_version=resolved_ssl_version)
File "c:\python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\packages\urllib3\util.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "c:\python32\lib\ssl.py", line 181, in wrap_socket
_context=self)
File "c:\python32\lib\ssl.py", line 268, in __init__
raise x
File "c:\python32\lib\ssl.py", line 264, in __init__
self.do_handshake()
File "c:\python32\lib\ssl.py", line 443, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:376: The handshake operation timed outMetadata
Metadata
Assignees
Labels
No labels