Message245686
| Author |
martin.panter |
| Recipients |
Julien.Palard, martin.panter |
| Date |
2015年06月23日.12:49:50 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1435063790.19.0.387658556769.issue24486@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The closest I have is Python 3.3, but this times out properly for me:
>>> from http.client import HTTPConnection
>>> import socket
>>> socket.setdefaulttimeout(10)
>>> h = HTTPConnection("192.168.1.84")
>>> h.request("GET", "/")
>>> h.getresponse()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python33\lib\http\client.py", line 1147, in getresponse
response.begin()
File "C:\Python33\lib\http\client.py", line 358, in begin
version, status, reason = self._read_status()
File "C:\Python33\lib\http\client.py", line 320, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Python33\lib\socket.py", line 297, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
I suggest you either try to come up with a recipe to reproduce this with plain http.client, or look into whether the Requests package supports using the default socket timeout setting. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年06月23日 12:49:50 | martin.panter | set | recipients:
+ martin.panter, Julien.Palard |
| 2015年06月23日 12:49:50 | martin.panter | set | messageid: <1435063790.19.0.387658556769.issue24486@psf.upfronthosting.co.za> |
| 2015年06月23日 12:49:50 | martin.panter | link | issue24486 messages |
| 2015年06月23日 12:49:50 | martin.panter | create |
|