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 agwego
Recipients
Date 2005-02-28.16:53:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1228982

I've run into this problem in conjunction with mod_python
3.1.4 (and although the problem is caused in mod_python) my
python skills aren't up to the task. Which leaves me with
fixing httplib. Although the above patch works when it comes
to end of file situations, I think it would be better to
return what has been consumed so far and leave it at that. A
few lines down there's a comment about consuming trailers,
this is the case that is tripping up httplib as far as I can
tell. This is happening in Python 2.3.4.

--- packages/Python-2.Lib/httplib.py        Sun Nov  2
11:51:38 2003
+++ httplib.py  Mon Feb 28 11:26:48 2005
@@ -423,7 +423,11 @@
                 i = line.find(';')
                 if i >= 0:
                     line = line[:i] # strip chunk-extensions
-                chunk_left = int(line, 16)
+                try:
+                    chunk_left = int(line, 16)
+                except ValueError, msg:
+                    self.close()
+                    return value
                 if chunk_left == 0:
                     break
             if amt is None:


History
Date User Action Args
2007-08-23 15:32:25adminlinkissue900744 messages
2007-08-23 15:32:25admincreate