diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-12-24 12:29:21 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-24 15:29:21 -0500 |
| commit | ecbf136702267857b261a81b64f234965b9de913 (patch) | |
| tree | 0b8abfe83eb45eb150c5463d8bbb1bdbf79b2058 /Lib/test/test_httpservers.py | |
| parent | 0dea92409e291cd61135d509204f60c46f6dfc0b (diff) | |
| download | cpython-git-ecbf136702267857b261a81b64f234965b9de913.tar.gz | |
[3.10] gh-100474: Fix handling of dirs named index.html in http.server (GH-100504)
Co-authored-by: James Frost <git@frost.cx>
Diffstat (limited to 'Lib/test/test_httpservers.py')
| -rw-r--r-- | Lib/test/test_httpservers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index ac8da494e9..a5f787ff48 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -488,6 +488,9 @@ class SimpleHTTPServerTestCase(BaseTestCase): self.check_status_and_reason(response, HTTPStatus.NOT_FOUND) response = self.request('/' + 'ThisDoesNotExist' + '/') self.check_status_and_reason(response, HTTPStatus.NOT_FOUND) + os.makedirs(os.path.join(self.tempdir, 'spam', 'index.html')) + response = self.request(self.base_url + '/spam/') + self.check_status_and_reason(response, HTTPStatus.OK) data = b"Dummy index file\r\n" with open(os.path.join(self.tempdir_name, 'index.html'), 'wb') as f: |
