homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:50martin.pantersetrecipients: + martin.panter, Julien.Palard
2015年06月23日 12:49:50martin.pantersetmessageid: <1435063790.19.0.387658556769.issue24486@psf.upfronthosting.co.za>
2015年06月23日 12:49:50martin.panterlinkissue24486 messages
2015年06月23日 12:49:50martin.pantercreate

AltStyle によって変換されたページ (->オリジナル) /