Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit c9a376e

Browse files
authored
v1.13.0 for LwIP W6100 and fix bug
### Releases v1.13.0 1. Add support to ESP32 boards using `LwIP W6100 Ethernet` 2. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](khoih-prog/AsyncHTTPSRequest_Generic#21) 3. Improve `README.md` so that links can be used in other sites, such as `PIO`
1 parent cad009d commit c9a376e

10 files changed

+361
-250
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,32 @@ However, before reporting a bug please check through the following:
1010

1111
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/new).
1212

13+
---
14+
1315
### How to submit a bug report
1416

1517
Please ensure to specify the following:
1618

1719
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* `ESP8266`,`ESP32` or `STM32` Core Version (e.g. ESP8266 core v3.0.2, ESP32 v2.0.5 or STM32 v2.3.0)
20+
* `ESP8266` or`ESP32` Core Version (e.g. ESP8266 core v3.1.1, ESP32 v2.0.6)
1921
* Contextual information (e.g. what you were trying to achieve)
2022
* Simplest possible steps to reproduce
2123
* Anything that might be relevant in your opinion, such as:
2224
* Operating system (Windows, Ubuntu, etc.) and the output of `uname -a`
2325
* Network configuration
2426

2527

28+
Please be educated, civilized and constructive as you've always been. Disrespective posts against [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-event-code-of-conduct) will be ignored and deleted.
29+
30+
---
31+
2632
### Example
2733

2834
```
2935
Arduino IDE version: 1.8.19
30-
ESP32 Core Version 2.0.5
36+
ESP32 Core Version 2.0.6
3137
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
38+
Linux xy-Inspiron-3593 5.15.0-58-generic #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
3339
3440
Context:
3541
I encountered a crash while using this library

README.md

Lines changed: 286 additions & 224 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
1111
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
1212

13+
1314
---
1415
---
1516

1617
## Table of Contents
1718

1819
* [Changelog](#changelog)
20+
* [Releases v1.13.0](#releases-v1130)
1921
* [Releases v1.12.0](#releases-v1120)
2022
* [Releases v1.11.0](#releases-v1110)
2123
* [Releases v1.10.2](#releases-v1102)
@@ -51,6 +53,12 @@
5153

5254
## Changelog
5355

56+
### Releases v1.13.0
57+
58+
1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
59+
2. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/21)
60+
3. Improve `README.md` so that links can be used in other sites, such as `PIO`
61+
5462
### Releases v1.12.0
5563

5664
1. Add support to ESP32 boards using `LwIP W5500 Ethernet`

library.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name":"AsyncHTTPRequest_Generic",
3-
"version": "1.12.0",
4-
"description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP32 with LwIP ENC28J60, ESP8266 (WiFi, W5x00 or ENC28J60) and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.",
5-
"keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, ESP32-S3, ESP32-C3, wt32-eth01, stm32, ethernet, wifi, lan8742a, nucleo-144, stm32f7, W5x00, ENC28J60",
3+
"version": "1.13.0",
4+
"description":"Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP32 with LwIP ENC28J60, W5500 or W6100, ESP8266 (WiFi, W5x00 or ENC28J60) and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.",
5+
"keywords":"communication, async, tcp, http, ESP8266, ESP32, ESP32-S2, ESP32-S3, ESP32-C3, wt32-eth01, stm32, ethernet, wifi, lan8742a, nucleo-144, stm32f7, W5x00, ENC28J60, w6100, lwip, lwip-ethernet",
66
"authors": [
77
{
88
"name": "Bob Lemaire",
@@ -69,13 +69,19 @@
6969
{
7070
"owner": "khoih-prog",
7171
"name": "WebServer_ESP32_ENC",
72-
"version": ">=1.5.1",
72+
"version": ">=1.5.3",
7373
"platforms": ["espressif32"]
7474
},
7575
{
7676
"owner": "khoih-prog",
7777
"name": "WebServer_ESP32_W5500",
78-
"version": ">=1.5.1",
78+
"version": ">=1.5.3",
79+
"platforms": ["espressif32"]
80+
},
81+
{
82+
"owner": "khoih-prog",
83+
"name": "WebServer_ESP32_W6100",
84+
"version": ">=1.5.3",
7985
"platforms": ["espressif32"]
8086
},
8187
{

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name=AsyncHTTPRequest_Generic
2-
version=1.12.0
2+
version=1.13.0
33
author=Bob Lemaire,Khoi Hoang <[email protected]>
44
maintainer=Khoi Hoang <[email protected]>
55
license=GPLv3
6-
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP32 with LwIP ENC28J60, ESP8266 (WiFi, W5x00 or ENC28J60) and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.
6+
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP32 with LwIP ENC28J60, W5500 or W6100, ESP8266 (WiFi, W5x00 or ENC28J60) and currently STM32 with LAN8720 or built-in LAN8742A Ethernet.
77
paragraph=This AsyncHTTPRequest_Generic Library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, for ESP32 (including WT32_ETH01, LwIP ENC28J60), ESP8266 (WiFi, W5x00 or ENC28J60) and STM32 built-in LAN8742A Ethernet, such as Nucleo-144 F767ZI, etc.
88
category=Communication
99
url=https://github.com/khoih-prog/AsyncHTTPRequest_Generic
1010
architectures=*
11-
depends=ESPAsync_WiFiManager, STM32duino LwIP, STM32duino STM32Ethernet, WebServer_WT32_ETH01, WebServer_ESP32_ENC, WebServer_ESP32_W5500
11+
depends=ESPAsync_WiFiManager, STM32duino LwIP, STM32duino STM32Ethernet, WebServer_WT32_ETH01, WebServer_ESP32_ENC, WebServer_ESP32_W5500, WebServer_ESP32_W6100
1212
includes=AsyncHTTPRequest_Generic.h, AsyncHTTPRequest_Generic.hpp

platformio/platformio.ini

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ lib_deps =
4848
; ESPAsync_WiFiManager@>=1.15.1
4949
; LittleFS_esp32@>=1.0.6
5050
; WebServer_WT32_ETH01@>=1.5.1
51-
; WebServer_ESP32_ENC@>=1.5.1
51+
; WebServer_ESP32_ENC@>=1.5.3
52+
; WebServer_ESP32_W5500@>=1.5.3
53+
; WebServer_ESP32_W6100@>=1.5.3
5254
;
5355
; PlatformIO 5.x
5456
; me-no-dev/AsyncTCP@>=1.1.1
@@ -60,7 +62,9 @@ lib_deps =
6062
; khoih-prog/ESPAsync_WiFiManager@>=1.15.1
6163
; lorol/LittleFS_esp32@>=1.0.6
6264
; khoih-prog/WebServer_WT32_ETH01@>=1.5.1
63-
; khoih-prog/WebServer_ESP32_ENC@>=1.5.1
65+
; khoih-prog/WebServer_ESP32_ENC@>=1.5.3
66+
; khoih-prog/WebServer_ESP32_W5500@>=1.5.3
67+
; khoih-prog/WebServer_ESP32_W6100@>=1.5.3
6468

6569
build_flags =
6670
; set your debug output (default=Serial)
@@ -133,14 +137,18 @@ lib_deps =
133137
; ESPAsync_WiFiManager@>=1.15.1
134138
; LittleFS_esp32@>=1.0.6
135139
; WebServer_WT32_ETH01@>=1.5.1
136-
; WebServer_ESP32_ENC@>=1.5.1
140+
; WebServer_ESP32_ENC@>=1.5.3
141+
; WebServer_ESP32_W5500@>=1.5.3
142+
; WebServer_ESP32_W6100@>=1.5.3
137143
;
138144
; PlatformIO 5.x
139145
me-no-dev/AsyncTCP@>=1.1.1
140146
khoih-prog/ESPAsync_WiFiManager@>=1.15.1
141147
; lorol/LittleFS_esp32@>=1.0.6
142148
khoih-prog/WebServer_WT32_ETH01@>=1.5.1
143-
khoih-prog/WebServer_ESP32_ENC@>=1.5.1
149+
khoih-prog/WebServer_ESP32_ENC@>=1.5.3
150+
khoih-prog/WebServer_ESP32_W5500@>=1.5.3
151+
khoih-prog/WebServer_ESP32_W6100@>=1.5.3
144152

145153
; ============================================================
146154
; Board configuration

src/AsyncHTTPRequest_Debug_Generic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 1.12.0
21+
Version: 1.13.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
@@ -37,6 +37,7 @@
3737
1.10.2 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
3838
1.11.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
3939
1.12.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
40+
1.13.0 K Hoang 01/02/2023 Add support to ESP32 using LwIP W6100 Ethernet. Fix _parseURL() bug
4041
*****************************************************************************************************************************/
4142

4243
#pragma once

src/AsyncHTTPRequest_Generic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 1.12.0
21+
Version: 1.13.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
@@ -37,6 +37,7 @@
3737
1.10.2 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
3838
1.11.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
3939
1.12.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
40+
1.13.0 K Hoang 01/02/2023 Add support to ESP32 using LwIP W6100 Ethernet. Fix _parseURL() bug
4041
*****************************************************************************************************************************/
4142

4243
#pragma once

src/AsyncHTTPRequest_Generic.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 1.12.0
21+
Version: 1.13.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
@@ -37,6 +37,7 @@
3737
1.10.2 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
3838
1.11.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
3939
1.12.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
40+
1.13.0 K Hoang 01/02/2023 Add support to ESP32 using LwIP W6100 Ethernet. Fix _parseURL() bug
4041
*****************************************************************************************************************************/
4142

4243
#pragma once
@@ -46,13 +47,13 @@
4647

4748
////////////////////////////////////////
4849

49-
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.12.0"
50+
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION "AsyncHTTPRequest_Generic v1.13.0"
5051

5152
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MAJOR 1
52-
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MINOR 12
53+
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MINOR 13
5354
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_PATCH 0
5455

55-
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT 1012000
56+
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT 1013000
5657

5758
////////////////////////////////////////
5859

src/AsyncHTTPRequest_Impl_Generic.h

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 1.12.0
21+
Version: 1.13.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
@@ -37,6 +37,7 @@
3737
1.10.2 K Hoang 09/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites
3838
1.11.0 K Hoang 28/11/2022 Add support to ESP32 boards using LwIP ENC28J60 Ethernet
3939
1.12.0 K Hoang 30/11/2022 Add support to ESP32 boards using LwIP W5500 Ethernet. Fix bug
40+
1.13.0 K Hoang 01/02/2023 Add support to ESP32 using LwIP W6100 Ethernet. Fix _parseURL() bug
4041
*****************************************************************************************************************************/
4142

4243
#pragma once
@@ -1198,12 +1199,29 @@ bool AsyncHTTPRequest::_parseURL(const String& url)
11981199
}
11991200

12001201
int pathBeg = url.indexOf('/', hostBeg);
1201-
1202+
1203+
int hostEnd;
1204+
int portBeg;
1205+
12021206
if (pathBeg < 0)
1203-
return false;
1207+
{
1208+
if ( url.indexOf(':', hostBeg) < 0 )
1209+
{
1210+
// No port, just https://www.aaa.com
1211+
hostEnd = url.length();
1212+
}
1213+
else
1214+
{
1215+
// with port, https://www.aaa.com:443
1216+
hostEnd = url.indexOf(':', hostBeg);
1217+
}
1218+
}
1219+
else
1220+
{
1221+
hostEnd = pathBeg;
1222+
}
12041223

1205-
int hostEnd = pathBeg;
1206-
int portBeg = url.indexOf(':', hostBeg);
1224+
portBeg = url.indexOf(':', hostBeg);
12071225

12081226
if (portBeg > 0 && portBeg < pathBeg)
12091227
{

0 commit comments

Comments
 (0)