Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ jobs:
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh

- name: Update core index
run: arduino-cli core update-index --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.3/package_rp2040_index.json
run: arduino-cli core update-index --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

- name: Install core
run: arduino-cli core install --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.3/package_rp2040_index.json rp2040:rp2040
run: arduino-cli core install --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json rp2040:rp2040

- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

[![Documentation](https://img.shields.io/badge/Wiki-ESPAsyncWebServer-blue?logo=github)](https://github.com/ESP32Async/ESPAsyncWebServer/wiki)

## Asynchronous HTTP and WebSocket Server Library for ESP32, ESP8266 and RP2040
## Asynchronous HTTP and WebSocket Server Library for ESP32, ESP8266, RP2040 and RP2350

Supports: WebSocket, SSE, Authentication, Arduino Json 7, File Upload, Static File serving, URL Rewrite, URL Redirect, etc.

Expand Down Expand Up @@ -100,7 +100,7 @@ platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipicow
board_build.core = earlephilhower
lib_deps =
ayushsharma82/RPAsyncTCP@1.3.0
ayushsharma82/RPAsyncTCP
ESP32Async/ESPAsyncWebServer
lib_ignore =
lwIP_ESPHost
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ lib_deps =
ESP32Async/ESPAsyncTCP @ 2.0.0

[env:ci-raspberrypi]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#4d1acd7caac8c055c05f5ac6c68fa5f079730947
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = ${sysenv.PIO_BOARD}
board_build.core = earlephilhower
lib_deps =
Expand Down
8 changes: 7 additions & 1 deletion src/AsyncEventSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ class AsyncEventSourceMessage {

public:
AsyncEventSourceMessage(AsyncEvent_SharedData_t data) : _data(data){};
#ifdef ESP32
#if defined(ESP32)
AsyncEventSourceMessage(const char *data, size_t len) : _data(std::make_shared<String>(data, len)){};
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
AsyncEventSourceMessage(const char *data, size_t len) : _data(std::make_shared<String>()) {
if (data && len > 0) {
_data->concat(data, len);
}
};
#else
// esp8266's String does not have constructor with data/length arguments. Use a concat method here
AsyncEventSourceMessage(const char *data, size_t len) {
Expand Down
4 changes: 4 additions & 0 deletions src/WebHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ void AsyncStaticWebHandler::handleRequest(AsyncWebServerRequest *request) {
etag = lw ^ request->_tempFile.size(); // etag combines file size and lastmod timestamp
#endif
} else {
#if defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
etag = String(request->_tempFile.size());
#else
etag = request->_tempFile.size();
#endif
}

bool not_modified = false;
Expand Down