From: Tom Christie Date: Mon, 16 Nov 2020 09:39:51 +0000 (+0000) Subject: WSGI 'PATH_INFO' should be URL unquoted (#1391) X-Git-Tag: 0.17.0~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2961f267fdcd84539defeb006a07a56b94f15dba;p=thirdparty%2Fhttpx.git WSGI 'PATH_INFO' should be URL unquoted (#1391) --- diff --git a/httpx/_transports/wsgi.py b/httpx/_transports/wsgi.py index 5169d92e..953e1908 100644 --- a/httpx/_transports/wsgi.py +++ b/httpx/_transports/wsgi.py @@ -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),