]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport akuchling's checkin of
authorMichael W. Hudson <mwh@python.net>
Mon, 25 Mar 2002 12:24:58 +0000 (12:24 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 25 Mar 2002 12:24:58 +0000 (12:24 +0000)
    revision 1.47 of httplib.py

[Bug #531616] Make HTTPS work again by adding a sendall method to the
FakeSocket class.  Without it, the sendall() call got the method on
the underlying socket object, and that messed up SSL.

Does httplib use other methods of sockets that FakeSocket doesn't support?
Someone should take a look...  (I'll try to give it a once-over.)

2.2.1 bugfix candidate.

Lib/httplib.py

index b7df006c89a99290a4562773151293b91e926e10..d244351ef37ee8059fdd869c8c5ce4fb58194e14 100644 (file)
@@ -646,6 +646,9 @@ class FakeSocket:
     def send(self, stuff, flags = 0):
         return self.__ssl.write(stuff)
 
+    def sendall(self, stuff, flags = 0):
+        return self.__ssl.write(stuff)
+
     def recv(self, len = 1024, flags = 0):
         return self.__ssl.read(len)