Skip to content

Commit 6af4bf5

Browse files
committed
Merge pull request esp8266#988 from JohnSL/issue_987
Exclude the terminator in sendContent_P
2 parents 40a511f + c0f8ce9 commit 6af4bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ void ESP8266WebServer::sendContent_P(PGM_P content) {
226226
contentUnitLen = HTTP_DOWNLOAD_UNIT_SIZE;
227227
}
228228
else {
229-
// reached terminator
230-
contentUnitLen = contentNext - contentUnit;
229+
// reached terminator. Do not send the terminator
230+
contentUnitLen = contentNext - contentUnit - 1;
231231
content = NULL;
232232
}
233233

0 commit comments

Comments
 (0)