Fix persistance issue found, see ESP8266 issue #6152 (#2851)

This commit is contained in:
Jeroen88
2019-06-05 14:00:00 +02:00
committed by Me No Dev
parent 89feacb813
commit 7d7824701f
2 changed files with 4 additions and 1 deletions

View File

@ -1080,6 +1080,8 @@ int HTTPClient::handleHeaderResponse()
return HTTPC_ERROR_NOT_CONNECTED;
}
_canReuse = !_useHTTP10;
String transferEncoding;
_returnCode = -1;
_size = -1;
@ -1098,6 +1100,7 @@ int HTTPClient::handleHeaderResponse()
if(headerLine.startsWith("HTTP/1.")) {
_returnCode = headerLine.substring(9, headerLine.indexOf(' ', 9)).toInt();
_canReuse = (_returnCode != '0');
} else if(headerLine.indexOf(':')) {
String headerName = headerLine.substring(0, headerLine.indexOf(':'));
String headerValue = headerLine.substring(headerLine.indexOf(':') + 1);