Show More
@@ -161,6 +161,9 b' class httppeer(wireproto.wirepeer):' | |||||
161 | h.close() |
|
161 | h.close() | |
162 | getattr(h, "close_all", lambda: None)() |
|
162 | getattr(h, "close_all", lambda: None)() | |
163 |
|
163 | |||
|
164 | def _openurl(self, req): | |||
|
165 | return self._urlopener.open(req) | |||
|
166 | ||||
164 | # Begin of _basepeer interface. |
|
167 | # Begin of _basepeer interface. | |
165 |
|
168 | |||
166 | @util.propertycache |
|
169 | @util.propertycache | |
@@ -298,7 +301,7 b' class httppeer(wireproto.wirepeer):' | |||||
298 | self.ui.debug("sending %s bytes\n" % size) |
|
301 | self.ui.debug("sending %s bytes\n" % size) | |
299 | req.add_unredirected_header('Content-Length', '%d' % size) |
|
302 | req.add_unredirected_header('Content-Length', '%d' % size) | |
300 | try: |
|
303 | try: | |
301 |
resp = self._ |
|
304 | resp = self._openurl(req) | |
302 | except urlerr.httperror as inst: |
|
305 | except urlerr.httperror as inst: | |
303 | if inst.code == 401: |
|
306 | if inst.code == 401: | |
304 | raise error.Abort(_('authorization failed')) |
|
307 | raise error.Abort(_('authorization failed')) |
General Comments 0
You need to be logged in to leave comments.
Login now