Index: Lib/httplib.py =================================================================== --- Lib/httplib.py (revision 60424) +++ Lib/httplib.py (working copy) @@ -573,6 +573,10 @@ ### note: we shouldn't have any trailers! while True: line = self.fp.readline() + if not line: + # a vanishingly small number of sites EOF without + # sending the trailer + break if line == '\r\n': break