diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1119454..517426c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,10 @@ jobs: fqbn: esp32:esp32:esp32cam libraries: | - source-path: ./ - - source-url: https://github.com/me-no-dev/AsyncTCP.git - version: 58cbe1fabe78977e3140391c01c03f0cb51e347c - - source-url: https://github.com/me-no-dev/ESPAsyncWebServer.git - version: 7f3753454b1f176c4b6d6bcd1587a135d95ca63c + - name: Async TCP + - name: ESP Async WebServer + # https://github.com/mathieucarbou/AsyncTCP + # https://github.com/mathieucarbou/ESPAsyncWebServer - name: Build docs run: docs/build.sh - name: Deploy docs diff --git a/LICENSE b/LICENSE index 05f43f4..8b4a9df 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2020-2024, Junxiao Shi +Copyright (c) 2020-2025, Junxiao Shi Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/examples/AsyncCam/README.md b/examples/AsyncCam/README.md index 180ce66..fde758a 100644 --- a/examples/AsyncCam/README.md +++ b/examples/AsyncCam/README.md @@ -1,6 +1,6 @@ # AsyncCam: camera on ESPAsyncWebServer This example runs on ESP32-CAM board. -It demonstrates how to use esp32cam library with [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) library. -The HTTP server supports both JPEG still image and MJPEG stream, and allows changing camera resolution on the fly. +It demonstrates how to use esp32cam library with [ESPAsyncWebServer](https://github.com/mathieucarbou/ESPAsyncWebServer) library. +The HTTP server supports both ~~JPEG still image~~ and MJPEG stream, and allows changing camera resolution on the fly. To use this example, modify WiFi SSID+password, then upload to ESP32. diff --git a/examples/AsyncCam/handlers.cpp b/examples/AsyncCam/handlers.cpp index b200769..83af41c 100644 --- a/examples/AsyncCam/handlers.cpp +++ b/examples/AsyncCam/handlers.cpp @@ -86,8 +86,8 @@ rewriteFrontpage(const String& var) { void addRequestHandlers() { server.on("/", HTTP_GET, [](AsyncWebServerRequest* request) { - request->send_P(200, "text/html", reinterpret_cast(FRONTPAGE), - sizeof(FRONTPAGE), rewriteFrontpage); + request->send(200, "text/html", reinterpret_cast(FRONTPAGE), sizeof(FRONTPAGE), + rewriteFrontpage); }); server.on("/robots.txt", HTTP_GET, [](AsyncWebServerRequest* request) { diff --git a/src/esp32cam-asyncweb.h b/src/esp32cam-asyncweb.h index 0157edd..f506b20 100644 --- a/src/esp32cam-asyncweb.h +++ b/src/esp32cam-asyncweb.h @@ -4,8 +4,8 @@ #include "esp32cam.h" #include -#include -#include +#include +#include #ifdef ESP32CAM_ASYNCWEB_LOGGER #define ESP32CAM_ASYNCWEB_LOG(fmt, ...) \ @@ -22,7 +22,7 @@ namespace esp32cam { /** * @brief esp32cam integration with ESPAsyncWebServer library. - * @sa https://github.com/me-no-dev/ESPAsyncWebServer + * @sa https://github.com/mathieucarbou/ESPAsyncWebServer */ namespace asyncweb { @@ -103,6 +103,10 @@ class StillResponse : public AsyncAbstractResponse { * * To perform authentication or other operations before image capture, create another HTTP handler * to do these, and then call this function. + * + * @bug + * This handler is currently broken: ESPAsyncWebServer expects request->send(response) to be + * called before this function returns; otherwise it will generate 501 response. */ inline void handleStill(AsyncWebServerRequest* request) {