Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 403e4ee..137a9ea 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -571,6 +571,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