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)
|
if (requestMethod != HTTP_GET)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!requestUri.startsWith(_uri))
|
if (_isFile && requestUri != _uri || !requestUri.startsWith(_uri))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -88,11 +88,6 @@ public:
|
|||||||
// URI in request to get the file path.
|
// URI in request to get the file path.
|
||||||
path += requestUri.substring(_baseUriLength);
|
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);
|
DEBUGV("StaticRequestHandler::handle: path=%s, isFile=%d\r\n", path.c_str(), _isFile);
|
||||||
|
|
||||||
String contentType = getContentType(path);
|
String contentType = getContentType(path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user