Potential fix for #436

This commit is contained in:
Chris Dary
2012-03-08 13:10:18 -08:00
parent 1cf5ec872c
commit fba77fc65f
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -675,6 +675,9 @@ class Response(object):
while 1:
#XXX correct line size? (httplib has 64kb, seems insane)
pending_bytes = fp.readline(40).strip()
if pending_bytes == '':
# No content, like a HEAD request. Break out.
break
pending_bytes = int(pending_bytes, 16)
if pending_bytes == 0:
break