Skip to content

Commit 919c753

Browse files
earlephilhowerd-a-v
authored andcommitted
Terminate the chunked printDirectory (#6808)
Fixes #2481 Send a 0-len chunk when the directory is completed (in a chunked HTTP transfer) to terminate the HTTP transfer properly.
1 parent cb6b30a commit 919c753

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/ESP8266WebServer/examples/SDWebServer/SDWebServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ void printDirectory() {
241241
entry.close();
242242
}
243243
server.sendContent("]");
244+
server.sendContent(""); // Terminate the HTTP chunked transmission with a 0-length chunk
244245
dir.close();
245246
}
246247

0 commit comments

Comments
 (0)