You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i updated to latest release 2.6.0 before my last ota update to devices and now devices are not updating as they do before. i go through debug process where i found subjected issue.
below line return false for redirects in ota update
bool HTTPClient::setURL(const String& url)
{
// if the new location is only a path then only update the URI
if (url && url[0] == '/') {
_uri = url;
clear();
return true;
}
if (!url.startsWith(_protocol + ':')) {
DEBUG_HTTPCLIENT("[HTTP-Client][setURL] new URL not the same protocol, expected '%s', URL: '%s'\n", _protocol.c_str(), url.c_str());
return false;
}
// disconnect but preserve _client
Serial.printf("check url1: %s\n", url.c_str());
disconnect(true);
Serial.printf("check url2: %s\n", url.c_str());
clear();
Serial.printf("check url3: %s\n", url.c_str());
return beginInternal(url, nullptr);
}
and at
bool HTTPClient::beginInternal(const String& __url, const char* expectedProtocol)
{
String url(__url);
DEBUG_HTTPCLIENT("[HTTP-Client][begin] url: %s\n", url.c_str());
clear();
Serial.printf("check url4: %s\n", url.c_str());
// check for : (http: or https:
int index = url.indexOf(':');
if(index < 0) {
DEBUG_HTTPCLIENT("[HTTP-Client][begin] failed to parse protocol\n");
return false;
}
and resulted that clear() function clears the location url before pass it to beginInterval function.
don't know much why it is cleared before passing, since beginInterval function calls clear at beginning.
i get it done by commenting clear().
The text was updated successfully, but these errors were encountered:
OK - this is because the parameter to setURLwas changed to to a const String& in #6571. And given that beginInternal both forces a local copy of the url and calls clear I'll put a PR together that removes the clear just before beginInternal from setURL.
i updated to latest release 2.6.0 before my last ota update to devices and now devices are not updating as they do before. i go through debug process where i found subjected issue.
below line return false for redirects in ota update
Arduino/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Line 555 in 05454df
so i did serial debug at
and at
where i found serial debug output as
and resulted that clear() function clears the location url before pass it to beginInterval function.
don't know much why it is cleared before passing, since beginInterval function calls clear at beginning.
i get it done by commenting clear().
The text was updated successfully, but these errors were encountered: