summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-15 01:36:29 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-15 01:36:29 (GMT)
commit73b8b1cdb8beb44069aad44c5358aca4904fc103 (patch)
tree136a1f1718bb052d553422a292f72295431d422e /Lib/http/server.py
parent49991deb6ecbd2c820863d212f143f107c046a26 (diff)
downloadcpython-73b8b1cdb8beb44069aad44c5358aca4904fc103.zip
cpython-73b8b1cdb8beb44069aad44c5358aca4904fc103.tar.gz
cpython-73b8b1cdb8beb44069aad44c5358aca4904fc103.tar.bz2
url unquote the path before checking if it refers to a CGI script (closes #21766)
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index bcfe894..1f4d1bb 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -946,7 +946,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
(and the next character is a '/' or the end of the string).
"""
- collapsed_path = _url_collapse_path(self.path)
+ collapsed_path = _url_collapse_path(urllib.parse.unquote(self.path))
dir_sep = collapsed_path.find('/', 1)
head, tail = collapsed_path[:dir_sep], collapsed_path[dir_sep+1:]
if head in self.cgi_directories: