Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8ffe6d

Browse files
committed
Merge branch 'master' into bstream2
2 parents fd32e65 + de30762 commit e8ffe6d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ int HTTPClient::sendRequest(const char * type, Stream * stream, size_t size)
757757
}
758758

759759
if(size > 0) {
760-
addHeader("Content-Length", String(size));
760+
addHeader(F("Content-Length"), String(size));
761761
}
762762

763763
// send Header
@@ -1226,7 +1226,8 @@ int HTTPClient::handleHeaderResponse()
12261226
}
12271227

12281228
if(_canReuse && headerName.equalsIgnoreCase(F("Connection"))) {
1229-
if(headerValue.indexOf("close") >= 0 && headerValue.indexOf("keep-alive") < 0) {
1229+
if (headerValue.indexOf(F("close")) >= 0 &&
1230+
headerValue.indexOf(F("keep-alive")) < 0) {
12301231
_canReuse = false;
12311232
}
12321233
}

0 commit comments

Comments
 (0)