mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
fix behavior of trailing slash redirection when a query string is involved (closes #23112)
This commit is contained in:
parent
8c4e112afc
commit
94cb7a2429
3 changed files with 15 additions and 2 deletions
|
@ -305,6 +305,12 @@ class SimpleHTTPServerTestCase(BaseTestCase):
|
|||
self.check_status_and_reason(response, 200)
|
||||
response = self.request(self.tempdir_name)
|
||||
self.check_status_and_reason(response, 301)
|
||||
response = self.request(self.tempdir_name + '/?hi=2')
|
||||
self.check_status_and_reason(response, 200)
|
||||
response = self.request(self.tempdir_name + '?hi=1')
|
||||
self.check_status_and_reason(response, 301)
|
||||
self.assertEqual(response.getheader("Location"),
|
||||
self.tempdir_name + "/?hi=1")
|
||||
response = self.request('/ThisDoesNotExist')
|
||||
self.check_status_and_reason(response, 404)
|
||||
response = self.request('/' + 'ThisDoesNotExist' + '/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue