mercurial/hgweb/hgwebdir_mod.py
changeset 48904 7dc430b85351
parent 48875 6000f5b25c9b
child 48946 642e31cb55f0
--- a/mercurial/hgweb/hgwebdir_mod.py	Mon Feb 21 10:43:58 2022 -0700
+++ b/mercurial/hgweb/hgwebdir_mod.py	Mon Feb 21 10:45:24 2022 -0700
@@ -460,12 +460,9 @@
                 if real:
                     # Re-parse the WSGI environment to take into account our
                     # repository path component.
-                    uenv = req.rawenv
-                    if pycompat.ispy3:
-                        uenv = {
-                            k.decode('latin1'): v
-                            for k, v in pycompat.iteritems(uenv)
-                        }
+                    uenv = {
+                        k.decode('latin1'): v for k, v in req.rawenv.items()
+                    }
                     req = requestmod.parserequestfromenv(
                         uenv,
                         reponame=virtualrepo,