Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions .github/workflows/build-arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ 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/4.4.4/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/4.4.4/package_rp2040_index.json rp2040:rp2040

- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson

- name: Install RPAsyncTCP
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.0
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.1

- name: Checkout
uses: actions/checkout@v4
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/[email protected].0
ayushsharma82/RPAsyncTCP@^1.3.1
ESP32Async/ESPAsyncWebServer
lib_ignore =
lwIP_ESPHost
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"owner": "ayushsharma82",
"name": "RPAsyncTCP",
"version": "^1.3.0",
"version": "^1.3.1",
"platforms": "raspberrypi"
}
],
Expand Down
12 changes: 6 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ lib_deps =
ESP32Async/ESPAsyncTCP @ 2.0.0

[env:raspberrypi]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#c7502925e3b08af70e9f924d54ab9d00a7e64781
board = rpipicow
board_build.core = earlephilhower
lib_deps =
bblanchon/ArduinoJson @ 7.3.1
ayushsharma82/RPAsyncTCP@^1.3.0
bblanchon/ArduinoJson @ 7.3.0
ayushsharma82/RPAsyncTCP@^1.3.1
lib_ignore =
lwIP_ESPHost
build_flags = ${env.build_flags}
Expand Down Expand Up @@ -139,12 +139,12 @@ 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#c7502925e3b08af70e9f924d54ab9d00a7e64781
board = ${sysenv.PIO_BOARD}
board_build.core = earlephilhower
lib_deps =
bblanchon/ArduinoJson @ 7.3.1
ayushsharma82/RPAsyncTCP@^1.3.0
bblanchon/ArduinoJson @ 7.3.0
ayushsharma82/RPAsyncTCP@^1.3.1
lib_ignore =
lwIP_ESPHost
build_flags = ${env.build_flags}
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