D2733: hgweb: always use "?" when writing session vars

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Mar 9 14:29:46 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGec46415ed826: hgweb: always use "?" when writing session vars (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2733?vs=6739&id=6777

REVISION DETAIL
  https://phab.mercurial-scm.org/D2733

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

CHANGE DETAILS

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
@@ -509,8 +509,7 @@
         if style == styles[0]:
             vars['style'] = style
 
-        start = r'&' if url[-1] == r'?' else r'?'
-        sessionvars = webutil.sessionvars(vars, start)
+        sessionvars = webutil.sessionvars(vars, r'?')
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
         staticurl = config('web', 'staticurl') or url + 'static/'
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
@@ -177,8 +177,7 @@
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if wsgireq.url[-1] == r'?' else '?'
-        sessionvars = webutil.sessionvars(vars, start)
+        sessionvars = webutil.sessionvars(vars, '?')
 
         if not self.reponame:
             self.reponame = (self.config('web', 'name', '')



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


More information about the Mercurial-devel mailing list