mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
[web_server] Upgrade ESPAsync libraries (#8867)
This commit is contained in:
committed by
GitHub
parent
c612985930
commit
669ef7a0b1
@@ -75,7 +75,11 @@ void CaptivePortal::start() {
|
||||
|
||||
void CaptivePortal::handleRequest(AsyncWebServerRequest *req) {
|
||||
if (req->url() == "/") {
|
||||
#ifndef USE_ESP8266
|
||||
auto *response = req->beginResponse(200, "text/html", INDEX_GZ, sizeof(INDEX_GZ));
|
||||
#else
|
||||
auto *response = req->beginResponse_P(200, "text/html", INDEX_GZ, sizeof(INDEX_GZ));
|
||||
#endif
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
req->send(response);
|
||||
return;
|
||||
|
||||
@@ -40,7 +40,7 @@ class CaptivePortal : public AsyncWebHandler, public Component {
|
||||
#endif
|
||||
}
|
||||
|
||||
bool canHandle(AsyncWebServerRequest *request) override {
|
||||
bool canHandle(AsyncWebServerRequest *request) const override {
|
||||
if (!this->active_)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user