From e9977d62e4919f2c8faca9527975faeb76e5afa1 Mon Sep 17 00:00:00 2001 From: idolpx Date: Thu, 17 Jun 2021 15:08:25 -0500 Subject: [PATCH 1/2] Update ESP8266HTTPClient.cpp Make protocol detection case insensitive --- libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp index f16167127d..f6c2fec879 100644 --- a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp +++ b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp @@ -90,6 +90,7 @@ bool HTTPClient::begin(WiFiClient &client, const String& url) { } String protocol = url.substring(0, index); + protocol.toLower(); if(protocol != "http" && protocol != "https") { DEBUG_HTTPCLIENT("[HTTP-Client][begin] unknown protocol '%s'\n", protocol.c_str()); return false; @@ -137,6 +138,7 @@ bool HTTPClient::beginInternal(const String& __url, const char* expectedProtocol } _protocol = url.substring(0, index); + _protocol.toLower(); url.remove(0, (index + 3)); // remove http:// or https:// if (_protocol == "http") { From fff4c3e73ea22941aa8c0a78f99a97e6d377d715 Mon Sep 17 00:00:00 2001 From: idolpx Date: Thu, 17 Jun 2021 15:10:56 -0500 Subject: [PATCH 2/2] Update ESP8266HTTPClient.cpp Make protocol detection case insensitive --- libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp index f6c2fec879..4400414e65 100644 --- a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp +++ b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp @@ -90,7 +90,7 @@ bool HTTPClient::begin(WiFiClient &client, const String& url) { } String protocol = url.substring(0, index); - protocol.toLower(); + protocol.toLowerCase(); if(protocol != "http" && protocol != "https") { DEBUG_HTTPCLIENT("[HTTP-Client][begin] unknown protocol '%s'\n", protocol.c_str()); return false; @@ -138,7 +138,7 @@ bool HTTPClient::beginInternal(const String& __url, const char* expectedProtocol } _protocol = url.substring(0, index); - _protocol.toLower(); + _protocol.toLowerCase(); url.remove(0, (index + 3)); // remove http:// or https:// if (_protocol == "http") {