diff mercurial/hgweb/request.py @ 34512:482d6f6dba91

hgweb: when constructing or adding to a wsgi environ dict, use native strs That's what's required of us to work with the WSGI API on Python 3. Differential Revision: https://phab.mercurial-scm.org/D967
author Augie Fackler <augie@google.com>
date Thu, 05 Oct 2017 14:22:02 -0400
parents 37fcfe52c68c
children 34fcb0f66837
line wrap: on
line diff
--- a/mercurial/hgweb/request.py	Thu Oct 05 14:17:50 2017 -0400
+++ b/mercurial/hgweb/request.py	Thu Oct 05 14:22:02 2017 -0400
@@ -59,15 +59,15 @@
     for obtaining request parameters, writing HTTP output, etc.
     """
     def __init__(self, wsgienv, start_response):
-        version = wsgienv['wsgi.version']
+        version = wsgienv[r'wsgi.version']
         if (version < (1, 0)) or (version >= (2, 0)):
             raise RuntimeError("Unknown and unsupported WSGI version %d.%d"
                                % version)
-        self.inp = wsgienv['wsgi.input']
-        self.err = wsgienv['wsgi.errors']
-        self.threaded = wsgienv['wsgi.multithread']
-        self.multiprocess = wsgienv['wsgi.multiprocess']
-        self.run_once = wsgienv['wsgi.run_once']
+        self.inp = wsgienv[r'wsgi.input']
+        self.err = wsgienv[r'wsgi.errors']
+        self.threaded = wsgienv[r'wsgi.multithread']
+        self.multiprocess = wsgienv[r'wsgi.multiprocess']
+        self.run_once = wsgienv[r'wsgi.run_once']
         self.env = wsgienv
         self.form = normalize(cgi.parse(self.inp,
                                         self.env,