Commit Graph

307 Commits

Author SHA1 Message Date
Pablo Clemente Maseda 2f784268f0
Redefine DYNAMIC_JSON_DOCUMENT_SIZE if not defined (#922) 2021-02-25 00:03:28 +02:00
Viktr f6fff3f91e
URL template match by extension (#751)
Changes to be committed:
modified:   src/WebHandlerImpl.h
2020-11-15 19:21:19 +02:00
Me No Dev 241aca38a0
Fix authentication for callback web handlers 2020-11-05 20:54:31 +02:00
Arjan Filius f13685ee97 AsyncEvents/ServerSideEvents: prevent internal DOS by prevent overflowing messageQueue (#621)
* Prevent tcp/wifi DOS lockup by preventing number of messages in queue, drop otherwise

* Define (renamed) MAX_SSE_Clients
2019-10-17 10:05:13 +03:00
Bob a84f16989a Make regex a define exclusive (#617)
* Change compiler error to runtime error.
Add compiler warining when a ASYNCWEBSERVER_REGEX function is used, but not enabled

* Update docs for usage in Arduino IDE

* Update docs for platform.local.txt
2019-10-14 23:06:38 +03:00
Develo f3ebe2dea9 Remove warnings for unused params (#620) 2019-10-14 11:30:06 +03:00
Bob 75acf88d5f Add support for Content-Type with charset (#561) 2019-10-06 11:11:51 +03:00
frippe75 6a1fb03fc4 Fixes #614 with incorrect regex in the example sketch (#615) 2019-10-06 11:08:59 +03:00
me-no-dev 83f6b96958 Update install-arduino-ide.sh 2019-10-02 20:02:39 +03:00
Phil Bowles 01019542c2 Add methods to determine Average Queue length (#509)
* Add methods to determine Average Queue length
2019-10-02 15:33:18 +03:00
SharkSharp 4a34b46cc0 make the query parameters available by passing the request to WS_EVT_CONNECT (#559)
Signed-off-by: Arthur Frederico Neves <arthurfred.neves@gmail.com>
2019-10-02 15:16:35 +03:00
Me No Dev e1be51fc8f Set theme jekyll-theme-cayman 2019-10-02 14:57:20 +03:00
Me No Dev b9c4170528
Update README.md 2019-10-02 14:55:37 +03:00
Me No Dev d1747e530f Set theme jekyll-theme-hacker 2019-10-02 14:49:18 +03:00
Bob 6a4e2f5329 Support route parameters with regex patterns (#560)
* Fix compile warnings

* first test

* Add regex path

* Add simple example

* add support for esp8266

* Update AsyncJson.h
2019-10-02 14:37:55 +03:00
sascha lammers 403752a942 Added method to access clients of AsyncWebSocket (#583)
* Added method to access clients of AsyncWebSocket

* https://github.com/me-no-dev/ESPAsyncWebServer/issues/571

* Conflict with crypto library
2019-10-02 14:16:43 +03:00
Robert Alfaro 8451c0d0e7 Add CMakeLists.txt file for ESP-IDF (#603) 2019-10-02 14:06:04 +03:00
Mike Dunston c7ece88eac Update AsyncJson.h (#604)
remove extra #endif that should have been dropped as part of 59066bd1e4
2019-10-02 13:27:29 +03:00
Marcus Klein 7b1a3d238b added dependency for PlatformIO ldf_mode off (#605) 2019-10-02 12:33:46 +03:00
CODeRUS e88fc12de8 Make PrettyAsyncJsonResponse to use maxJsonBufferSize for ArduinoJson 6 (#607) 2019-10-02 12:26:01 +03:00
me-no-dev 7949d83e91 bump version 2019-10-02 12:09:21 +03:00
me-no-dev 14798d0e6a build fixes 2019-10-02 11:41:16 +03:00
me-no-dev a19c32bba3 Simpler pio install 2019-10-02 10:47:32 +03:00
Me No Dev 3c6f5f914c
Ci update (#610) 2019-10-02 10:32:15 +03:00
matt123p 2f37037029 Add function so that the total number of web-socket clients can be limited (#591)
* Add function so that the total number of web-socket clients can be limited easily.  This is to cope with a problem when a browser does not close the web-socket connection correctly.  I have observed this on Chromium based browsers.  The memory leak will eventually lead to the server crashing.  Normally only one connection per client is required, so limiting the number of connections would not normally cause any problems.

* Prevent an assertion failure when using WebSockets

Frequently when using Web Sockets you will get the assert failure:
    	assertion "new_rcv_ann_wnd <= 0xffff" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/tcp.c", line 779, function: tcp_update_rcv_ann_wnd

This will happen particulary when you close the browser window.  This change
prevents the issue from occuring.

* Do not use thread locking with the ESP8266, but instead use an empty placeholder class that can be used to implement locking at a later date.

* Do not use thread locking with the ESP8266, but instead use an empty placeholder class that can be used to implement locking at a later date.

* Add function so that the total number of web-socket clients can be limited easily.  This is to cope with a problem when a browser does not close the web-socket connection correctly.  I have observed this on Chromium based browsers.  The memory leak will eventually lead to the server crashing.  Normally only one connection per client is required, so limiting the number of connections would not normally cause any problems.

* Set the default number of ws clients dependent on processor.
2019-09-24 22:42:40 +03:00
me-no-dev f5ee1935c5 Update README.md 2019-09-24 22:33:23 +03:00
Mike Dunston 59066bd1e4 PrettyAsyncJsonResponse for ArduinoJson 6.x (#539)
* PrettyAsyncJsonResponse for ArduinoJson 6.x

add support for PrettyAsyncJsonResponse in ArduinoJson 6.x

* Update AsyncJson.h

Maintain order of args to AsyncJsonResponse between ArduinoJson 5.x and 6.x compatibility for ease of migration
2019-09-24 21:24:18 +03:00
me-no-dev 69aaf767eb Update README.md 2019-09-24 20:13:55 +03:00
me-no-dev a627e66d53 Update README.md 2019-09-24 16:08:59 +03:00
ray 7c6118f2a0 arg should be closed by va_end() (#601) 2019-09-22 08:58:15 +03:00
me-no-dev 2b1c5c4d78 Create stale.yml 2019-09-21 15:44:55 +03:00
me-no-dev 052df0b6a8 Update build-pio.sh 2019-09-21 15:16:09 +03:00
matt123p 5ea49e313d Prevent an assertion failure when using WebSockets (#584)
Frequently when using Web Sockets you will get the assert failure:
    	assertion "new_rcv_ann_wnd <= 0xffff" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/tcp.c", line 779, function: tcp_update_rcv_ann_wnd

This will happen particulary when you close the browser window.  This change
prevents the issue from occuring.
2019-09-21 13:27:34 +03:00
Me No Dev 41cf4893c6
Setup Github CI (#599)
* Setup Github CI

* Update main.yml

* Update build-pio.sh

* Add error checks to PIO script

* Update build-pio.sh
2019-09-21 12:48:38 +03:00
Me No Dev 0769521ef8
Try to build against PIO (#598) 2019-09-21 11:46:53 +03:00
matt123p aea43f98d1 Add thread locking to improve stability. (#585)
* Add thread locking to improve stability.

* Do not use thread locking with the ESP8266, but instead use an empty placeholder class that can be used to implement locking at a later date.
2019-09-12 19:56:13 +03:00
me-no-dev f0a1c3d486 Remove old build scripts 2019-09-01 19:57:27 +03:00
Me No Dev 29595a7775
Fix Travis builds and add build for ESP8266 (#586)
* Fix Travis builds and add build for ESP8266
2019-09-01 19:56:40 +03:00
Marco Tombesi b0c6144886 Update AsyncJson.h (#533)
for the newest ArduinoJson v6 compatibility
2019-06-24 17:27:35 +02:00
Germán Martín b3b9ec901a Fix sha1 not defined compilation error (#531) 2019-06-23 06:58:25 +02:00
me-no-dev a0d5c618ff Bump the version 2019-06-22 20:46:30 +02:00
Hermann Kraus e952f95b43 Add captive portal example from #228. (#241)
* Add captive portal example from #228.

* Add missing headers.

* Update CaptivePortal.ino
2019-06-22 20:43:41 +02:00
Me No Dev 2dc705cd05
Update README.md 2019-06-22 20:36:54 +02:00
WallyCZ 9a5be71920 Allow override rewrite match (#391) 2019-06-22 20:27:57 +02:00
Luc 736a54af1a Allows to check queue status (#411) 2019-06-22 18:51:01 +02:00
dyarkovoy 5ef7ffcd41 Detect if AsyncWebSocketClient can send data to server and add AsyncWebServer::end() (#501)
* added AsyncWebServer::end()

* added AsyncWebServer::end()

* added bool AsyncWebSocketClient::canSend()

* Fix comparison with WS_MAX_QUEUED_MESSAGES

* Fix comparison with WS_MAX_QUEUED_MESSAGES
2019-06-22 18:47:43 +02:00
rjlexx 6dcea3f5e7 Add handlers by URL templates (#380)
* Add handlers by URL templates

This change allows add handlers by URL templates. 
For example:
server.on("/gpio*", handleGpio);
server.on("/irsend*", handleIrsend);
The "handleGpio" handler will handle all requests starting with "/gpio" and manage all GPIOs.
The "handleGpio" handler will handle all requests starting with "/irsend" and forward commands to IR manager.

* String::replace method changed to String::substring() method
2019-06-22 18:28:24 +02:00
Gérald Guiony 781bddf20c json response is more human readable with PrettyAsyncJsonResponse class (#398)
* Update AsyncJson.h

Adding PrettyAsyncJsonResponse class

* Update AsyncJson.h

* Adding a PrettyAsyncJsonResponse class

json response is more human readable than with AsyncJsonResponse
2019-06-22 18:24:01 +02:00
buddydvd d55dd73e44 Fix compiler warnings for AsyncJson’s _contentLength/_maxContentLength vars (#439)
The type of _contentLength and _maxContentLength should both be unsigned
integer type size_t.
2019-06-22 18:12:53 +02:00
buddydvd fbe191d4f0 Add header ESPAsyncWebServer.h to AsyncJson.h (#440)
This allows us to include `AsyncJson.h` in other
code without the need to first include
`ESPAsyncWebServer.h`.
2019-06-22 18:11:32 +02:00