Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 5bf64f9

Browse files
authored
v1.5.0 fixing issue with slow browsers, etc.
### Releases v1.5.0 1. Fix issue with slow browsers or network. Check [Target stops responding after variable time when using Firefox on Windows 10 #3](khoih-prog/AsyncWebServer_RP2040W#3) 2. Add functions and example `Async_AdvancedWebServer_favicon` to support `favicon.ico`
1 parent 316085c commit 5bf64f9

11 files changed

+101
-61
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* `Teensyduino` Core Version (e.g. `Teensyduino core v1.56`)
19-
* `QNEthernet` library version (e.g. `QNEthernet v0.13.0`)
18+
* `Teensyduino` Core Version (e.g. `Teensyduino core v1.57`)
19+
* `QNEthernet` library version (e.g. `QNEthernet v0.15.0`)
2020
* Board type and relevant info
2121
* Contextual information (e.g. what you were trying to achieve)
2222
* Simplest possible steps to reproduce
@@ -29,13 +29,13 @@ Please ensure to specify the following:
2929

3030
```
3131
Arduino IDE version: 1.8.19
32-
Teensyduino core v1.56
33-
Teensy 4.1 using QNEthernet v0.13.0
32+
Teensyduino core v1.57
33+
Teensy 4.1 using QNEthernet v0.15.0
3434
OS: Ubuntu 20.04 LTS
35-
Linux xy-Inspiron-3593 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
35+
Linux xy-Inspiron-3593 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3636
3737
Context:
38-
I encountered an endless loop while trying to connect to Local WiFi.
38+
I encountered an endless loop while using this library
3939
4040
Steps to reproduce:
4141
1. ...

README.md

Lines changed: 57 additions & 48 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@
1313

1414
* [Table of contents](#table-of-contents)
1515
* [Changelog](#changelog)
16+
* [Releases v1.5.0](#releases-v150)
1617
* [Releases v1.4.1](#releases-v141)
1718

1819
---
1920
---
2021

2122
## Changelog
2223

24+
### Releases v1.5.0
25+
26+
1. Fix issue with slow browsers or network. Check [Target stops responding after variable time when using Firefox on Windows 10 #3](https://github.com/khoih-prog/AsyncWebServer_RP2040W/issues/3)
27+
2. Add functions and example `Async_AdvancedWebServer_favicon` to support `favicon.ico`
28+
2329
### Releases v1.4.1
2430

2531
1. Initial porting and coding for **Teensy 4.1 using built-in QNEthernet**

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"AsyncWebServer_Teensy41",
3-
"version": "1.4.1",
3+
"version": "1.5.0",
44
"description":"Asynchronous HTTP and WebSocket Server Library for Teensy 4.1 using QNEthernet. This library is one of the current or future Async libraries to support Teensy 4.1 using QNEthernet, such as AsyncHTTPRequest_Generic, AsyncHTTPSRequest_Generic, AsyncMQTT_Generic, Teensy41_AsyncWebServer, Teensy41_AsyncUDP, Teensy41_AsyncDNSServer, AsyncWebServer_Teensy41_SSL, etc.",
55
"keywords":"async, tcp, http, websocket, webserver, async-tcp, async-http, async-webserver, async-websocket, teensy, teensy41, teensy-41, qnethernet, lwip",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncWebServer_Teensy41
2-
version=1.4.1
2+
version=1.5.0
33
author=Hristo Gochkov, Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
sentence=Asynchronous HTTP and WebSocket Server Library for Teensy 4.1 using QNEthernet
29.5 KB
Loading

platformio/platformio.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ upload_speed = 921600
2727
;monitor_port = COM11
2828

2929
; Checks for the compatibility with frameworks and dev/platforms
30+
; Adjust as necessary
3031
lib_compat_mode = strict
32+
lib_ldf_mode = chain+
33+
;lib_ldf_mode = deep+
3134

32-
lib_deps =
35+
lib_deps =
3336
; PlatformIO 4.x
34-
37+
; Teensy41_AsyncTCP@>=1.1.0
38+
;
3539
; PlatformIO 5.x
40+
khoih-prog/Teensy41_AsyncTCP@>=1.1.0
3641

3742

3843
build_flags =

src/AsyncWebRequest_Teensy41.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,17 @@ AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(int code, const St
10251025
return new AsyncBasicResponse(code, contentType, content);
10261026
}
10271027

1028+
/////////////////////////////////////////////////
1029+
1030+
// KH add for favicon
1031+
AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(int code, const String& contentType, const uint8_t * content, size_t len,
1032+
AwsTemplateProcessor callback)
1033+
{
1034+
return new AsyncProgmemResponse(code, contentType, content, len, callback);
1035+
}
1036+
1037+
/////////////////////////////////////////////////
1038+
10281039
AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(Stream &stream, const String& contentType, size_t len, AwsTemplateProcessor callback)
10291040
{
10301041
return new AsyncStreamResponse(stream, contentType, len, callback);

src/AsyncWebServer_Teensy41.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ AsyncWebServer::AsyncWebServer(uint16_t port)
5151
if (c == NULL)
5252
return;
5353

54-
c->setRxTimeout(3);
54+
// KH set no RxTimeout for slower Firefox / network
55+
//c->setRxTimeout(3);
56+
c->setRxTimeout(0);
57+
//////
58+
5559
AsyncWebServerRequest *r = new AsyncWebServerRequest((AsyncWebServer*)s, c);
5660

5761
if (r == NULL)

src/AsyncWebServer_Teensy41.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,11 @@ class AsyncWebServerRequest
344344
void sendChunked(const String& contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr);
345345

346346
AsyncWebServerResponse *beginResponse(int code, const String& contentType = String(), const String& content = String());
347+
348+
// KH add
349+
AsyncWebServerResponse *beginResponse(int code, const String& contentType, const uint8_t * content, size_t len, AwsTemplateProcessor callback = nullptr);
350+
//////
351+
347352
AsyncWebServerResponse *beginResponse(Stream &stream, const String& contentType, size_t len, AwsTemplateProcessor callback = nullptr);
348353
AsyncWebServerResponse *beginResponse(const String& contentType, size_t len, AwsResponseFiller callback,
349354
AwsTemplateProcessor templateCallback = nullptr);

0 commit comments

Comments
 (0)