1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

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.
This commit is contained in:
Earle F. Philhower, III
2019-11-19 02:32:39 -07:00
committed by david gauchard
parent cb6b30a47d
commit 919c753563

View File

@ -241,6 +241,7 @@ void printDirectory() {
entry.close();
}
server.sendContent("]");
server.sendContent(""); // Terminate the HTTP chunked transmission with a 0-length chunk
dir.close();
}