Index: httplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v retrieving revision 1.83 diff -u -r1.83 httplib.py --- httplib.py 18 Jan 2004 20:29:54 -0000 1.83 +++ httplib.py 19 Feb 2004 22:58:25 -0000 @@ -423,7 +423,10 @@ 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: + raise IncompleteRead(line) if chunk_left == 0: break if amt is None: