summaryrefslogtreecommitdiffstats
path: root/Lib/test
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/test
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/test')
-rw-r--r--Lib/test/test_httpservers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index f8198f8..bb75f78 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -461,6 +461,11 @@ class CGIHTTPServerTestCase(BaseTestCase):
(res.read(), res.getheader('Content-type'), res.status))
self.assertEqual(os.environ['SERVER_SOFTWARE'], signature)
+ def test_urlquote_decoding_in_cgi_check(self):
+ res = self.request('/cgi-bin%2ffile1.py')
+ self.assertEqual((b'Hello World\n', 'text/html', 200),
+ (res.read(), res.getheader('Content-type'), res.status))
+
class SocketlessRequestHandler(SimpleHTTPRequestHandler):
def __init__(self):