comparison mercurial/hgweb/server.py @ 34700:8e5132ece156

hgweb: more native string treatment in query string parsing Differential Revision: https://phab.mercurial-scm.org/D1076
author Augie Fackler <augie@google.com>
date Thu, 05 Oct 2017 14:29:51 -0400
parents 75979c8d4572
children 8782076874f5
comparison
equal deleted inserted replaced
34699:375c8debe336 34700:8e5132ece156
35 """Return path and query that has been split from uri 35 """Return path and query that has been split from uri
36 36
37 Just like CGI environment, the path is unquoted, the query is 37 Just like CGI environment, the path is unquoted, the query is
38 not. 38 not.
39 """ 39 """
40 if '?' in uri: 40 if r'?' in uri:
41 path, query = uri.split('?', 1) 41 path, query = uri.split(r'?', 1)
42 else: 42 else:
43 path, query = uri, '' 43 path, query = uri, r''
44 return urlreq.unquote(path), query 44 return urlreq.unquote(path), query
45 45
46 class _error_logger(object): 46 class _error_logger(object):
47 def __init__(self, handler): 47 def __init__(self, handler):
48 self.handler = handler 48 self.handler = handler