Mercurial > cpython-lru_cache-weakref
diff Lib/http/client.py @ 76491:7787a9aebdc6 3.2
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
| author | Senthil Kumaran <senthil@uthcode.com> |
|---|---|
| date | Mon, 23 Apr 2012 23:50:07 +0800 |
| parents | 6ac59218c049 |
| children | 1a9d38966395 1acb252a3858 |
line wrap: on
line diff
--- a/Lib/http/client.py Mon Apr 23 11:25:32 2012 -0400 +++ b/Lib/http/client.py Mon Apr 23 23:50:07 2012 +0800 @@ -715,6 +715,9 @@ line = response.fp.readline(_MAXLINE + 1) if len(line) > _MAXLINE: raise LineTooLong("header line") + if not line: + # for sites which EOF without sending a trailer + break if line == b'\r\n': break
