Skip to content

Commit 9f2cfb8

Browse files
gtalusandevyte
authored andcommitted
fallback onto index.html if index.htm fails (#2614)
1 parent dd73a18 commit 9f2cfb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
101101

102102
// Append whatever follows this URI in request to get the file path.
103103
path += requestUri.substring(_baseUriLength);
104+
105+
if (!_fs.exists(path) && path.endsWith(".htm")) {
106+
path += "l";
107+
}
104108
}
105109
DEBUGV("StaticRequestHandler::handle: path=%s, isFile=%d\r\n", path.c_str(), _isFile);
106110

0 commit comments

Comments
 (0)