diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-23 20:34:17 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-23 20:34:17 (GMT) |
commit | 4d746fca3d7f4f5008ec8b0e02c78a2936cddba7 (patch) | |
tree | 9ce70f49b6fdc9f348f336fa2d042519c87ad70f /Lib | |
parent | 6baec620b400e94e2014c735bff17dd21c1c3f19 (diff) | |
download | cpython-4d746fca3d7f4f5008ec8b0e02c78a2936cddba7.zip cpython-4d746fca3d7f4f5008ec8b0e02c78a2936cddba7.tar.gz cpython-4d746fca3d7f4f5008ec8b0e02c78a2936cddba7.tar.bz2 |
add docstring explaining makefile limitation
fix support for passing http version to connect in HTTP
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/httplib.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 395ffbf..eac59e3 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -541,7 +541,15 @@ class FakeSocket: self.__sock = sock self.__ssl = ssl - def makefile(self, mode): # hopefully, never have to write + def makefile(self, mode, bufsize=None): + """Return a readable file-like object with data from socket. + + This method offers only partial support for the makefile + interface of a real socket. It only supports modes 'r' and + 'rb' and the bufsize argument is ignored. + + The returned object contains *all* of the file data + """ if mode != 'r' and mode != 'rb': raise UnimplementedFileMode() @@ -618,6 +626,8 @@ class HTTP: self.send = self._conn.send self.putrequest = self._conn.putrequest self.endheaders = self._conn.endheaders + self._conn._http_vsn = self._http_vsn + self._conn._http_vsn_str = self._http_vsn_str # we never actually use these for anything, but we keep them here for # compatibility with post-1.5.2 CVS. |