[ python-Bugs-1537445 ] urllib2 httplib _read_chunked timeout

SourceForge.net noreply at sourceforge.net
Wed Aug 9 17:00:08 CEST 2006


Bugs item #1537445, was opened at 2006-08-09 17:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1537445&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: devloop (devloop)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 httplib _read_chunked timeout

Initial Comment:
Hello !

In a code of mine if have the lines :
try:
  req = urllib2.Request(url)
  u = urllib2.urlopen(req)
  data=u.read()
except urllib2.URLError,err:
  // error handling here

The urllib2.URLError normally catchs the 
socket.timeout but someone send me a bug report of a 
tiemout error :

File "/usr/lib/python2.4/socket.py", line 285, in read
data = self._sock.recv(recv_size)
File "/usr/lib/python2.4/httplib.py", line 460, in read
return self._read_chunked(amt)
File "/usr/lib/python2.4/httplib.py", line 495, in
_read_chunked
line = self.fp.readline()
File "/usr/lib/python2.4/socket.py", line 325, in
readline
data = recv(1)
socket.timeout: timed out

Is it a bug with httplib and 'Content-Encoding: 
chunked' header ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1537445&group_id=5470


More information about the Python-bugs-list mailing list