mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-13 11:44:29 +05:00
refactor: optimized work with etag
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
#include <FS.h>
|
#include <FS.h>
|
||||||
#include <detail/mimetable.h>
|
#include <detail/mimetable.h>
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
|
||||||
#include <detail/RequestHandlersImpl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace mime;
|
using namespace mime;
|
||||||
|
|
||||||
@@ -54,13 +51,6 @@ public:
|
|||||||
if (this->eTag.isEmpty()) {
|
if (this->eTag.isEmpty()) {
|
||||||
if (server._eTagFunction) {
|
if (server._eTagFunction) {
|
||||||
this->eTag = (server._eTagFunction)(*this->fs, this->path);
|
this->eTag = (server._eTagFunction)(*this->fs, this->path);
|
||||||
|
|
||||||
} else {
|
|
||||||
#if defined(ARDUINO_ARCH_ESP8266)
|
|
||||||
this->eTag = esp8266webserver::calcETag(*this->fs, this->path);
|
|
||||||
#elif defined(ARDUINO_ARCH_ESP32)
|
|
||||||
this->eTag = StaticRequestHandler::calcETag(*this->fs, this->path);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user