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

Commit

Permalink
v1.5.0 fixing issue with slow browsers, etc.
Browse files Browse the repository at this point in the history
### 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`
  • Loading branch information
khoih-prog authored Oct 1, 2022
1 parent 316085c commit 5bf64f9
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 61 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:

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

```
Arduino IDE version: 1.8.19
Teensyduino core v1.56
Teensy 4.1 using QNEthernet v0.13.0
Teensyduino core v1.57
Teensy 4.1 using QNEthernet v0.15.0
OS: Ubuntu 20.04 LTS
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
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
Context:
I encountered an endless loop while trying to connect to Local WiFi.
I encountered an endless loop while using this library
Steps to reproduce:
1. ...
Expand Down
105 changes: 57 additions & 48 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@

* [Table of contents](#table-of-contents)
* [Changelog](#changelog)
* [Releases v1.5.0](#releases-v150)
* [Releases v1.4.1](#releases-v141)

---
---

## Changelog

### 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](https://github.com/khoih-prog/AsyncWebServer_RP2040W/issues/3)
2. Add functions and example `Async_AdvancedWebServer_favicon` to support `favicon.ico`

### Releases v1.4.1

1. Initial porting and coding for **Teensy 4.1 using built-in QNEthernet**
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"AsyncWebServer_Teensy41",
"version": "1.4.1",
"version": "1.5.0",
"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.",
"keywords":"async, tcp, http, websocket, webserver, async-tcp, async-http, async-webserver, async-websocket, teensy, teensy41, teensy-41, qnethernet, lwip",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=AsyncWebServer_Teensy41
version=1.4.1
version=1.5.0
author=Hristo Gochkov, Khoi Hoang
maintainer=Khoi Hoang <[email protected]>
sentence=Asynchronous HTTP and WebSocket Server Library for Teensy 4.1 using QNEthernet
Expand Down
Binary file added pics/Async_AdvancedWebServer_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ upload_speed = 921600
;monitor_port = COM11

; Checks for the compatibility with frameworks and dev/platforms
; Adjust as necessary
lib_compat_mode = strict
lib_ldf_mode = chain+
;lib_ldf_mode = deep+

lib_deps =
lib_deps =
; PlatformIO 4.x

; Teensy41_AsyncTCP@>=1.1.0
;
; PlatformIO 5.x
khoih-prog/Teensy41_AsyncTCP@>=1.1.0


build_flags =
Expand Down
11 changes: 11 additions & 0 deletions src/AsyncWebRequest_Teensy41.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,17 @@ AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(int code, const St
return new AsyncBasicResponse(code, contentType, content);
}

/////////////////////////////////////////////////

// KH add for favicon
AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(int code, const String& contentType, const uint8_t * content, size_t len,
AwsTemplateProcessor callback)
{
return new AsyncProgmemResponse(code, contentType, content, len, callback);
}

/////////////////////////////////////////////////

AsyncWebServerResponse * AsyncWebServerRequest::beginResponse(Stream &stream, const String& contentType, size_t len, AwsTemplateProcessor callback)
{
return new AsyncStreamResponse(stream, contentType, len, callback);
Expand Down
6 changes: 5 additions & 1 deletion src/AsyncWebServer_Teensy41.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ AsyncWebServer::AsyncWebServer(uint16_t port)
if (c == NULL)
return;

c->setRxTimeout(3);
// KH set no RxTimeout for slower Firefox / network
//c->setRxTimeout(3);
c->setRxTimeout(0);
//////

AsyncWebServerRequest *r = new AsyncWebServerRequest((AsyncWebServer*)s, c);

if (r == NULL)
Expand Down
5 changes: 5 additions & 0 deletions src/AsyncWebServer_Teensy41.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ class AsyncWebServerRequest
void sendChunked(const String& contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr);

AsyncWebServerResponse *beginResponse(int code, const String& contentType = String(), const String& content = String());

// KH add
AsyncWebServerResponse *beginResponse(int code, const String& contentType, const uint8_t * content, size_t len, AwsTemplateProcessor callback = nullptr);
//////

AsyncWebServerResponse *beginResponse(Stream &stream, const String& contentType, size_t len, AwsTemplateProcessor callback = nullptr);
AsyncWebServerResponse *beginResponse(const String& contentType, size_t len, AwsResponseFiller callback,
AwsTemplateProcessor templateCallback = nullptr);
Expand Down
4 changes: 2 additions & 2 deletions src/Crypto/bearssl_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ void br_ghash_pclmul(void *y, const void *h, const void *data, size_t len);
*
* \return the `pclmul` GHASH implementation, or `0`.
*/
br_ghash br_ghash_pclmul_get(void);
br_ghash br_ghash_pclmul_get();

/**
* \brief GHASH implementation using the POWER8 opcodes.
Expand All @@ -1341,7 +1341,7 @@ void br_ghash_pwr8(void *y, const void *h, const void *data, size_t len);
*
* \return the `pwr8` GHASH implementation, or `0`.
*/
br_ghash br_ghash_pwr8_get(void);
br_ghash br_ghash_pwr8_get();

#ifdef __cplusplus
}
Expand Down

0 comments on commit 5bf64f9

Please sign in to comment.