Skip to content

Commit

Permalink
Move a couple larger strings from rodata to flash (#6976)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller authored and devyte committed Jan 3, 2020
1 parent fa5040d commit de30762
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ int HTTPClient::sendRequest(const char * type, Stream * stream, size_t size)
}

if(size > 0) {
addHeader("Content-Length", String(size));
addHeader(F("Content-Length"), String(size));
}

// send Header
Expand Down Expand Up @@ -1324,7 +1324,8 @@ int HTTPClient::handleHeaderResponse()
}

if(_canReuse && headerName.equalsIgnoreCase(F("Connection"))) {
if(headerValue.indexOf("close") >= 0 && headerValue.indexOf("keep-alive") < 0) {
if (headerValue.indexOf(F("close")) >= 0 &&
headerValue.indexOf(F("keep-alive")) < 0) {
_canReuse = false;
}
}
Expand Down

0 comments on commit de30762

Please sign in to comment.