496 Commits

Author SHA1 Message Date
Mathieu Carbou
7f35106299 Prepare move to https://github.com/ESP32Async/ESPAsyncWebServer 2025-01-20 16:07:01 +01:00
Mathieu Carbou
7cee8a57b1 v3.6.0 2025-01-09 15:32:21 +01:00
Mathieu Carbou
21323aa46f Breaking: Renamed Middleware classes to not conflict with Arduino Core 3.1.1 which now has Middleware support 2025-01-09 15:31:38 +01:00
Mathieu Carbou
23ae702d01 v3.5.1 2025-01-09 15:08:36 +01:00
Emil Muratov
175e182b4c rework INM/IMS handling for AsyncStaticWebHandler
IMS template must contain GMT timezone, not local - "%a, %d %b %Y %H:%M:%S GMT"

create etag based on timestamp + filesize

INM header handling should have precedence over IMS
2025-01-09 11:41:25 +09:00
Mathieu Carbou
33815afe22 v3.5.0 2025-01-07 22:33:43 +01:00
Mathieu Carbou
079446b1c4 v3.4.5 2024-12-19 14:29:42 +01:00
Tarik2142
8f442910f0 fix converting 0xa to 10(dec)
Revert "use my AsyncTCP fork"

This reverts commit b956d154a9725bc8a464a7325df9cae71d82144a.

use my AsyncTCP fork
2024-12-19 14:18:48 +01:00
Mathieu Carbou
e031d27874 v3.4.4 2024-12-19 10:54:39 +01:00
Mathieu Carbou
aab147e7e7 Reset connection when appropriate + some code cleanup 2024-12-19 10:36:02 +01:00
Mathieu Carbou
10280aa97a Merge branch 'main' into ssl_fastrst 2024-12-19 10:09:49 +01:00
Emil Muratov
a2c3152ca7 reset wrong SSL connections instead of close
since we can't properly handle SSL beyond firts packet it does not make much sense to linger it
with proper fin/ack timewait process. A TCP RST would recycle memory much faster.
2024-12-19 13:20:08 +09:00
Emil Muratov
2a26a97e3a move AsyncWebSocket's WS_EVT_CONNECT callback out of AsyncWebSocketClient's constructor
- this is wrong place to call user code from an object constructor
 - it is wrong to call AsyncWebSocket's method from other's objects constructor
 - the callback is executed when new object is not yet linked to server's clients list

Closes #176
2024-12-19 13:12:59 +09:00
Mathieu Carbou
c2147e9b8e Switch log ordering 2024-12-17 17:46:23 +01:00
Mathieu Carbou
5a8b643ca0 v3.4.3 2024-12-17 14:18:57 +01:00
Mathieu Carbou
826ea07e08 Close connection when a SSL/TLS handshake or badly formatted request header is detected 2024-12-17 14:10:14 +01:00
Mathieu Carbou
ae3bf04ef8 v3.4.2 2024-12-16 21:40:32 +01:00
Mathieu Carbou
9ebf21af95 v3.4.1 2024-12-15 18:34:20 +01:00
Mathieu Carbou
c1e3bf0665 clang reformat 2024-12-15 17:34:54 +01:00
Emil Muratov
3d3456e9e8 implement in-flight buffer credits and event moderation for large/chunked responses
Referer to https://github.com/mathieucarbou/ESPAsyncWebServer/discussions/165
Relates to #169

in-flight buffer credits are intended to moderate buffer fill callbacks in AsyncAbstractResponse
it could prevent bad designed slow user-callbacks to flood the queue in chunked responces.

for response data we need to control the queue and in-flight fragmentation. Sending small chunks could give low latency,
but flood asynctcp's queue and fragment socket buffer space for large responses.
Let's ignore polled acks and acks in case when we have more in-flight data then the available socket buff space.
That way we could balance on having half the buffer in-flight while another half is filling up, while minimizing events in asynctcp q
2024-12-15 14:27:42 +09:00
Mathieu Carbou
3866d0b6a0 snprintf => concat 2024-12-10 20:41:31 +01:00
Mathieu Carbou
ce2a7a593f v3.4.0 2024-12-10 15:02:47 +01:00
Mathieu Carbou
ee9d406190 Fix 162: closing websocket from ESP32 with Safari crashes the ESP32.
This happens when Safari sends a WS frame with masked bit set and length 2.
2024-12-10 13:38:17 +01:00
Emil Muratov
050448165b SSE: fix '\n' for String's message container
Closes #166
2024-12-10 16:46:35 +09:00
vortigont
c8b3b283da Merge branch 'main' into sse_shareddata 2024-12-02 12:25:29 +09:00
Emil Muratov
b09ad98fdd rework SSE for String's instead of std::string 2024-12-02 10:37:35 +09:00
Mathieu Carbou
bccee27d2b v3.3.23 2024-11-25 13:26:03 +01:00
Mathieu Carbou
f0eb0acb2f Added WS_PING event 2024-11-21 00:38:56 +01:00
Mathieu Carbou
0cc6dd2a0c code cleanup 2024-11-20 23:43:45 +01:00
Emil Muratov
43e0b5c5a6 rework SSE handling
implement AsyncEventSourceMessage using shared std::string container
one message instance could be shared for multiple connected clients

add zero-copy overloads for message queue in AsyncEventSourceClient
message queue for the client consists of possibly shared instances of AsyncEventSourceMessage,
adding a message to the queue won't create deep-copy object

AsyncEventSource will create a single instance of data message and populate connected clients queues with a shared pointer
2024-11-12 15:27:15 +09:00
Mathieu Carbou
d86e0906bd v3.3.22 2024-11-04 14:08:10 +01:00
Mathieu Carbou
7cf5de6eed Fix #151: setAuthentication() was not authenticating: the middleware was setup with AUTH_NONE (default) instead of AUTH_DIGEST (to keep backward compatibility) 2024-11-04 14:02:14 +01:00
Mathieu Carbou
5021dd0b7d v3.3.21 2024-10-27 08:51:40 +01:00
Mathieu Carbou
cf641d2aaf v3.3.20 2024-10-24 10:22:08 +02:00
Mathieu Carbou
41d6ccb97c Fix #143: doc re-updated and const removed 2024-10-24 10:21:17 +02:00
Mathieu Carbou
97fbadf2f4 v3.3.19 2024-10-23 16:33:47 +02:00
Mathieu Carbou
996a1bffa9 Code cleanup: virtual destructors, hierarchy, AsyncResponseStream, etc 2024-10-23 15:59:50 +02:00
Mathieu Carbou
bfd688c346 Code cleanup around virtual destructor's hierarchy 2024-10-23 14:49:28 +02:00
Mathieu Carbou
7aea91bd42 Code cleanup 2024-10-23 14:36:10 +02:00
Mathieu Carbou
b152719851 Set response to NULL after delete 2024-10-23 13:11:53 +02:00
Mathieu Carbou
85b1cee264 v3.3.18 2024-10-23 11:03:09 +02:00
Mathieu Carbou
724f6c3045 Fix #142: canHandle implementations should check for the request type (http, websocket, sse) 2024-10-23 11:01:26 +02:00
Mathieu Carbou
c8f263eeb5 Renamed _fielExists into _searchFile 2024-10-23 10:29:46 +02:00
Mathieu Carbou
ea7a593b4e Fix AsyncStaticWebHandler to remove the wrong gzip stat feature which is not taking in consideration the frequency of each request. Expose instead a boolean flag to let the user control that. 2024-10-23 10:27:55 +02:00
Mathieu Carbou
147f342e84 added isWebSocketUpgrade(), isSSE(), isHTTP() methods 2024-10-23 10:13:58 +02:00
Mathieu Carbou
ab682fd838 Code cleanup: adding missing const keyword 2024-10-23 10:13:10 +02:00
Mathieu Carbou
cb4b4de36a v3.3.17 2024-10-15 21:33:27 +02:00
Mathieu Carbou
a4237ae5e4 Wether 8266 or ESP32, static constexpr const char* ws used for literals 2024-10-15 21:18:55 +02:00
Mathieu Carbou
7fa622b3dc Revert "Fixed literals for ESP8266"
This reverts commit 65906f7419.
2024-10-15 21:17:13 +02:00
Mathieu Carbou
139099ebd9 v3.3.16 2024-10-15 10:18:52 +02:00