Commits

Martin von Löwis  committed ae55e71

Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.

  • Participants
  • Parent commits ba17b21
  • Branches 2.5

Comments (0)

Files changed (2)

File Lib/httplib.py

         ### 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
 
 Library
 -------
 
+- Patch #1966: Break infinite loop in httplib when the servers
+  implements the chunked encoding incorrectly.
+
 - tarfile.py: Fix reading of xstar archives.
 
 - #2021: Allow tempfile.NamedTemporaryFile to be used in with statements