Skip to content

Commit 0c1b6f9

Browse files
authored
Merge branch 'master' into dtostrf_to_printf
2 parents f762721 + dbd7b82 commit 0c1b6f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
110110
// Append whatever follows this URI in request to get the file path.
111111
path += requestUri.substring(_baseUriLength);
112112

113-
if (!_fs.exists(path) && path.endsWith(".htm") && _fs.exists(path + "l")) {
113+
// If neither <blah> nor <blah>.gz exist, and <blah> is a file.htm, try it with file.html instead
114+
// For the normal case this will give a search order of index.htm, index.htm.gz, index.html, index.html.gz
115+
if (!_fs.exists(path) && !_fs.exists(path + ".gz") && path.endsWith(".htm")) {
114116
path += "l";
115117
}
116118
}

0 commit comments

Comments
 (0)