From patchwork Sun Oct 15 04:57:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1089: httppeer: convert request url back to bytes before inspecting it From: phabricator X-Patchwork-Id: 24935 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 15 Oct 2017 04:57:59 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1089 AFFECTED FILES mercurial/httppeer.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -303,7 +303,7 @@ _wraphttpresponse(resp) # record the url we got redirected to - resp_url = resp.geturl() + resp_url = pycompat.bytesurl(resp.geturl()) if resp_url.endswith(qs): resp_url = resp_url[:-len(qs)] if self._url.rstrip('/') != resp_url.rstrip('/'):