mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-100474: Fix handling of dirs named index.html in http.server (GH-100505)
Co-authored-by: James Frost <git@frost.cx>
This commit is contained in:
parent
80013d78e0
commit
714a93f638
3 changed files with 6 additions and 1 deletions
|
@ -708,7 +708,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||
return None
|
||||
for index in "index.html", "index.htm":
|
||||
index = os.path.join(path, index)
|
||||
if os.path.exists(index):
|
||||
if os.path.isfile(index):
|
||||
path = index
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue