summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-09-13 07:21:18 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-09-13 07:21:18 (GMT)
commit72c238e21ae78f8da969c46a2b7317ff9904d155 (patch)
treed79545c48462a5b81abc233044c026b8e2075678 /Lib/test
parent016af3f4d484d0e4f756bf0a505d0df3cbc444ed (diff)
downloadcpython-72c238e21ae78f8da969c46a2b7317ff9904d155.zip
cpython-72c238e21ae78f8da969c46a2b7317ff9904d155.tar.gz
cpython-72c238e21ae78f8da969c46a2b7317ff9904d155.tar.bz2
Fix http.server's request handling case on trailing '/'.
Patch contributed by Vajrasky Kok. Addresses Issue #17324
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_httpservers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 03c0776..b8bbcb6 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -249,6 +249,9 @@ class SimpleHTTPServerTestCase(BaseTestCase):
#constructs the path relative to the root directory of the HTTPServer
response = self.request(self.tempdir_name + '/test')
self.check_status_and_reason(response, 200, data=self.data)
+ # check for trailing "/" which should return 404. See Issue17324
+ response = self.request(self.tempdir_name + '/test/')
+ self.check_status_and_reason(response, 404)
response = self.request(self.tempdir_name + '/')
self.check_status_and_reason(response, 200)
response = self.request(self.tempdir_name)