Skip to content

Commit de30762

Browse files
dirkmuellerdevyte
authored andcommitted
Move a couple larger strings from rodata to flash (#6976)
1 parent fa5040d commit de30762

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ int HTTPClient::sendRequest(const char * type, Stream * stream, size_t size)
758758
}
759759

760760
if(size > 0) {
761-
addHeader("Content-Length", String(size));
761+
addHeader(F("Content-Length"), String(size));
762762
}
763763

764764
// send Header
@@ -1324,7 +1324,8 @@ int HTTPClient::handleHeaderResponse()
13241324
}
13251325

13261326
if(_canReuse && headerName.equalsIgnoreCase(F("Connection"))) {
1327-
if(headerValue.indexOf("close") >= 0 && headerValue.indexOf("keep-alive") < 0) {
1327+
if (headerValue.indexOf(F("close")) >= 0 &&
1328+
headerValue.indexOf(F("keep-alive")) < 0) {
13281329
_canReuse = false;
13291330
}
13301331
}

0 commit comments

Comments
 (0)