forked from me-no-dev/ESPAsyncWebServer
disable some functions on ESP31B
This commit is contained in:
@@ -49,8 +49,10 @@ class AsyncStaticWebHandler: public AsyncWebHandler {
|
||||
AsyncStaticWebHandler& setCacheControl(const char* cache_control);
|
||||
AsyncStaticWebHandler& setLastModified(const char* last_modified);
|
||||
AsyncStaticWebHandler& setLastModified(struct tm* last_modified);
|
||||
#ifdef ESP8266
|
||||
AsyncStaticWebHandler& setLastModified(time_t last_modified);
|
||||
AsyncStaticWebHandler& setLastModified(); //sets to current time. Make sure sntp is runing and time is updated
|
||||
#endif
|
||||
};
|
||||
|
||||
class AsyncCallbackWebHandler: public AsyncWebHandler {
|
||||
|
@@ -67,7 +67,7 @@ AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(struct tm* last_mo
|
||||
strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified);
|
||||
return setLastModified((const char *)result);
|
||||
}
|
||||
|
||||
#ifdef ESP8266
|
||||
AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t last_modified){
|
||||
return setLastModified((struct tm *)gmtime(&last_modified));
|
||||
}
|
||||
@@ -78,7 +78,7 @@ AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(){
|
||||
return *this;
|
||||
return setLastModified(last_modified);
|
||||
}
|
||||
|
||||
#endif
|
||||
bool AsyncStaticWebHandler::canHandle(AsyncWebServerRequest *request)
|
||||
{
|
||||
if (request->method() == HTTP_GET &&
|
||||
|
Reference in New Issue
Block a user