mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
spend more time understanding the logic
This commit is contained in:
parent
94a7f63cda
commit
bc48022118
@ -67,7 +67,7 @@ public:
|
||||
if (requestMethod != HTTP_GET)
|
||||
return false;
|
||||
|
||||
if (!requestUri.startsWith(_uri))
|
||||
if (_isFile && requestUri != _uri || !requestUri.startsWith(_uri))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -88,11 +88,6 @@ public:
|
||||
// URI in request to get the file path.
|
||||
path += requestUri.substring(_baseUriLength);
|
||||
}
|
||||
|
||||
else if (requestUri != _uri) {
|
||||
// Base URI points to a file but request doesn't match this URI exactly
|
||||
return false;
|
||||
}
|
||||
DEBUGV("StaticRequestHandler::handle: path=%s, isFile=%d\r\n", path.c_str(), _isFile);
|
||||
|
||||
String contentType = getContentType(path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user