Patchwork D1078: hgweb: use native strings consistently for querystring parsing

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 8:16 p.m.
Message ID <differential-rev-PHID-DREV-z54eqbspl6glrobhdnyf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24909/
State Superseded
Headers show

Comments

phabricator - Oct. 14, 2017, 8:16 p.m.
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/D1078

AFFECTED FILES
  mercurial/hgweb/hgweb_mod.py
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -508,7 +508,7 @@ 
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if url[-1] == '?' else '?'
+        start = r'&' if url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -187,7 +187,7 @@ 
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if req.url[-1] == '?' else '?'
+        start = r'&' if req.url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
 
         if not self.reponame: