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

Commit a491c63

Browse files
authored
v1.3.0 to fix _parseURL() bug
### Release v1.3.0 1. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](khoih-prog/AsyncHTTPSRequest_Generic#21) 2. Improve `README.md` so that links can be used in other sites, such as `PIO`
1 parent 30f0d80 commit a491c63

9 files changed

+84
-48
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ 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_RP2040W/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-
* `RP2040` Core Version (e.g. RP2040 core v2.6.3)
20+
* `RP2040` Core Version (e.g. RP2040 core v2.7.1)
1921
* `RP2040` Board type (e.g. RASPBERRY_PI_PICO_W)
2022
* Contextual information (e.g. what you were trying to achieve)
2123
* Simplest possible steps to reproduce
@@ -24,14 +26,18 @@ Please ensure to specify the following:
2426
* Network configuration
2527

2628

29+
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.
30+
31+
---
32+
2733
### Example
2834

2935
```
3036
Arduino IDE version: 1.8.19
31-
RP2040 core v2.6.3
37+
RP2040 core v2.7.1
3238
RASPBERRY_PI_PICO_W Module
3339
OS: Ubuntu 20.04 LTS
34-
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
40+
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
3541
3642
Context:
3743
I encountered a crash while using this library

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<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>
1010
<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>
1111

12+
1213
---
1314
---
1415

@@ -27,13 +28,13 @@
2728
* [VS Code & PlatformIO](#vs-code--platformio)
2829
* [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
2930
* [Examples](#examples)
30-
* [1. AsyncHTTPRequest](examples/AsyncHTTPRequest)
31-
* [2. AsyncCustomHeader](examples/AsyncCustomHeader)
32-
* [3. AsyncDweetGet](examples/AsyncDweetGet)
33-
* [4. AsyncDweetPost](examples/AsyncDweetPost)
34-
* [5. AsyncSimpleGET](examples/AsyncSimpleGET)
35-
* [6. AsyncWebClientRepeating](examples/AsyncWebClientRepeating)
36-
* [7. **multiFileProject**](examples/multiFileProject)
31+
* [1. AsyncHTTPRequest](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest)
32+
* [2. AsyncCustomHeader](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncCustomHeader)
33+
* [3. AsyncDweetGet](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncDweetGet)
34+
* [4. AsyncDweetPost](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncDweetPost)
35+
* [5. AsyncSimpleGET](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncSimpleGET)
36+
* [6. AsyncWebClientRepeating](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncWebClientRepeating)
37+
* [7. **multiFileProject**](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/multiFileProject)
3738
* [Example AsyncHTTPRequest](#example-asynchttprequest)
3839
* [1. File AsyncHTTPRequest.ino](#1-file-asynchttprequestino)
3940
* [2. File defines.h](#2-file-definesh)
@@ -108,7 +109,7 @@ This library is based on, modified from:
108109
## Prerequisites
109110

110111
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
111-
2. [`Earle Philhower's arduino-pico core v2.6.3+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
112+
2. [`Earle Philhower's arduino-pico core v2.7.1+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
112113
3. [`AsyncTCP_RP2040W library v1.1.0+`](https://github.com/khoih-prog/AsyncTCP_RP2040W) for RASPBERRY_PI_PICO_W with CYW43439 WiFi. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
113114

114115
---
@@ -155,7 +156,7 @@ in many files. But be sure to use the following `.h` file **in just 1 `.h`, `.cp
155156
#include "AsyncHTTPRequest_RP2040W.h" //https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W
156157
```
157158

158-
Check the new [**multiFileProject** example](examples/multiFileProject) for a `HOWTO` demo.
159+
Check the new [**multiFileProject** example](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/multiFileProject) for a `HOWTO` demo.
159160

160161
Have a look at the discussion in [Different behaviour using the src_cpp or src_h lib #80](https://github.com/khoih-prog/ESPAsync_WiFiManager/discussions/80)
161162

@@ -165,28 +166,28 @@ Have a look at the discussion in [Different behaviour using the src_cpp or src_h
165166

166167
### Examples
167168

168-
1. [AsyncHTTPRequest](examples/AsyncHTTPRequest)
169-
2. [AsyncCustomHeader](examples/AsyncCustomHeader)
170-
3. [AsyncDweetGet](examples/AsyncDweetGet)
171-
4. [AsyncDweetPost](examples/AsyncDweetPost)
172-
5. [AsyncSimpleGET](examples/AsyncSimpleGET)
173-
6. [AsyncWebClientRepeating](examples/AsyncWebClientRepeating)
174-
7. [multiFileProject](examples/multiFileProject)
169+
1. [AsyncHTTPRequest](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest)
170+
2. [AsyncCustomHeader](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncCustomHeader)
171+
3. [AsyncDweetGet](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncDweetGet)
172+
4. [AsyncDweetPost](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncDweetPost)
173+
5. [AsyncSimpleGET](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncSimpleGET)
174+
6. [AsyncWebClientRepeating](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncWebClientRepeating)
175+
7. [multiFileProject](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/multiFileProject)
175176

176177

177178
---
178179

179-
### Example [AsyncHTTPRequest](examples/AsyncHTTPRequest)
180+
### Example [AsyncHTTPRequest](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest)
180181

181182
Please take a look at other examples, as well.
182183

183-
#### 1. File [AsyncHTTPRequest.ino](examples/AsyncHTTPRequest/AsyncHTTPRequest.ino)
184+
#### 1. File [AsyncHTTPRequest.ino](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest/AsyncHTTPRequest.ino)
184185

185186
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/73cdc771d7613d2f09a43bf727abf14bf98b1b01/examples/AsyncHTTPRequest/AsyncHTTPRequest.ino#L41-L193
186187

187188
---
188189

189-
#### 2. File [defines.h](examples/AsyncHTTPRequest/defines.h)
190+
#### 2. File [defines.h](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest/defines.h)
190191

191192
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/73cdc771d7613d2f09a43bf727abf14bf98b1b01/examples/AsyncHTTPRequest/defines.h#L20-L30
192193

@@ -195,12 +196,12 @@ https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/73cdc771d7613d2f09a4
195196

196197
### Debug Terminal Output Samples
197198

198-
#### 1. [AsyncHTTPRequest](examples/AsyncHTTPRequest) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
199+
#### 1. [AsyncHTTPRequest](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncHTTPRequest) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
199200

200201
```cpp
201202
Start AsyncHTTPRequest on RASPBERRY_PI_PICO_W
202203
AsyncTCP_RP2040W v1.1.0
203-
AsyncHTTPRequest_RP2040W v1.2.2
204+
AsyncHTTPRequest_RP2040W v1.3.0
204205
Connecting to SSID: HueNet1
205206
SSID: HueNet1
206207
Local IP Address: 192.168.2.77
@@ -209,30 +210,30 @@ Request sent
209210
**************************************
210211
abbreviation: EST
211212
client_ip: aaa.bbb.ccc.ddd
212-
datetime: 2022-11-10T12:51:21.828792-05:00
213-
day_of_week: 4
214-
day_of_year: 314
213+
datetime: 2023-01-31T23:54:16.675525-05:00
214+
day_of_week: 2
215+
day_of_year: 31
215216
dst: false
216217
dst_from:
217218
dst_offset: 0
218219
dst_until:
219220
raw_offset: -18000
220221
timezone: America/Toronto
221-
unixtime: 1668102681
222-
utc_datetime: 2022-11-10T17:51:21.828792+00:00
222+
unixtime: 1675227256
223+
utc_datetime: 2023-02-01T04:54:16.675525+00:00
223224
utc_offset: -05:00
224-
week_number: 45
225+
week_number: 5
225226
**************************************
226227
```
227228

228229
---
229230

230-
#### 2. [AsyncDweetPOST](examples/AsyncDweetPOST) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
231+
#### 2. [AsyncDweetPOST](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncDweetPOST) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
231232

232233
```cpp
233234
Start AsyncDweetPOST on RASPBERRY_PI_PICO_W with RP2040W CYW43439 WiFi
234235
AsyncTCP_RP2040W v1.1.0
235-
AsyncHTTPRequest_RP2040W v1.2.2
236+
AsyncHTTPRequest_RP2040W v1.3.0
236237
Connecting to SSID: HueNet1
237238
SSID: HueNet1
238239
Local IP Address: 192.168.2.180
@@ -249,12 +250,12 @@ Actual value: 88
249250
250251
---
251252
252-
#### 3. [AsyncWebClientRepeating](examples/AsyncWebClientRepeating) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
253+
#### 3. [AsyncWebClientRepeating](https://github.com/khoih-prog/https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/tree/main/examples/AsyncWebClientRepeating) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
253254
254255
```cpp
255256
Start AsyncWebClientRepeating on RASPBERRY_PI_PICO_W
256257
AsyncTCP_RP2040W v1.1.0
257-
AsyncHTTPRequest_RP2040W v1.2.2
258+
AsyncHTTPRequest_RP2040W v1.3.0
258259
Connecting to SSID: HueNet1
259260
SSID: HueNet1
260261
Local IP Address: 192.168.2.180
@@ -357,7 +358,8 @@ Submit issues to: [AsyncHTTPRequest_RP2040W issues](https://github.com/khoih-pro
357358
8. Fix bug of wrong `reqStates`
358359
9. Default to reconnect to the same `host:port` after connected for new HTTP sites.
359360
10. Use `allman astyle` and add `utils`
360-
361+
11. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/21)
362+
12. Improve `README.md` so that links can be used in other sites, such as `PIO`
361363

362364
---
363365
---

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
<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>
1010
<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>
1111

12+
1213
---
1314
---
1415

1516
## Table of Contents
1617

1718
* [Changelog](#changelog)
19+
* [Release v1.3.0](#Release-v130)
1820
* [Release v1.2.2](#Release-v122)
1921
* [Release v1.2.1](#Release-v121)
2022
* [Release v1.2.0](#Release-v120)
@@ -28,6 +30,11 @@
2830

2931
## Changelog
3032

33+
### Release v1.3.0
34+
35+
1. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/21)
36+
2. Improve `README.md` so that links can be used in other sites, such as `PIO`
37+
3138
### Release v1.2.2
3239

3340
1. Default to reconnect to the same `host:port` after connected for new HTTP sites. Check [Host/Headers not always sent with 1.10.1 #44](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/44)

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "AsyncHTTPRequest_RP2040W",
3-
"version": "1.2.2",
3+
"version": "1.3.0",
44
"keywords": "communication, http, async, websocket, webserver, async-webserver, async-tcp, async-udp, async-websocket, async-http, ssl, tls, rp2040, rp2040w, raspberry-pi-pico-w, cyw43439, wifi",
55
"description": "Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP_RP2040W library for RASPBERRY_PI_PICO_W with CYW43439 WiFi. This library, which relies on AsyncTCP_RP2040W, is part of a series of advanced Async libraries, such as AsyncTCP_RP2040W, AsyncUDP_RP2040W, AsyncWebSockets_RP2040W, AsyncWebServer_RP2040W, AsyncHTTPRequest_RP2040W, AsyncHTTPSRequest_RP2040W, etc.",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncHTTPRequest_RP2040W
2-
version=1.2.2
2+
version=1.3.0
33
author=Bob Lemaire,Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP_RP2040W library for RASPBERRY_PI_PICO_W with CYW43439 WiFi.

src/AsyncHTTPRequest_RP2040W.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
You should have received a copy of the GNU General Public License along with this program.
1717
If not, see <https://www.gnu.org/licenses/>
1818
19-
Version: 1.2.2
19+
Version: 1.3.0
2020
2121
Version Modified By Date Comments
2222
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 21/10/2022 Fix bug. Clean up
2828
1.2.1 K Hoang 22/10/2022 Fix bug of wrong reqStates
2929
1.2.1 K Hoang 10/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites. Fix bug
30+
1.3.0 K Hoang 01/02/2023 Fix _parseURL() bug
3031
*****************************************************************************************************************************/
3132

3233
#pragma once

src/AsyncHTTPRequest_RP2040W.hpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
You should have received a copy of the GNU General Public License along with this program.
1717
If not, see <https://www.gnu.org/licenses/>
1818
19-
Version: 1.2.2
19+
Version: 1.3.0
2020
2121
Version Modified By Date Comments
2222
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 21/10/2022 Fix bug. Clean up
2828
1.2.1 K Hoang 22/10/2022 Fix bug of wrong reqStates
2929
1.2.1 K Hoang 10/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites. Fix bug
30+
1.3.0 K Hoang 01/02/2023 Fix _parseURL() bug
3031
*****************************************************************************************************************************/
3132

3233
#pragma once
@@ -74,13 +75,13 @@
7475

7576
////////////////////////////////////////
7677

77-
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION "AsyncHTTPRequest_RP2040W v1.2.2"
78+
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION "AsyncHTTPRequest_RP2040W v1.3.0"
7879

7980
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_MAJOR 1
80-
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_MINOR 2
81-
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_PATCH 2
81+
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_MINOR 3
82+
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_PATCH 0
8283

83-
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_INT 1002002
84+
#define ASYNC_HTTP_REQUEST_RP2040W_VERSION_INT 1003000
8485

8586
////////////////////////////////////////
8687

src/AsyncHTTPRequest_RP2040W_Debug.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
You should have received a copy of the GNU General Public License along with this program.
1717
If not, see <https://www.gnu.org/licenses/>
1818
19-
Version: 1.2.2
19+
Version: 1.3.0
2020
2121
Version Modified By Date Comments
2222
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 21/10/2022 Fix bug. Clean up
2828
1.2.1 K Hoang 22/10/2022 Fix bug of wrong reqStates
2929
1.2.1 K Hoang 10/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites. Fix bug
30+
1.3.0 K Hoang 01/02/2023 Fix _parseURL() bug
3031
*****************************************************************************************************************************/
3132

3233
#pragma once

src/AsyncHTTPRequest_RP2040W_Impl.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
You should have received a copy of the GNU General Public License along with this program.
1717
If not, see <https://www.gnu.org/licenses/>
1818
19-
Version: 1.2.2
19+
Version: 1.3.0
2020
2121
Version Modified By Date Comments
2222
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.2.0 K Hoang 21/10/2022 Fix bug. Clean up
2828
1.2.1 K Hoang 22/10/2022 Fix bug of wrong reqStates
2929
1.2.1 K Hoang 10/11/2022 Default to reconnect to the same host:port after connected for new HTTP sites. Fix bug
30+
1.3.0 K Hoang 01/02/2023 Fix _parseURL() bug
3031
*****************************************************************************************************************************/
3132

3233
#pragma once
@@ -1165,11 +1166,28 @@ bool AsyncHTTPRequest::_parseURL(const String& url)
11651166

11661167
int pathBeg = url.indexOf('/', hostBeg);
11671168

1169+
int hostEnd;
1170+
int portBeg;
1171+
11681172
if (pathBeg < 0)
1169-
return false;
1173+
{
1174+
if ( url.indexOf(':', hostBeg) < 0 )
1175+
{
1176+
// No port, just https://www.aaa.com
1177+
hostEnd = url.length();
1178+
}
1179+
else
1180+
{
1181+
// with port, https://www.aaa.com:443
1182+
hostEnd = url.indexOf(':', hostBeg);
1183+
}
1184+
}
1185+
else
1186+
{
1187+
hostEnd = pathBeg;
1188+
}
11701189

1171-
int hostEnd = pathBeg;
1172-
int portBeg = url.indexOf(':', hostBeg);
1190+
portBeg = url.indexOf(':', hostBeg);
11731191

11741192
if (portBeg > 0 && portBeg < pathBeg)
11751193
{

0 commit comments

Comments
 (0)