summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httpservers.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-09-13 07:18:55 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-09-13 07:18:55 (GMT)
commitd4fac04fdee9947cac4d82407ba7d5f3b4bf8ee9 (patch)
tree2b4a53fddf0433a5bac19b034f4b60b81cd313f7 /Lib/test/test_httpservers.py
parentb06f536cb7456cbb40b869484fad10b391e04ef7 (diff)
downloadcpython-d4fac04fdee9947cac4d82407ba7d5f3b4bf8ee9.zip
cpython-d4fac04fdee9947cac4d82407ba7d5f3b4bf8ee9.tar.gz
cpython-d4fac04fdee9947cac4d82407ba7d5f3b4bf8ee9.tar.bz2
Fix SimpleHTTPServer's request handling case on trailing '/'.
Patch contributed by Vajrasky Kok. Addresses Issue #17324
Diffstat (limited to 'Lib/test/test_httpservers.py')
-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 5dcedc0..3f14360 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -313,6 +313,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)