Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
else {
_isFile = false;
}

DEBUGV("StaticRequestHandler: path=%s uri=%s isFile=%d, cache_header=%s\r\n", path, uri, _isFile, cache_header);
_baseUriLength = _uri.length();
}
Expand Down Expand Up @@ -132,6 +132,11 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
if (!f)
return false;

if (!f.isFile()) {
f.close();
return false;
}

if (_cache_header.length() != 0)
server.sendHeader("Cache-Control", _cache_header);

Expand Down