Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_httpservers.py @ 85671:1fcccbbe15e2 3.3
Fix http.server's request handling case on trailing '/'.
Patch contributed by Vajrasky Kok. Addresses Issue #17324
| author | Senthil Kumaran <senthil@uthcode.com> |
|---|---|
| date | Fri, 13 Sep 2013 00:21:18 -0700 |
| parents | 872ede983e7b |
| children | 691b3df5036b 544b654d000c b85c9d2a5227 |
line wrap: on
line diff
--- a/Lib/test/test_httpservers.py Fri Sep 13 07:46:40 2013 +0300 +++ b/Lib/test/test_httpservers.py Fri Sep 13 00:21:18 2013 -0700 @@ -249,6 +249,9 @@ #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)
