mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
url unquote the path before checking if it refers to a CGI script (closes #21766)
This commit is contained in:
parent
49991deb6e
commit
73b8b1cdb8
3 changed files with 9 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue