Mercurial > public > mercurial-scm > hg
comparison mercurial/httppeer.py @ 34724:9c3dcaf648ef
httppeer: convert request url back to bytes before inspecting it
Differential Revision: https://phab.mercurial-scm.org/D1089
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Oct 2017 11:59:51 -0400 |
parents | 6db536bed7ec |
children | a288712d86d5 |
comparison
equal
deleted
inserted
replaced
34723:b13c95919ff5 | 34724:9c3dcaf648ef |
---|---|
301 | 301 |
302 # Insert error handlers for common I/O failures. | 302 # Insert error handlers for common I/O failures. |
303 _wraphttpresponse(resp) | 303 _wraphttpresponse(resp) |
304 | 304 |
305 # record the url we got redirected to | 305 # record the url we got redirected to |
306 resp_url = resp.geturl() | 306 resp_url = pycompat.bytesurl(resp.geturl()) |
307 if resp_url.endswith(qs): | 307 if resp_url.endswith(qs): |
308 resp_url = resp_url[:-len(qs)] | 308 resp_url = resp_url[:-len(qs)] |
309 if self._url.rstrip('/') != resp_url.rstrip('/'): | 309 if self._url.rstrip('/') != resp_url.rstrip('/'): |
310 if not self.ui.quiet: | 310 if not self.ui.quiet: |
311 self.ui.warn(_('real URL is %s\n') % resp_url) | 311 self.ui.warn(_('real URL is %s\n') % resp_url) |