]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
WSGI 'PATH_INFO' should be URL unquoted (#1391)
authorTom Christie <tom@tomchristie.com>
Mon, 16 Nov 2020 09:39:51 +0000 (09:39 +0000)
committerGitHub <noreply@github.com>
Mon, 16 Nov 2020 09:39:51 +0000 (09:39 +0000)
httpx/_transports/wsgi.py

index 5169d92e70a0cc33128a727b7eca2d4bc06efa4a..953e1908c23bb500a352b0f48963be29d9a71151 100644 (file)
@@ -1,6 +1,7 @@
 import io
 import itertools
 import typing
+from urllib.parse import unquote
 
 import httpcore
 
@@ -83,7 +84,7 @@ class WSGITransport(httpcore.SyncHTTPTransport):
             "wsgi.run_once": False,
             "REQUEST_METHOD": method.decode(),
             "SCRIPT_NAME": self.script_name,
-            "PATH_INFO": path.decode("ascii"),
+            "PATH_INFO": unquote(path.decode("ascii")),
             "QUERY_STRING": query.decode("ascii"),
             "SERVER_NAME": host.decode("ascii"),
             "SERVER_PORT": str(port),