*** httplib.py Fri Dec 30 15:39:06 2011 --- httplib_patched.py Fri Dec 30 15:46:26 2011 *************** *** 745,750 **** --- 745,754 ---- line = response.fp.readline(_MAXLINE + 1) if len(line) > _MAXLINE: raise LineTooLong("header line") + if not line: + # a vanishingly small number of sites EOF without + # sending the trailer + break if line == '\r\n': break