mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
Fix serach order for index.htm(l)(.gz) files (#7069)
Fixes #6984 When a directory index is requested with an explicit index.html, follow the original webserver order and check for: index.htm, index.htm.gz, index.html, index.html.gz, in order. Fixes the regressions introduced in 9f2cfb8 and 6768116
This commit is contained in:
parent
56b90a2abb
commit
dbd7b8218d
@ -110,7 +110,9 @@ public:
|
||||
// Append whatever follows this URI in request to get the file path.
|
||||
path += requestUri.substring(_baseUriLength);
|
||||
|
||||
if (!_fs.exists(path) && path.endsWith(".htm") && _fs.exists(path + "l")) {
|
||||
// If neither <blah> nor <blah>.gz exist, and <blah> is a file.htm, try it with file.html instead
|
||||
// For the normal case this will give a search order of index.htm, index.htm.gz, index.html, index.html.gz
|
||||
if (!_fs.exists(path) && !_fs.exists(path + ".gz") && path.endsWith(".htm")) {
|
||||
path += "l";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user