##// END OF EJS Templates
Fix push over https....
Alexis S. L. Carvalho -
r2557:1727ff71 default
parent child Browse files
Show More
@@ -91,6 +91,22 b' class httphandler(keepalive.HTTPHandler)'
91 def http_open(self, req):
91 def http_open(self, req):
92 return self.do_open(httpconnection, req)
92 return self.do_open(httpconnection, req)
93
93
94 class httpsconnection(httplib.HTTPSConnection):
95 # must be able to send big bundle as stream.
96
97 def send(self, data):
98 if isinstance(data, str):
99 httplib.HTTPSConnection.send(self, data)
100 else:
101 # if auth required, some data sent twice, so rewind here
102 data.seek(0)
103 for chunk in util.filechunkiter(data):
104 httplib.HTTPSConnection.send(self, chunk)
105
106 class httpshandler(urllib2.HTTPSHandler):
107 def https_open(self, req):
108 return self.do_open(httpsconnection, req)
109
94 class httprepository(remoterepository):
110 class httprepository(remoterepository):
95 def __init__(self, ui, path):
111 def __init__(self, ui, path):
96 self.caps = None
112 self.caps = None
@@ -160,6 +176,7 b' class httprepository(remoterepository):'
160
176
161 opener = urllib2.build_opener(
177 opener = urllib2.build_opener(
162 handler,
178 handler,
179 httpshandler(),
163 urllib2.HTTPBasicAuthHandler(passmgr),
180 urllib2.HTTPBasicAuthHandler(passmgr),
164 urllib2.HTTPDigestAuthHandler(passmgr))
181 urllib2.HTTPDigestAuthHandler(passmgr))
165
182
General Comments 0
You need to be logged in to leave comments. Login now