mercurial/url.py
changeset 9726 430e59ff3437
parent 9467 4c041f1ee1b4
child 9852 917cf6bb6d0c
--- a/mercurial/url.py	Thu Nov 05 15:18:56 2009 +0100
+++ b/mercurial/url.py	Mon Nov 02 11:03:22 2009 -0500
@@ -408,10 +408,14 @@
         self.close_all()
 
 if has_https:
-    class httpsconnection(httplib.HTTPSConnection):
+    class BetterHTTPS(httplib.HTTPSConnection):
+        send = keepalive.safesend
+
+    class httpsconnection(BetterHTTPS):
         response_class = keepalive.HTTPResponse
         # must be able to send big bundle as stream.
-        send = _gen_sendfile(httplib.HTTPSConnection)
+        send = _gen_sendfile(BetterHTTPS)
+        getresponse = keepalive.wrapgetresponse(httplib.HTTPSConnection)
 
     class httpshandler(keepalive.KeepAliveHandler, urllib2.HTTPSHandler):
         def __init__(self, ui):