diff --git a/.github/scripts/install-arduino-core-esp32.sh b/.github/scripts/install-arduino-core-esp32.sh index cf1026d6a..3fb4203c5 100755 --- a/.github/scripts/install-arduino-core-esp32.sh +++ b/.github/scripts/install-arduino-core-esp32.sh @@ -8,11 +8,11 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then cd "$ARDUINO_USR_PATH/hardware/espressif" echo "Installing Python Serial ..." - pip install pyserial > /dev/null + pip3 install pyserial > /dev/null if [ "$OS_IS_WINDOWS" == "1" ]; then echo "Installing Python Requests ..." - pip install requests > /dev/null + pip3 install requests > /dev/null fi if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then @@ -28,7 +28,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then git submodule update --init --recursive > /dev/null 2>&1 echo "Installing Platform Tools ..." - cd tools && python get.py + cd tools && python3 get.py cd $script_init_path echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'" diff --git a/.github/scripts/install-arduino-core-esp8266.sh b/.github/scripts/install-arduino-core-esp8266.sh index 048cd0246..db9d56ca7 100644 --- a/.github/scripts/install-arduino-core-esp8266.sh +++ b/.github/scripts/install-arduino-core-esp8266.sh @@ -6,11 +6,11 @@ mkdir -p "$ARDUINO_USR_PATH/hardware/esp8266com" cd "$ARDUINO_USR_PATH/hardware/esp8266com" echo "Installing Python Serial ..." -pip install pyserial > /dev/null +pip3 install pyserial > /dev/null if [ "$OS_IS_WINDOWS" == "1" ]; then echo "Installing Python Requests ..." - pip install requests > /dev/null + pip3 install requests > /dev/null fi echo "Cloning Core Repository ..." @@ -22,7 +22,7 @@ git submodule update --init --recursive > /dev/null 2>&1 echo "Installing Platform Tools ..." cd tools -python get.py > /dev/null +python3 get.py > /dev/null cd $script_init_path echo "ESP8266 Arduino has been installed in '$ARDUINO_USR_PATH/hardware/esp8266com'" diff --git a/.github/scripts/install-arduino-ide.sh b/.github/scripts/install-arduino-ide.sh index ce60cb82f..584cc68dc 100755 --- a/.github/scripts/install-arduino-ide.sh +++ b/.github/scripts/install-arduino-ide.sh @@ -52,12 +52,12 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then echo "Installing Arduino IDE on $OS_NAME ..." echo "Downloading 'arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT' to 'arduino.$ARCHIVE_FORMAT' ..." if [ "$OS_IS_LINUX" == "1" ]; then - wget -O "arduino.$ARCHIVE_FORMAT" "https://www.arduino.cc/download.php?f=/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 + wget -O "arduino.$ARCHIVE_FORMAT" "https://downloads.arduino.cc/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 echo "Extracting 'arduino.$ARCHIVE_FORMAT' ..." tar xf "arduino.$ARCHIVE_FORMAT" > /dev/null mv arduino-nightly "$ARDUINO_IDE_PATH" else - curl -o "arduino.$ARCHIVE_FORMAT" -L "https://www.arduino.cc/download.php?f=/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 + curl -o "arduino.$ARCHIVE_FORMAT" -L "https://downloads.arduino.cc/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 echo "Extracting 'arduino.$ARCHIVE_FORMAT' ..." unzip "arduino.$ARCHIVE_FORMAT" > /dev/null if [ "$OS_IS_MACOS" == "1" ]; then diff --git a/.github/scripts/install-platformio.sh b/.github/scripts/install-platformio.sh index 594948ea4..35b5f2de1 100644 --- a/.github/scripts/install-platformio.sh +++ b/.github/scripts/install-platformio.sh @@ -1,10 +1,10 @@ #!/bin/bash echo "Installing Python Wheel ..." -pip install wheel > /dev/null 2>&1 +pip3 install wheel > /dev/null 2>&1 echo "Installing PlatformIO ..." -pip install -U platformio > /dev/null 2>&1 +pip3 install -U platformio > /dev/null 2>&1 echo "PlatformIO has been installed" echo "" @@ -23,7 +23,7 @@ function build_pio_sketch(){ # build_pio_sketch diff --git a/.github/scripts/on-push.sh b/.github/scripts/on-push.sh index 96fff573e..12a73a289 100755 --- a/.github/scripts/on-push.sh +++ b/.github/scripts/on-push.sh @@ -31,7 +31,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then source ./.github/scripts/install-arduino-ide.sh echo "Installing ESPAsyncWebServer ..." - cp -rf "$GITHUB_WORKSPACE" "$ARDUINO_USR_PATH/libraries/ESPAsyncWebServer" + cp -af "$GITHUB_WORKSPACE/src" "$ARDUINO_USR_PATH/libraries/ESPAsyncWebServer" echo "Installing ArduinoJson ..." git clone https://github.com/bblanchon/ArduinoJson "$ARDUINO_USR_PATH/libraries/ArduinoJson" > /dev/null 2>&1 @@ -53,18 +53,18 @@ else # PlatformIO Test source ./.github/scripts/install-platformio.sh - python -m platformio lib --storage-dir "$GITHUB_WORKSPACE" install + python3 -m platformio lib --storage-dir "$GITHUB_WORKSPACE" install echo "Installing ArduinoJson ..." - python -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git > /dev/null 2>&1 + python3 -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git > /dev/null 2>&1 if [[ "$TARGET_PLATFORM" == "esp32" ]]; then BOARD="esp32dev" echo "Installing AsyncTCP ..." - python -m platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git > /dev/null 2>&1 + python3 -m platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git > /dev/null 2>&1 echo "BUILDING ESP32 EXAMPLES" else BOARD="esp12e" echo "Installing ESPAsyncTCP ..." - python -m platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git > /dev/null 2>&1 + python3 -m platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git > /dev/null 2>&1 echo "BUILDING ESP8266 EXAMPLES" fi build_pio_sketches "$BOARD" "$GITHUB_WORKSPACE/examples" diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index abdea4627..50d62e167 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,11 +13,12 @@ jobs: name: Arduino for ${{ matrix.board }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] board: [esp32, esp8266] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3.0.2 - name: Build Tests run: bash ./.github/scripts/on-push.sh ${{ matrix.board }} 0 1 @@ -25,10 +26,11 @@ jobs: name: PlatformIO for ${{ matrix.board }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] board: [esp32, esp8266] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3.0.2 - name: Build Tests run: bash ./.github/scripts/on-push.sh ${{ matrix.board }} 1 1 diff --git a/.gitignore b/.gitignore index a0f0e5386..25abe6e5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .vscode .DS_Store +/dist/ + diff --git a/README.md b/README.md index d6dd3206a..0b512b86a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# ESPAsyncWebServer +# ESPAsyncWebServer [![Build Status](https://travis-ci.org/me-no-dev/ESPAsyncWebServer.svg?branch=master)](https://travis-ci.org/me-no-dev/ESPAsyncWebServer) ![](https://github.com/me-no-dev/ESPAsyncWebServer/workflows/ESP%20Async%20Web%20Server%20CI/badge.svg) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/395dd42cfc674e6ca2e326af3af80ffc)](https://www.codacy.com/manual/me-no-dev/ESPAsyncWebServer?utm_source=github.com&utm_medium=referral&utm_content=me-no-dev/ESPAsyncWebServer&utm_campaign=Badge_Grade) +A fork of the [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) library by [@me-no-dev](https://github.com/me-no-dev) for [ESPHome](https://esphome.io). + For help and support [![Join the chat at https://gitter.im/me-no-dev/ESPAsyncWebServer](https://badges.gitter.im/me-no-dev/ESPAsyncWebServer.svg)](https://gitter.im/me-no-dev/ESPAsyncWebServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Async HTTP and WebSocket Server for ESP8266 Arduino @@ -524,56 +526,6 @@ response->addHeader("Server","ESP Async Web Server"); request->send(response); ``` -### Respond with content coming from a File -```cpp -//Send index.htm with default content type -request->send(SPIFFS, "/index.htm"); - -//Send index.htm as text -request->send(SPIFFS, "/index.htm", "text/plain"); - -//Download index.htm -request->send(SPIFFS, "/index.htm", String(), true); -``` - -### Respond with content coming from a File and extra headers -```cpp -//Send index.htm with default content type -AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/index.htm"); - -//Send index.htm as text -AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/index.htm", "text/plain"); - -//Download index.htm -AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/index.htm", String(), true); - -response->addHeader("Server","ESP Async Web Server"); -request->send(response); -``` - -### Respond with content coming from a File containing templates -Internally uses [Chunked Response](#chunked-response). - -Index.htm contents: -``` -%HELLO_FROM_TEMPLATE% -``` - -Somewhere in source files: -```cpp -String processor(const String& var) -{ - if(var == "HELLO_FROM_TEMPLATE") - return F("Hello world!"); - return String(); -} - -// ... - -//Send index.htm with template processor function -request->send(SPIFFS, "/index.htm", String(), false, processor); -``` - ### Respond with content using a callback ```cpp //send 128 bytes as plain text @@ -771,41 +723,6 @@ response->setLength(); request->send(response); ``` -## Serving static files -In addition to serving files from SPIFFS as described above, the server provide a dedicated handler that optimize the -performance of serving files from SPIFFS - ```AsyncStaticWebHandler```. Use ```server.serveStatic()``` function to -initialize and add a new instance of ```AsyncStaticWebHandler``` to the server. -The Handler will not handle the request if the file does not exists, e.g. the server will continue to look for another -handler that can handle the request. -Notice that you can chain setter functions to setup the handler, or keep a pointer to change it at a later time. - -### Serving specific file by name -```cpp -// Serve the file "/www/page.htm" when request url is "/page.htm" -server.serveStatic("/page.htm", SPIFFS, "/www/page.htm"); -``` - -### Serving files in directory -To serve files in a directory, the path to the files should specify a directory in SPIFFS and ends with "/". -```cpp -// Serve files in directory "/www/" when request url starts with "/" -// Request to the root or none existing files will try to server the defualt -// file name "index.htm" if exists -server.serveStatic("/", SPIFFS, "/www/"); - -// Server with different default file -server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("default.html"); -``` - -### Serving static files with authentication - -```cpp -server - .serveStatic("/", SPIFFS, "/www/") - .setDefaultFile("default.html") - .setAuthentication("user", "pass"); -``` - ### Specifying Cache-Control header It is possible to specify Cache-Control header value to reduce the number of calls to the server once the client loaded the files. For more information on Cache-Control values see [Cache-Control](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) @@ -918,20 +835,6 @@ Two filter callback are provided for convince: * `ON_STA_FILTER` - return true when requests are made to the STA (station mode) interface. * `ON_AP_FILTER` - return true when requests are made to the AP (access point) interface. -### Serve different site files in AP mode -```cpp -server.serveStatic("/", SPIFFS, "/www/").setFilter(ON_STA_FILTER); -server.serveStatic("/", SPIFFS, "/ap/").setFilter(ON_AP_FILTER); -``` - -### Rewrite to different index on AP -```cpp -// Serve the file "/www/index-ap.htm" in AP, and the file "/www/index.htm" on STA -server.rewrite("/", "index.htm"); -server.rewrite("/index.htm", "index-ap.htm").setFilter(ON_AP_FILTER); -server.serveStatic("/", SPIFFS, "/www/"); -``` - ### Serving different hosts ```cpp // Filter callback using request host @@ -1358,9 +1261,6 @@ void setup(){ } }); - // attach filesystem root at URL /fs - server.serveStatic("/fs", SPIFFS, "/"); - // Catch-All Handlers // Any request that can not find a Handler that canHandle it // ends in the callbacks below. @@ -1443,9 +1343,6 @@ Example of OTA code ```cpp // OTA callbacks ArduinoOTA.onStart([]() { - // Clean SPIFFS - SPIFFS.end(); - // Disable client connections ws.enable(false); diff --git a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino b/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino deleted file mode 100644 index bf42d0038..000000000 --- a/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino +++ /dev/null @@ -1,221 +0,0 @@ -#include -#ifdef ESP32 -#include -#include -#include -#include -#include -#elif defined(ESP8266) -#include -#include -#include -#endif -#include -#include - -// SKETCH BEGIN -AsyncWebServer server(80); -AsyncWebSocket ws("/ws"); -AsyncEventSource events("/events"); - -void onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len){ - if(type == WS_EVT_CONNECT){ - Serial.printf("ws[%s][%u] connect\n", server->url(), client->id()); - client->printf("Hello Client %u :)", client->id()); - client->ping(); - } else if(type == WS_EVT_DISCONNECT){ - Serial.printf("ws[%s][%u] disconnect\n", server->url(), client->id()); - } else if(type == WS_EVT_ERROR){ - Serial.printf("ws[%s][%u] error(%u): %s\n", server->url(), client->id(), *((uint16_t*)arg), (char*)data); - } else if(type == WS_EVT_PONG){ - Serial.printf("ws[%s][%u] pong[%u]: %s\n", server->url(), client->id(), len, (len)?(char*)data:""); - } else if(type == WS_EVT_DATA){ - AwsFrameInfo * info = (AwsFrameInfo*)arg; - String msg = ""; - if(info->final && info->index == 0 && info->len == len){ - //the whole message is in a single frame and we got all of it's data - Serial.printf("ws[%s][%u] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len); - - if(info->opcode == WS_TEXT){ - for(size_t i=0; i < info->len; i++) { - msg += (char) data[i]; - } - } else { - char buff[3]; - for(size_t i=0; i < info->len; i++) { - sprintf(buff, "%02x ", (uint8_t) data[i]); - msg += buff ; - } - } - Serial.printf("%s\n",msg.c_str()); - - if(info->opcode == WS_TEXT) - client->text("I got your text message"); - else - client->binary("I got your binary message"); - } else { - //message is comprised of multiple frames or the frame is split into multiple packets - if(info->index == 0){ - if(info->num == 0) - Serial.printf("ws[%s][%u] %s-message start\n", server->url(), client->id(), (info->message_opcode == WS_TEXT)?"text":"binary"); - Serial.printf("ws[%s][%u] frame[%u] start[%llu]\n", server->url(), client->id(), info->num, info->len); - } - - Serial.printf("ws[%s][%u] frame[%u] %s[%llu - %llu]: ", server->url(), client->id(), info->num, (info->message_opcode == WS_TEXT)?"text":"binary", info->index, info->index + len); - - if(info->opcode == WS_TEXT){ - for(size_t i=0; i < len; i++) { - msg += (char) data[i]; - } - } else { - char buff[3]; - for(size_t i=0; i < len; i++) { - sprintf(buff, "%02x ", (uint8_t) data[i]); - msg += buff ; - } - } - Serial.printf("%s\n",msg.c_str()); - - if((info->index + len) == info->len){ - Serial.printf("ws[%s][%u] frame[%u] end[%llu]\n", server->url(), client->id(), info->num, info->len); - if(info->final){ - Serial.printf("ws[%s][%u] %s-message end\n", server->url(), client->id(), (info->message_opcode == WS_TEXT)?"text":"binary"); - if(info->message_opcode == WS_TEXT) - client->text("I got your text message"); - else - client->binary("I got your binary message"); - } - } - } - } -} - - -const char* ssid = "*******"; -const char* password = "*******"; -const char * hostName = "esp-async"; -const char* http_username = "admin"; -const char* http_password = "admin"; - -void setup(){ - Serial.begin(115200); - Serial.setDebugOutput(true); - WiFi.mode(WIFI_AP_STA); - WiFi.softAP(hostName); - WiFi.begin(ssid, password); - if (WiFi.waitForConnectResult() != WL_CONNECTED) { - Serial.printf("STA: Failed!\n"); - WiFi.disconnect(false); - delay(1000); - WiFi.begin(ssid, password); - } - - //Send OTA events to the browser - ArduinoOTA.onStart([]() { events.send("Update Start", "ota"); }); - ArduinoOTA.onEnd([]() { events.send("Update End", "ota"); }); - ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { - char p[32]; - sprintf(p, "Progress: %u%%\n", (progress/(total/100))); - events.send(p, "ota"); - }); - ArduinoOTA.onError([](ota_error_t error) { - if(error == OTA_AUTH_ERROR) events.send("Auth Failed", "ota"); - else if(error == OTA_BEGIN_ERROR) events.send("Begin Failed", "ota"); - else if(error == OTA_CONNECT_ERROR) events.send("Connect Failed", "ota"); - else if(error == OTA_RECEIVE_ERROR) events.send("Recieve Failed", "ota"); - else if(error == OTA_END_ERROR) events.send("End Failed", "ota"); - }); - ArduinoOTA.setHostname(hostName); - ArduinoOTA.begin(); - - MDNS.addService("http","tcp",80); - - SPIFFS.begin(); - - ws.onEvent(onWsEvent); - server.addHandler(&ws); - - events.onConnect([](AsyncEventSourceClient *client){ - client->send("hello!",NULL,millis(),1000); - }); - server.addHandler(&events); - -#ifdef ESP32 - server.addHandler(new SPIFFSEditor(SPIFFS, http_username,http_password)); -#elif defined(ESP8266) - server.addHandler(new SPIFFSEditor(http_username,http_password)); -#endif - - server.on("/heap", HTTP_GET, [](AsyncWebServerRequest *request){ - request->send(200, "text/plain", String(ESP.getFreeHeap())); - }); - - server.serveStatic("/", SPIFFS, "/").setDefaultFile("index.htm"); - - server.onNotFound([](AsyncWebServerRequest *request){ - Serial.printf("NOT_FOUND: "); - if(request->method() == HTTP_GET) - Serial.printf("GET"); - else if(request->method() == HTTP_POST) - Serial.printf("POST"); - else if(request->method() == HTTP_DELETE) - Serial.printf("DELETE"); - else if(request->method() == HTTP_PUT) - Serial.printf("PUT"); - else if(request->method() == HTTP_PATCH) - Serial.printf("PATCH"); - else if(request->method() == HTTP_HEAD) - Serial.printf("HEAD"); - else if(request->method() == HTTP_OPTIONS) - Serial.printf("OPTIONS"); - else - Serial.printf("UNKNOWN"); - Serial.printf(" http://%s%s\n", request->host().c_str(), request->url().c_str()); - - if(request->contentLength()){ - Serial.printf("_CONTENT_TYPE: %s\n", request->contentType().c_str()); - Serial.printf("_CONTENT_LENGTH: %u\n", request->contentLength()); - } - - int headers = request->headers(); - int i; - for(i=0;igetHeader(i); - Serial.printf("_HEADER[%s]: %s\n", h->name().c_str(), h->value().c_str()); - } - - int params = request->params(); - for(i=0;igetParam(i); - if(p->isFile()){ - Serial.printf("_FILE[%s]: %s, size: %u\n", p->name().c_str(), p->value().c_str(), p->size()); - } else if(p->isPost()){ - Serial.printf("_POST[%s]: %s\n", p->name().c_str(), p->value().c_str()); - } else { - Serial.printf("_GET[%s]: %s\n", p->name().c_str(), p->value().c_str()); - } - } - - request->send(404); - }); - server.onFileUpload([](AsyncWebServerRequest *request, const String& filename, size_t index, uint8_t *data, size_t len, bool final){ - if(!index) - Serial.printf("UploadStart: %s\n", filename.c_str()); - Serial.printf("%s", (const char*)data); - if(final) - Serial.printf("UploadEnd: %s (%u)\n", filename.c_str(), index+len); - }); - server.onRequestBody([](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total){ - if(!index) - Serial.printf("BodyStart: %u\n", total); - Serial.printf("%s", (const char*)data); - if(index + len == total) - Serial.printf("BodyEnd: %u\n", total); - }); - server.begin(); -} - -void loop(){ - ArduinoOTA.handle(); - ws.cleanupClients(); -} diff --git a/examples/ESP_AsyncFSBrowser/data/.exclude.files b/examples/ESP_AsyncFSBrowser/data/.exclude.files deleted file mode 100644 index 955397fa2..000000000 --- a/examples/ESP_AsyncFSBrowser/data/.exclude.files +++ /dev/null @@ -1,2 +0,0 @@ -/*.js.gz -/.exclude.files diff --git a/examples/ESP_AsyncFSBrowser/data/ace.js.gz b/examples/ESP_AsyncFSBrowser/data/ace.js.gz deleted file mode 100644 index 7b175c1c9..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/ace.js.gz and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/ext-searchbox.js.gz b/examples/ESP_AsyncFSBrowser/data/ext-searchbox.js.gz deleted file mode 100644 index cf5b49f6f..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/ext-searchbox.js.gz and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/favicon.ico b/examples/ESP_AsyncFSBrowser/data/favicon.ico deleted file mode 100644 index 71b25fe6e..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/favicon.ico and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/index.htm b/examples/ESP_AsyncFSBrowser/data/index.htm deleted file mode 100644 index 28f47e995..000000000 --- a/examples/ESP_AsyncFSBrowser/data/index.htm +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - WebSocketTester - - - - -

-    
- $ -
- - diff --git a/examples/ESP_AsyncFSBrowser/data/mode-css.js.gz b/examples/ESP_AsyncFSBrowser/data/mode-css.js.gz deleted file mode 100644 index ebd6fe940..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/mode-css.js.gz and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/mode-html.js.gz b/examples/ESP_AsyncFSBrowser/data/mode-html.js.gz deleted file mode 100644 index 26b535328..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/mode-html.js.gz and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/mode-javascript.js.gz b/examples/ESP_AsyncFSBrowser/data/mode-javascript.js.gz deleted file mode 100644 index c0451c1c5..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/mode-javascript.js.gz and /dev/null differ diff --git a/examples/ESP_AsyncFSBrowser/data/worker-html.js.gz b/examples/ESP_AsyncFSBrowser/data/worker-html.js.gz deleted file mode 100644 index ec8aa87a9..000000000 Binary files a/examples/ESP_AsyncFSBrowser/data/worker-html.js.gz and /dev/null differ diff --git a/library.json b/library.json index 556592793..effdba39c 100644 --- a/library.json +++ b/library.json @@ -1,33 +1,39 @@ { - "name":"ESP Async WebServer", + "name":"ESPAsyncWebServer-esphome", "description":"Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32", "keywords":"http,async,websocket,webserver", "authors": { - "name": "Hristo Gochkov", + "name": "ESPHome Team", "maintainer": true }, "repository": { "type": "git", - "url": "https://github.com/me-no-dev/ESPAsyncWebServer.git" + "url": "https://github.com/esphome/ESPAsyncWebServer.git" }, - "version": "1.2.3", + "version": "3.2.0", "license": "LGPL-3.0", "frameworks": "arduino", - "platforms": ["espressif8266", "espressif32"], + "platforms": ["espressif8266", "espressif32", "libretiny"], "dependencies": [ { - "name": "ESPAsyncTCP", + "owner": "esphome", + "name": "ESPAsyncTCP-esphome", "platforms": "espressif8266" }, { - "name": "AsyncTCP", - "platforms": "espressif32" + "owner": "esphome", + "name": "AsyncTCP-esphome", + "platforms": ["espressif32", "libretiny"] }, { "name": "Hash", "platforms": "espressif8266" + }, + { + "name": "ESP8266WiFi", + "platforms": "espressif8266" } ] } diff --git a/library.properties b/library.properties deleted file mode 100644 index 401b04173..000000000 --- a/library.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=ESP Async WebServer -version=1.2.3 -author=Me-No-Dev -maintainer=Me-No-Dev -sentence=Async Web Server for ESP8266 and ESP31B -paragraph=Async Web Server for ESP8266 and ESP31B -category=Other -url=https://github.com/me-no-dev/ESPAsyncWebServer -architectures=* diff --git a/src/AsyncEventSource.cpp b/src/AsyncEventSource.cpp index f2914df54..5473f0857 100644 --- a/src/AsyncEventSource.cpp +++ b/src/AsyncEventSource.cpp @@ -138,15 +138,16 @@ size_t AsyncEventSourceMessage::ack(size_t len, uint32_t time) { } size_t AsyncEventSourceMessage::send(AsyncClient *client) { + if (!client->canSend()) + return 0; const size_t len = _len - _sent; if(client->space() < len){ return 0; } size_t sent = client->add((const char *)_data, len); - if(client->canSend()) - client->send(); + client->send(); _sent += sent; - return sent; + return sent; } // Client @@ -159,7 +160,7 @@ AsyncEventSourceClient::AsyncEventSourceClient(AsyncWebServerRequest *request, A _lastId = 0; if(request->hasHeader("Last-Event-ID")) _lastId = atoi(request->getHeader("Last-Event-ID")->value().c_str()); - + _client->setRxTimeout(0); _client->onError(NULL, NULL); _client->onAck([](void *r, AsyncClient* c, size_t len, uint32_t time){ (void)c; ((AsyncEventSourceClient*)(r))->_onAck(len, time); }, this); @@ -235,6 +236,17 @@ void AsyncEventSourceClient::send(const char *message, const char *event, uint32 } void AsyncEventSourceClient::_runQueue(){ +#if defined(ESP32) + if(!this->_messageQueue_mutex.try_lock()) { + return; + } +#else + if(this->_messageQueue_processing){ + return; + } + this->_messageQueue_processing = true; +#endif // ESP32 + while(!_messageQueue.isEmpty() && _messageQueue.front()->finished()){ _messageQueue.remove(_messageQueue.front()); } @@ -244,6 +256,12 @@ void AsyncEventSourceClient::_runQueue(){ if(!(*i)->sent()) (*i)->send(_client); } + +#if defined(ESP32) + this->_messageQueue_mutex.unlock(); +#else + this->_messageQueue_processing = false; +#endif // ESP32 } @@ -276,7 +294,7 @@ void AsyncEventSource::_addClient(AsyncEventSourceClient * client){ client->write((const char *)temp, 2053); free(temp); }*/ - + _clients.add(client); if(_connectcb) _connectcb(client); @@ -297,10 +315,10 @@ void AsyncEventSource::close(){ size_t AsyncEventSource::avgPacketsWaiting() const { if(_clients.isEmpty()) return 0; - + size_t aql=0; uint32_t nConnectedClients=0; - + for(const auto &c: _clients){ if(c->connected()) { aql+=c->packetsWaiting(); diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index b097fa623..e16776eeb 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -21,13 +21,21 @@ #define ASYNCEVENTSOURCE_H_ #include -#ifdef ESP32 +#include +#if defined(ESP32) || defined(LIBRETINY) #include -#define SSE_MAX_QUEUED_MESSAGES 32 #else #include -#define SSE_MAX_QUEUED_MESSAGES 8 #endif + +#if defined(ESP32) +#include +#endif // ESP32 + +#ifndef SSE_MAX_QUEUED_MESSAGES +#define SSE_MAX_QUEUED_MESSAGES 32 +#endif + #include #include "AsyncWebSynchronization.h" @@ -39,7 +47,7 @@ #endif #endif -#ifdef ESP32 +#if defined(ESP32) || defined(LIBRETINY) #define DEFAULT_MAX_SSE_CLIENTS 8 #else #define DEFAULT_MAX_SSE_CLIENTS 4 @@ -52,11 +60,11 @@ typedef std::function ArEventHandlerFuncti class AsyncEventSourceMessage { private: - uint8_t * _data; + uint8_t * _data; size_t _len; size_t _sent; //size_t _ack; - size_t _acked; + size_t _acked; public: AsyncEventSourceMessage(const char * data, size_t len); ~AsyncEventSourceMessage(); @@ -71,6 +79,11 @@ class AsyncEventSourceClient { AsyncClient *_client; AsyncEventSource *_server; uint32_t _lastId; +#if defined(ESP32) + std::mutex _messageQueue_mutex; +#else + bool _messageQueue_processing; +#endif // ESP32 LinkedList _messageQueue; void _queueMessage(AsyncEventSourceMessage *dataMessage); void _runQueue(); @@ -90,7 +103,7 @@ class AsyncEventSourceClient { //system callbacks (do not call) void _onAck(size_t len, uint32_t time); - void _onPoll(); + void _onPoll(); void _onTimeout(uint32_t time); void _onDisconnect(); }; diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index 52dcd75f0..6e88da94f 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -24,18 +24,8 @@ #include #ifndef ESP8266 -extern "C" { -typedef struct { - uint32_t state[5]; - uint32_t count[2]; - unsigned char buffer[64]; -} SHA1_CTX; - -void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); -void SHA1Init(SHA1_CTX* context); -void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); -void SHA1Final(unsigned char digest[20], SHA1_CTX* context); -} +#include "mbedtls/sha1.h" +#include "mbedtls/version.h" #else #include #endif @@ -112,10 +102,7 @@ size_t webSocketSendFrame(AsyncClient *client, bool final, uint8_t opcode, bool return 0; } } - if(!client->send()){ - //os_printf("error sending frame: %lu\n", headLen+len); - return 0; - } + if (!client->send()) return 0; return len; } @@ -135,7 +122,7 @@ AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer() } -AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(uint8_t * data, size_t size) +AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(uint8_t * data, size_t size) :_data(nullptr) ,_len(size) ,_lock(false) @@ -143,14 +130,14 @@ AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(uint8_t * data, size_t { if (!data) { - return; + return; } _data = new uint8_t[_len + 1]; if (_data) { memcpy(_data, data, _len); - _data[_len] = 0; + _data[_len] = 0; } } @@ -161,12 +148,12 @@ AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(size_t size) ,_lock(false) ,_count(0) { - _data = new uint8_t[_len + 1]; + _data = new uint8_t[_len + 1]; if (_data) { - _data[_len] = 0; + _data[_len] = 0; } - + } AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(const AsyncWebSocketMessageBuffer & copy) @@ -180,13 +167,13 @@ AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(const AsyncWebSocketMes _count = 0; if (_len) { - _data = new uint8_t[_len + 1]; - _data[_len] = 0; - } + _data = new uint8_t[_len + 1]; + _data[_len] = 0; + } if (_data) { memcpy(_data, copy._data, _len); - _data[_len] = 0; + _data[_len] = 0; } } @@ -202,35 +189,35 @@ AsyncWebSocketMessageBuffer::AsyncWebSocketMessageBuffer(AsyncWebSocketMessageBu _count = 0; if (copy._data) { - _data = copy._data; - copy._data = nullptr; - } + _data = copy._data; + copy._data = nullptr; + } } AsyncWebSocketMessageBuffer::~AsyncWebSocketMessageBuffer() { if (_data) { - delete[] _data; + delete[] _data; } } -bool AsyncWebSocketMessageBuffer::reserve(size_t size) +bool AsyncWebSocketMessageBuffer::reserve(size_t size) { - _len = size; + _len = size; if (_data) { delete[] _data; - _data = nullptr; + _data = nullptr; } _data = new uint8_t[_len + 1]; if (_data) { _data[_len] = 0; - return true; + return true; } else { - return false; + return false; } } @@ -311,7 +298,7 @@ AsyncWebSocketBasicMessage::AsyncWebSocketBasicMessage(uint8_t opcode, bool mask { _opcode = opcode & 0x07; _mask = mask; - + } @@ -366,17 +353,17 @@ AsyncWebSocketBasicMessage::~AsyncWebSocketBasicMessage() { return sent; } -// bool AsyncWebSocketBasicMessage::reserve(size_t size) { +// bool AsyncWebSocketBasicMessage::reserve(size_t size) { // if (size) { // _data = (uint8_t*)malloc(size +1); // if (_data) { -// memset(_data, 0, size); -// _len = size; +// memset(_data, 0, size); +// _len = size; // _status = WS_MSG_SENDING; -// return true; +// return true; // } // } -// return false; +// return false; // } @@ -397,22 +384,22 @@ AsyncWebSocketMultiMessage::AsyncWebSocketMultiMessage(AsyncWebSocketMessageBuff _mask = mask; if (buffer) { - _WSbuffer = buffer; - (*_WSbuffer)++; - _data = buffer->get(); - _len = buffer->length(); + _WSbuffer = buffer; + (*_WSbuffer)++; + _data = buffer->get(); + _len = buffer->length(); _status = WS_MSG_SENDING; //ets_printf("M: %u\n", _len); } else { _status = WS_MSG_ERROR; } - -} + +} AsyncWebSocketMultiMessage::~AsyncWebSocketMultiMessage() { if (_WSbuffer) { - (*_WSbuffer)--; // decreases the counter. + (*_WSbuffer)--; // decreases the counter. } } @@ -522,7 +509,7 @@ void AsyncWebSocketClient::_onAck(size_t len, uint32_t time){ if(len && !_messageQueue.isEmpty()){ _messageQueue.front()->ack(len, time); } - _server->_cleanBuffers(); + _server->_cleanBuffers(); _runQueue(); } @@ -829,9 +816,9 @@ void AsyncWebSocketClient::binary(const __FlashStringHelper *data, size_t len){ for(size_t b=0; bremoteIP(); } @@ -881,7 +868,7 @@ void AsyncWebSocket::_addClient(AsyncWebSocketClient * client){ } void AsyncWebSocket::_handleDisconnect(AsyncWebSocketClient * client){ - + _clients.remove_first([=](AsyncWebSocketClient * c){ return c->id() == client->id(); }); @@ -958,20 +945,20 @@ void AsyncWebSocket::text(uint32_t id, const char * message, size_t len){ void AsyncWebSocket::textAll(AsyncWebSocketMessageBuffer * buffer){ if (!buffer) return; - buffer->lock(); + buffer->lock(); for(const auto& c: _clients){ if(c->status() == WS_CONNECTED){ c->text(buffer); } } buffer->unlock(); - _cleanBuffers(); + _cleanBuffers(); } void AsyncWebSocket::textAll(const char * message, size_t len){ - AsyncWebSocketMessageBuffer * WSBuffer = makeBuffer((uint8_t *)message, len); - textAll(WSBuffer); + AsyncWebSocketMessageBuffer * WSBuffer = makeBuffer((uint8_t *)message, len); + textAll(WSBuffer); } void AsyncWebSocket::binary(uint32_t id, const char * message, size_t len){ @@ -981,20 +968,20 @@ void AsyncWebSocket::binary(uint32_t id, const char * message, size_t len){ } void AsyncWebSocket::binaryAll(const char * message, size_t len){ - AsyncWebSocketMessageBuffer * buffer = makeBuffer((uint8_t *)message, len); - binaryAll(buffer); + AsyncWebSocketMessageBuffer * buffer = makeBuffer((uint8_t *)message, len); + binaryAll(buffer); } void AsyncWebSocket::binaryAll(AsyncWebSocketMessageBuffer * buffer) { if (!buffer) return; - buffer->lock(); + buffer->lock(); for(const auto& c: _clients){ if(c->status() == WS_CONNECTED) c->binary(buffer); } - buffer->unlock(); - _cleanBuffers(); + buffer->unlock(); + _cleanBuffers(); } void AsyncWebSocket::message(uint32_t id, AsyncWebSocketMessage *message){ @@ -1008,7 +995,7 @@ void AsyncWebSocket::messageAll(AsyncWebSocketMultiMessage *message){ if(c->status() == WS_CONNECTED) c->message(message); } - _cleanBuffers(); + _cleanBuffers(); } size_t AsyncWebSocket::printf(uint32_t id, const char *format, ...){ @@ -1033,8 +1020,8 @@ size_t AsyncWebSocket::printfAll(const char *format, ...) { size_t len = vsnprintf(temp, MAX_PRINTF_LEN, format, arg); va_end(arg); delete[] temp; - - AsyncWebSocketMessageBuffer * buffer = makeBuffer(len); + + AsyncWebSocketMessageBuffer * buffer = makeBuffer(len); if (!buffer) { return 0; } @@ -1071,8 +1058,8 @@ size_t AsyncWebSocket::printfAll_P(PGM_P formatP, ...) { size_t len = vsnprintf_P(temp, MAX_PRINTF_LEN, formatP, arg); va_end(arg); delete[] temp; - - AsyncWebSocketMessageBuffer * buffer = makeBuffer(len + 1); + + AsyncWebSocketMessageBuffer * buffer = makeBuffer(len + 1); if (!buffer) { return 0; } @@ -1168,7 +1155,7 @@ const char * WS_STR_UUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; bool AsyncWebSocket::canHandle(AsyncWebServerRequest *request){ if(!_enabled) return false; - + if(request->method() != HTTP_GET || !request->url().equals(_url) || !request->isExpectedRequestedConnType(RCT_WS)) return false; @@ -1208,24 +1195,24 @@ void AsyncWebSocket::handleRequest(AsyncWebServerRequest *request){ AsyncWebSocketMessageBuffer * AsyncWebSocket::makeBuffer(size_t size) { - AsyncWebSocketMessageBuffer * buffer = new AsyncWebSocketMessageBuffer(size); + AsyncWebSocketMessageBuffer * buffer = new AsyncWebSocketMessageBuffer(size); if (buffer) { AsyncWebLockGuard l(_lock); _buffers.add(buffer); } - return buffer; + return buffer; } AsyncWebSocketMessageBuffer * AsyncWebSocket::makeBuffer(uint8_t * data, size_t size) { - AsyncWebSocketMessageBuffer * buffer = new AsyncWebSocketMessageBuffer(data, size); - + AsyncWebSocketMessageBuffer * buffer = new AsyncWebSocketMessageBuffer(data, size); + if (buffer) { AsyncWebLockGuard l(_lock); _buffers.add(buffer); } - return buffer; + return buffer; } void AsyncWebSocket::_cleanBuffers() @@ -1268,10 +1255,18 @@ AsyncWebSocketResponse::AsyncWebSocketResponse(const String& key, AsyncWebSocket sha1(key + WS_STR_UUID, hash); #else (String&)key += WS_STR_UUID; - SHA1_CTX ctx; - SHA1Init(&ctx); - SHA1Update(&ctx, (const unsigned char*)key.c_str(), key.length()); - SHA1Final(hash, &ctx); + mbedtls_sha1_context ctx; + mbedtls_sha1_init(&ctx); +#if MBEDTLS_VERSION_NUMBER >= 0x02070000 && MBEDTLS_VERSION_NUMBER < 0x03000000 + mbedtls_sha1_starts_ret(&ctx); + mbedtls_sha1_update_ret(&ctx, (const unsigned char*)key.c_str(), key.length()); + mbedtls_sha1_finish_ret(&ctx, hash); +#else + mbedtls_sha1_starts(&ctx); + mbedtls_sha1_update(&ctx, (const unsigned char*)key.c_str(), key.length()); + mbedtls_sha1_finish(&ctx, hash); +#endif + mbedtls_sha1_free(&ctx); #endif base64_encodestate _state; base64_init_encodestate(&_state); diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 5b03aceb9..d84879334 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -22,13 +22,17 @@ #define ASYNCWEBSOCKET_H_ #include -#ifdef ESP32 +#if defined(ESP32) || defined(LIBRETINY) #include +#ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 32 +#endif #else #include +#ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 8 #endif +#endif #include #include "AsyncWebSynchronization.h" @@ -40,7 +44,7 @@ #endif #endif -#ifdef ESP32 +#if defined(ESP32) || defined(LIBRETINY) #define DEFAULT_MAX_WS_CLIENTS 8 #else #define DEFAULT_MAX_WS_CLIENTS 4 diff --git a/src/AsyncWebSynchronization.h b/src/AsyncWebSynchronization.h index f36c52dcf..5e45d4d57 100644 --- a/src/AsyncWebSynchronization.h +++ b/src/AsyncWebSynchronization.h @@ -5,7 +5,7 @@ #include -#ifdef ESP32 +#if defined(ESP32) || (defined(LIBRETINY) && LT_HAS_FREERTOS) // This is the ESP32 version of the Sync Lock, using the FreeRTOS Semaphore class AsyncWebLock @@ -84,4 +84,4 @@ class AsyncWebLockGuard } }; -#endif // ASYNCWEBSYNCHRONIZATION_H_ \ No newline at end of file +#endif // ASYNCWEBSYNCHRONIZATION_H_ diff --git a/src/ESPAsyncWebServer.h b/src/ESPAsyncWebServer.h index 7cd21aa86..933091562 100644 --- a/src/ESPAsyncWebServer.h +++ b/src/ESPAsyncWebServer.h @@ -28,7 +28,7 @@ #include "StringArray.h" -#ifdef ESP32 +#if defined(ESP32) || defined(LIBRETINY) #include #include #elif defined(ESP8266) diff --git a/src/SPIFFSEditor.cpp b/src/SPIFFSEditor.cpp deleted file mode 100644 index a84fa87dd..000000000 --- a/src/SPIFFSEditor.cpp +++ /dev/null @@ -1,544 +0,0 @@ -#include "SPIFFSEditor.h" -#include - -//File: edit.htm.gz, Size: 4151 -#define edit_htm_gz_len 4151 -const uint8_t edit_htm_gz[] PROGMEM = { - 0x1F, 0x8B, 0x08, 0x08, 0xB8, 0x94, 0xB1, 0x59, 0x00, 0x03, 0x65, 0x64, 0x69, 0x74, 0x2E, 0x68, - 0x74, 0x6D, 0x00, 0xB5, 0x3A, 0x0B, 0x7B, 0xDA, 0xB8, 0xB2, 0x7F, 0xC5, 0x71, 0x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5, 0x82, 0xA3, 0x41, 0xBE, 0x92, 0xFB, 0x46, 0xC0, 0x86, 0x69, 0x03, 0x93, 0x6D, 0xCB, - 0xDE, 0xB2, 0x77, 0x71, 0x64, 0x7F, 0x4D, 0xF7, 0x57, 0x4F, 0xD8, 0x5F, 0x34, 0x69, 0x58, 0x0B, - 0xE7, 0xB5, 0xAB, 0x8A, 0x4D, 0x6A, 0x83, 0xFB, 0xC4, 0xA7, 0x70, 0x3D, 0x6F, 0xB3, 0xCC, 0xB6, - 0x1A, 0xE4, 0x5F, 0x60, 0xD4, 0x31, 0xBA, 0x95, 0x2F, 0x92, 0xF4, 0x81, 0x7B, 0x18, 0x5B, 0x17, - 0x54, 0x26, 0x70, 0x49, 0xD5, 0x87, 0x34, 0xB9, 0xD3, 0x9C, 0x2F, 0x39, 0xC3, 0xB7, 0x3C, 0xA8, - 0x03, 0xE4, 0x37, 0x9C, 0x72, 0x39, 0xB0, 0xBF, 0x07, 0x5D, 0x33, 0x2A, 0x41, 0x79, 0xB1, 0x26, - 0x9B, 0xE6, 0x7C, 0x02, 0x82, 0x01, 0x70, 0xB1, 0xA3, 0x48, 0xCD, 0x2B, 0xCB, 0x98, 0x9B, 0x57, - 0x96, 0x54, 0xE2, 0x5F, 0x59, 0xCC, 0xDB, 0x9F, 0xFC, 0xDB, 0x4C, 0xF9, 0x7F, 0x5B, 0x28, 0x36, - 0x32, 0xF9, 0xE1, 0x09, 0xF7, 0x56, 0x3F, 0x45, 0xAD, 0x47, 0x51, 0xBB, 0xF7, 0xFF, 0x17, 0x53, - 0xE8, 0x9D, 0x36, 0x92, 0x29, 0x00, 0x00 -}; - -#define SPIFFS_MAXLENGTH_FILEPATH 32 -const char *excludeListFile = "/.exclude.files"; - -typedef struct ExcludeListS { - char *item; - ExcludeListS *next; -} ExcludeList; - -static ExcludeList *excludes = NULL; - -static bool matchWild(const char *pattern, const char *testee) { - const char *nxPat = NULL, *nxTst = NULL; - - while (*testee) { - if (( *pattern == '?' ) || (*pattern == *testee)){ - pattern++;testee++; - continue; - } - if (*pattern=='*'){ - nxPat=pattern++; nxTst=testee; - continue; - } - if (nxPat){ - pattern = nxPat+1; testee=++nxTst; - continue; - } - return false; - } - while (*pattern=='*'){pattern++;} - return (*pattern == 0); -} - -static bool addExclude(const char *item){ - size_t len = strlen(item); - if(!len){ - return false; - } - ExcludeList *e = (ExcludeList *)malloc(sizeof(ExcludeList)); - if(!e){ - return false; - } - e->item = (char *)malloc(len+1); - if(!e->item){ - free(e); - return false; - } - memcpy(e->item, item, len+1); - e->next = excludes; - excludes = e; - return true; -} - -static void loadExcludeList(fs::FS &_fs, const char *filename){ - static char linebuf[SPIFFS_MAXLENGTH_FILEPATH]; - fs::File excludeFile=_fs.open(filename, "r"); - if(!excludeFile){ - //addExclude("/*.js.gz"); - return; - } -#ifdef ESP32 - if(excludeFile.isDirectory()){ - excludeFile.close(); - return; - } -#endif - if (excludeFile.size() > 0){ - uint8_t idx; - bool isOverflowed = false; - while (excludeFile.available()){ - linebuf[0] = '\0'; - idx = 0; - int lastChar; - do { - lastChar = excludeFile.read(); - if(lastChar != '\r'){ - linebuf[idx++] = (char) lastChar; - } - } while ((lastChar >= 0) && (lastChar != '\n') && (idx < SPIFFS_MAXLENGTH_FILEPATH)); - - if(isOverflowed){ - isOverflowed = (lastChar != '\n'); - continue; - } - isOverflowed = (idx >= SPIFFS_MAXLENGTH_FILEPATH); - linebuf[idx-1] = '\0'; - if(!addExclude(linebuf)){ - excludeFile.close(); - return; - } - } - } - excludeFile.close(); -} - -static bool isExcluded(fs::FS &_fs, const char *filename) { - if(excludes == NULL){ - loadExcludeList(_fs, excludeListFile); - } - ExcludeList *e = excludes; - while(e){ - if (matchWild(e->item, filename)){ - return true; - } - e = e->next; - } - return false; -} - -// WEB HANDLER IMPLEMENTATION - -#ifdef ESP32 -SPIFFSEditor::SPIFFSEditor(const fs::FS& fs, const String& username, const String& password) -#else -SPIFFSEditor::SPIFFSEditor(const String& username, const String& password, const fs::FS& fs) -#endif -:_fs(fs) -,_username(username) -,_password(password) -,_authenticated(false) -,_startTime(0) -{} - -bool SPIFFSEditor::canHandle(AsyncWebServerRequest *request){ - if(request->url().equalsIgnoreCase("/edit")){ - if(request->method() == HTTP_GET){ - if(request->hasParam("list")) - return true; - if(request->hasParam("edit")){ - request->_tempFile = _fs.open(request->arg("edit"), "r"); - if(!request->_tempFile){ - return false; - } -#ifdef ESP32 - if(request->_tempFile.isDirectory()){ - request->_tempFile.close(); - return false; - } -#endif - } - if(request->hasParam("download")){ - request->_tempFile = _fs.open(request->arg("download"), "r"); - if(!request->_tempFile){ - return false; - } -#ifdef ESP32 - if(request->_tempFile.isDirectory()){ - request->_tempFile.close(); - return false; - } -#endif - } - request->addInterestingHeader("If-Modified-Since"); - return true; - } - else if(request->method() == HTTP_POST) - return true; - else if(request->method() == HTTP_DELETE) - return true; - else if(request->method() == HTTP_PUT) - return true; - - } - return false; -} - - -void SPIFFSEditor::handleRequest(AsyncWebServerRequest *request){ - if(_username.length() && _password.length() && !request->authenticate(_username.c_str(), _password.c_str())) - return request->requestAuthentication(); - - if(request->method() == HTTP_GET){ - if(request->hasParam("list")){ - String path = request->getParam("list")->value(); -#ifdef ESP32 - File dir = _fs.open(path); -#else - Dir dir = _fs.openDir(path); -#endif - path = String(); - String output = "["; -#ifdef ESP32 - File entry = dir.openNextFile(); - while(entry){ -#else - while(dir.next()){ - fs::File entry = dir.openFile("r"); -#endif - if (isExcluded(_fs, entry.name())) { -#ifdef ESP32 - entry = dir.openNextFile(); -#endif - continue; - } - if (output != "[") output += ','; - output += "{\"type\":\""; - output += "file"; - output += "\",\"name\":\""; - output += String(entry.name()); - output += "\",\"size\":"; - output += String(entry.size()); - output += "}"; -#ifdef ESP32 - entry = dir.openNextFile(); -#else - entry.close(); -#endif - } -#ifdef ESP32 - dir.close(); -#endif - output += "]"; - request->send(200, "application/json", output); - output = String(); - } - else if(request->hasParam("edit") || request->hasParam("download")){ - request->send(request->_tempFile, request->_tempFile.name(), String(), request->hasParam("download")); - } - else { - const char * buildTime = __DATE__ " " __TIME__ " GMT"; - if (request->header("If-Modified-Since").equals(buildTime)) { - request->send(304); - } else { - AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", edit_htm_gz, edit_htm_gz_len); - response->addHeader("Content-Encoding", "gzip"); - response->addHeader("Last-Modified", buildTime); - request->send(response); - } - } - } else if(request->method() == HTTP_DELETE){ - if(request->hasParam("path", true)){ - _fs.remove(request->getParam("path", true)->value()); - request->send(200, "", "DELETE: "+request->getParam("path", true)->value()); - } else - request->send(404); - } else if(request->method() == HTTP_POST){ - if(request->hasParam("data", true, true) && _fs.exists(request->getParam("data", true, true)->value())) - request->send(200, "", "UPLOADED: "+request->getParam("data", true, true)->value()); - else - request->send(500); - } else if(request->method() == HTTP_PUT){ - if(request->hasParam("path", true)){ - String filename = request->getParam("path", true)->value(); - if(_fs.exists(filename)){ - request->send(200); - } else { - fs::File f = _fs.open(filename, "w"); - if(f){ - f.write((uint8_t)0x00); - f.close(); - request->send(200, "", "CREATE: "+filename); - } else { - request->send(500); - } - } - } else - request->send(400); - } -} - -void SPIFFSEditor::handleUpload(AsyncWebServerRequest *request, const String& filename, size_t index, uint8_t *data, size_t len, bool final){ - if(!index){ - if(!_username.length() || request->authenticate(_username.c_str(),_password.c_str())){ - _authenticated = true; - request->_tempFile = _fs.open(filename, "w"); - _startTime = millis(); - } - } - if(_authenticated && request->_tempFile){ - if(len){ - request->_tempFile.write(data,len); - } - if(final){ - request->_tempFile.close(); - } - } -} diff --git a/src/SPIFFSEditor.h b/src/SPIFFSEditor.h deleted file mode 100644 index 3586429e1..000000000 --- a/src/SPIFFSEditor.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPIFFSEditor_H_ -#define SPIFFSEditor_H_ -#include - -class SPIFFSEditor: public AsyncWebHandler { - private: - fs::FS _fs; - String _username; - String _password; - bool _authenticated; - uint32_t _startTime; - public: -#ifdef ESP32 - SPIFFSEditor(const fs::FS& fs, const String& username=String(), const String& password=String()); -#else - SPIFFSEditor(const String& username=String(), const String& password=String(), const fs::FS& fs=SPIFFS); -#endif - virtual bool canHandle(AsyncWebServerRequest *request) override final; - virtual void handleRequest(AsyncWebServerRequest *request) override final; - virtual void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t index, uint8_t *data, size_t len, bool final) override final; - virtual bool isRequestHandlerTrivial() override final {return false;} -}; - -#endif diff --git a/src/StringArray.h b/src/StringArray.h index 4c0aa7019..266bd9def 100644 --- a/src/StringArray.h +++ b/src/StringArray.h @@ -47,10 +47,19 @@ class LinkedList { class Iterator { ItemType* _node; + ItemType* _nextNode = nullptr; public: - Iterator(ItemType* current = nullptr) : _node(current) {} + Iterator(ItemType* current = nullptr) : _node(current) { + if (_node != nullptr) { + _nextNode = current->next; + } + } Iterator(const Iterator& i) : _node(i._node) {} - Iterator& operator ++() { _node = _node->next; return *this; } + Iterator& operator ++() { + _node = _nextNode; + _nextNode = _node != nullptr ? _node->next : nullptr; + return *this; + } bool operator != (const Iterator& i) const { return _node != i._node; } const T& operator * () const { return _node->value(); } const T* operator -> () const { return &_node->value(); } diff --git a/src/WebAuthentication.cpp b/src/WebAuthentication.cpp index 2feca5420..45246a196 100644 --- a/src/WebAuthentication.cpp +++ b/src/WebAuthentication.cpp @@ -71,9 +71,9 @@ static bool getMD5(uint8_t * data, uint16_t len, char * output){//33 bytes or mo memset(_buf, 0x00, 16); #ifdef ESP32 mbedtls_md5_init(&_ctx); - mbedtls_md5_starts(&_ctx); - mbedtls_md5_update(&_ctx, data, len); - mbedtls_md5_finish(&_ctx, _buf); + mbedtls_md5_starts_ret(&_ctx); + mbedtls_md5_update_ret(&_ctx, data, len); + mbedtls_md5_finish_ret(&_ctx, _buf); #else MD5Init(&_ctx); MD5Update(&_ctx, data, len); diff --git a/src/WebServer.cpp b/src/WebServer.cpp index 95c2dd69f..e72e55e13 100644 --- a/src/WebServer.cpp +++ b/src/WebServer.cpp @@ -32,8 +32,8 @@ bool ON_AP_FILTER(AsyncWebServerRequest *request) { AsyncWebServer::AsyncWebServer(uint16_t port) : _server(port) - , _rewrites(LinkedList([](AsyncWebRewrite* r){ delete r; })) - , _handlers(LinkedList([](AsyncWebHandler* h){ delete h; })) + , _rewrites(LinkedList(nullptr)) + , _handlers(LinkedList(nullptr)) { _catchAllHandler = new AsyncCallbackWebHandler(); if(_catchAllHandler == NULL) diff --git a/src/edit.htm b/src/edit.htm deleted file mode 100644 index 43d498455..000000000 --- a/src/edit.htm +++ /dev/null @@ -1,627 +0,0 @@ - - - - -ESP Editor - - - - - - -
-
-
-
- - - -