diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-15 01:36:29 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-15 01:36:29 (GMT) |
commit | 8d24d77c63bdbf25d68bf0a6cad408d06abf2d00 (patch) | |
tree | 31f600e2a4e6d8d72191552d2a09f411604655d3 /Lib/test/test_httpservers.py | |
parent | ce817cb36d7e8764b5ddecadea4b02276879d631 (diff) | |
download | cpython-8d24d77c63bdbf25d68bf0a6cad408d06abf2d00.zip cpython-8d24d77c63bdbf25d68bf0a6cad408d06abf2d00.tar.gz cpython-8d24d77c63bdbf25d68bf0a6cad408d06abf2d00.tar.bz2 |
url unquote the path before checking if it refers to a CGI script (closes #21766)
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r-- | Lib/test/test_httpservers.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 2390c70..6a23bb2 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -510,6 +510,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 SimpleHTTPRequestHandlerTestCase(unittest.TestCase): """ Test url parsing """ |