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

Bug with _parseURL() #21

Closed
redphx opened this issue Jan 25, 2023 · 4 comments
Closed

Bug with _parseURL() #21

redphx opened this issue Jan 25, 2023 · 4 comments
Labels
Need more info Have to post more info, such as MRE

Comments

@redphx
Copy link

redphx commented Jan 25, 2023

_parseURL() doesn't consider https://www.google.com a valid URL, but it does with https://www.google.com/.

@khoih-prog
Copy link
Owner

You have to save us some time by including MRE in any issue. I certainly can create some code to test, but just wasting time, better to use yours.

@khoih-prog khoih-prog added the Need more info Have to post more info, such as MRE label Jan 25, 2023
@redphx
Copy link
Author

redphx commented Jan 26, 2023

Sorry, here is the sketch:

#define _ASYNC_HTTPS_LOGLEVEL_ 4

#include <WiFi.h>
#include "Arduino.h"
#include <AsyncHTTPSRequest_Generic.h>

// Wifi Credentials
const char* WIFI_SSID = "wifi";
const char* WIFI_PASSWORD = "password";

AsyncHTTPSRequest request;

void setup() {
  Serial.begin(115200);

  // WiFi Init
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("[WIFI] connecting to network " + String(WIFI_SSID) );
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("[WIFI] connected with Ip: " + WiFi.localIP().toString() );

  request.setDebug(true);

  request.open("GET", "https://www.google.com");
  // request.open("GET", "https://www.google.com/");
}

void loop() {
}

When URL = https://www.google.com

[AHTTPS] open( GET , url = https://www.google.com
[AHTTPS] open: error parsing URL

When URL = https://www.google.com/

[AHTTPS] open( GET , url = https://www.google.com/
[AHTTPS] open: connecting to hostname = www.google.com:443
[AHTTPS] _client->connecting to www.google.com , 443
[AHTTPS] client.connect OK to www.google.com , 443
[AHTTPS] _onError handler SSL error = OK

khoih-prog added a commit that referenced this issue Feb 1, 2023
### Releases v2.5.0

1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
2. Fix bug of wrong `reqStates`. Check [Callback behavior buggy #19](#19)
3. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](#21)
4. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit that referenced this issue Feb 1, 2023
### Releases v2.5.0

1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
2. Fix bug of wrong `reqStates`. Check [Callback behavior buggy #19](#19)
3. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](#21)
4. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit that referenced this issue Feb 1, 2023
### Releases v2.5.0

1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
2. Fix bug of wrong `reqStates`. Check [Callback behavior buggy #19](#19)
3. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](#21)
4. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit that referenced this issue Feb 1, 2023
### Releases v2.5.0

1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
2. Fix bug of wrong `reqStates`. Check [Callback behavior buggy #19](#19)
3. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](#21)
4. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit that referenced this issue Feb 1, 2023
### Releases v2.5.0

1. Add support to ESP32 boards using `LwIP W6100 Ethernet`
2. Fix bug of wrong `reqStates`. Check [Callback behavior buggy #19](#19)
3. Fix bug of `_parseURL()`. Check [Bug with _parseURL() #21](#21)
4. Improve `README.md` so that links can be used in other sites, such as `PIO`
@khoih-prog
Copy link
Owner

Hi @redphx

The new AsyncHTTPSRequest_Generic v2.5.0 has just been published. Your contribution is noted in Contributions and Thanks

Please test and report more bugs.

Best Regards,


Releases v2.5.0

  1. Add support to ESP32 boards using LwIP W6100 Ethernet
  2. Fix bug of wrong reqStates. Check Callback behavior buggy #19
  3. Fix bug of _parseURL(). Check Bug with _parseURL() #21
  4. Improve README.md so that links can be used in other sites, such as PIO

@khoih-prog
Copy link
Owner

These are the terminal outputs using your test code

Using url = https://www.google.com

[WIFI] connecting to network HueNet.......
[WIFI] connected with Ip: 192.168.2.151
[AHTTPS] open( GET , url = https://www.google.com
[AHTTPS] pathBeg= -1
[AHTTPS] hostEnd= 22
[AHTTPS] portBeg= -1
[AHTTPS] _URL->host= www.google.com
[AHTTPS] _URL->path= 
[AHTTPS] _URL->query= 
[AHTTPS] open: connecting to hostname = www.google.com:443
[AHTTPS] _client->connecting to www.google.com , 443
[AHTTPS] client.connect OK to www.google.com , 443
[AHTTPS] _onError handler SSL error = OK

Using url = https://www.google.com/

[WIFI] connecting to network HueNet.......
[WIFI] connected with Ip: 192.168.2.151
[AHTTPS] open( GET , url = https://www.google.com/
[AHTTPS] pathBeg= 22
[AHTTPS] portBeg= -1
[AHTTPS] _URL->host= www.google.com
[AHTTPS] _URL->path= /
[AHTTPS] _URL->query= 
[AHTTPS] open: connecting to hostname = www.google.com:443
[AHTTPS] _client->connecting to www.google.com , 443
[AHTTPS] client.connect OK to www.google.com , 443
[AHTTPS] _onError handler SSL error = OK

khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Generic that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Generic that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Generic that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Generic that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/Portenta_H7_AsyncHTTPRequest that referenced this issue Feb 1, 2023
### Releases v1.5.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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_RP2040W that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_RP2040W that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_RP2040W that referenced this issue Feb 1, 2023
### 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_ESP32_Ethernet that referenced this issue Feb 1, 2023
### Releases v1.15.0

1. Fix `_parseURL()` bug. 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Teensy41 that referenced this issue Feb 1, 2023
### Releases v1.10.0

1. Fix `_parseURL()` bug. 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPRequest_Teensy41 that referenced this issue Feb 1, 2023
### Releases v1.10.0

1. Fix `_parseURL()` bug. 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPSRequest_ESP32_Ethernet that referenced this issue Feb 1, 2023
### Releases v2.7.0

1. Fix wrong `reqStates` bug. Check [Callback behavior buggy #19](khoih-prog/AsyncHTTPSRequest_Generic#19)
2. Fix `_parseURL()` bug. 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPSRequest_ESP32_Ethernet that referenced this issue Feb 1, 2023
### Releases v2.7.0

1. Fix wrong `reqStates` bug. Check [Callback behavior buggy #19](khoih-prog/AsyncHTTPSRequest_Generic#19)
2. Fix `_parseURL()` bug. 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`
khoih-prog added a commit to khoih-prog/AsyncHTTPSRequest_ESP32_Ethernet that referenced this issue Feb 1, 2023
### Releases v2.7.0

1. Fix wrong `reqStates` bug. Check [Callback behavior buggy #19](khoih-prog/AsyncHTTPSRequest_Generic#19)
2. Fix `_parseURL()` bug. 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`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Need more info Have to post more info, such as MRE
Projects
None yet
Development

No branches or pull requests

2 participants