Skip to content

Commit

Permalink
Terminate the chunked printDirectory (#6808)
Browse files Browse the repository at this point in the history
Fixes #2481

Send a 0-len chunk when the directory is completed (in a chunked HTTP
transfer) to terminate the HTTP transfer properly.
  • Loading branch information
earlephilhower authored and d-a-v committed Nov 19, 2019
1 parent cb6b30a commit 919c753
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void printDirectory() {
entry.close();
}
server.sendContent("]");
server.sendContent(""); // Terminate the HTTP chunked transmission with a 0-length chunk
dir.close();
}

Expand Down

0 comments on commit 919c753

Please sign in to comment.