1
0
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:
Dirk Mueller 2019-10-01 05:23:25 +02:00 committed by Earle F. Philhower, III
parent 97c926ea91
commit 2a83adb0fd

View File

@ -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;
}