Skip to content

Commit 95cf055

Browse files
committed
Merge pull request #1398 from dpeckett/malformed-uri-scheme-handling
Fix typo causing crash on missing uri scheme
2 parents 5f80ad5 + ec1c90c commit 95cf055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void HTTPClient::begin(String url, String httpsFingerprint) {
107107
int index = url.indexOf(':');
108108
//int index2;
109109
bool hasPort = false;
110-
if(index) {
110+
if(index >= 0) {
111111
protocol = url.substring(0, index);
112112
url.remove(0, (index + 3)); // remove http:// or https://
113113

0 commit comments

Comments
 (0)