Skip to content

Commit 605064b

Browse files
Only add "l" to XX.htm URLs if XX.html exists
Fixes esp8266#6792 Only append the "l" to ".htm" when there actually is a ".html" file present. If not, fall-thru like before and try .gz through the normal paths.
1 parent bc60e97 commit 605064b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
102102
// Append whatever follows this URI in request to get the file path.
103103
path += requestUri.substring(_baseUriLength);
104104

105-
if (!_fs.exists(path) && path.endsWith(".htm")) {
105+
if (!_fs.exists(path) && path.endsWith(".htm") && _fs.exists(path + "l")) {
106106
path += "l";
107107
}
108108
}

0 commit comments

Comments
 (0)