mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +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)
|
||||
{
|
||||
// if the new location is only a path then only update the URI
|
||||
if (_location.startsWith("/")) {
|
||||
_uri = _location;
|
||||
if (url && url[0] == '/') {
|
||||
_uri = url;
|
||||
clear();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user