Patchwork D1076: hgweb: more native string treatment in query string parsing

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 8:16 p.m.
Message ID <differential-rev-PHID-DREV-tbqksavizwah2nompide-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24907/
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/D1076

AFFECTED FILES
  mercurial/hgweb/server.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -37,10 +37,10 @@ 
     Just like CGI environment, the path is unquoted, the query is
     not.
     """
-    if '?' in uri:
-        path, query = uri.split('?', 1)
+    if r'?' in uri:
+        path, query = uri.split(r'?', 1)
     else:
-        path, query = uri, ''
+        path, query = uri, r''
     return urlreq.unquote(path), query
 
 class _error_logger(object):