Commits

Robert Brewer committed 104d8b8

Fix for incorrect use of unbound method with SSL send. Needs porting to trunk regardless of the future of this branch.

Comments (0)

Files changed (1)

cherrypy/wsgiserver/__init__.py

 
 
 import base64
+import os
 import Queue
-import os
 import re
 quoted_slash = re.compile("(?i)%2F")
 import rfc822
     read = _ssl_wrap_method(socket._fileobject.read, is_reader=True)
     readline = _ssl_wrap_method(socket._fileobject.readline, is_reader=True)
     readlines = _ssl_wrap_method(socket._fileobject.readlines, is_reader=True)
+    
+    def send(self, *args, **kwargs):
+        return self._sock.send(*args, **kwargs)
+    send = _ssl_wrap_method(send)
 
 
 class HTTPConnection(object):
             timeout = sock.gettimeout()
             self.rfile = SSL_fileobject(sock, "r", self.rbufsize)
             self.rfile.ssl_timeout = timeout
-            self.send = _ssl_wrap_method(sock.send)
+            self.send = self.rfile.send
         else:
             self.rfile = sock.makefile("rb", self.rbufsize)
             self.send = sock.send