mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Merge pull request #1398 from dpeckett/malformed-uri-scheme-handling
Fix typo causing crash on missing uri scheme
This commit is contained in:
commit
95cf0553e4
@ -107,7 +107,7 @@ void HTTPClient::begin(String url, String httpsFingerprint) {
|
|||||||
int index = url.indexOf(':');
|
int index = url.indexOf(':');
|
||||||
//int index2;
|
//int index2;
|
||||||
bool hasPort = false;
|
bool hasPort = false;
|
||||||
if(index) {
|
if(index >= 0) {
|
||||||
protocol = url.substring(0, index);
|
protocol = url.substring(0, index);
|
||||||
url.remove(0, (index + 3)); // remove http:// or https://
|
url.remove(0, (index + 3)); // remove http:// or https://
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user