mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Fix setURL() handling of path-only parameters (#6570)
The function accidentally compared the current location instead of the passed in (new) location, which didn't match intended logic and the code comment.
This commit is contained in:
parent
97c926ea91
commit
2a83adb0fd
@ -536,8 +536,8 @@ void HTTPClient::setTimeout(uint16_t timeout)
|
|||||||
bool HTTPClient::setURL(String url)
|
bool HTTPClient::setURL(String url)
|
||||||
{
|
{
|
||||||
// if the new location is only a path then only update the URI
|
// if the new location is only a path then only update the URI
|
||||||
if (_location.startsWith("/")) {
|
if (url && url[0] == '/') {
|
||||||
_uri = _location;
|
_uri = url;
|
||||||
clear();
|
clear();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user