diff options
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 4d7e5c5..89af296 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -322,6 +322,13 @@ class HTTPResponse: # accepts iso-8859-1. def __init__(self, sock, debuglevel=0, strict=0, method=None): + # XXX If the response includes a content-length header, we + # need to make sure that the client doesn't read more than the + # specified number of bytes. If it does, it will block until + # the server times out and closes the connection. (The only + # applies to HTTP/1.1 connections.) Since some clients access + # self.fp directly rather than calling read(), this is a little + # tricky. self.fp = sock.makefile("rb", 0) self.debuglevel = debuglevel self.strict = strict |