Skip to content

Commit 2bc6d6b

Browse files
committed
Merge pull request #1795 from fape/1718_CaptivePortalAdvanced_fix
CaptivePortalAdvanced fix #1718
2 parents 1a4adcc + ed13edf commit 2bc6d6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/DNSServer/examples/CaptivePortalAdvanced/handleHttp.ino

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ void handleRoot() {
66
server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
77
server.sendHeader("Pragma", "no-cache");
88
server.sendHeader("Expires", "-1");
9+
server.setContentLength(CONTENT_LENGTH_UNKNOWN);
910
server.send(200, "text/html", ""); // Empty content inhibits Content-length header so we have to close the socket ourselves.
1011
server.sendContent(
1112
"<html><head></head><body>"
@@ -40,6 +41,7 @@ void handleWifi() {
4041
server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
4142
server.sendHeader("Pragma", "no-cache");
4243
server.sendHeader("Expires", "-1");
44+
server.setContentLength(CONTENT_LENGTH_UNKNOWN);
4345
server.send(200, "text/html", ""); // Empty content inhibits Content-length header so we have to close the socket ourselves.
4446
server.sendContent(
4547
"<html><head></head><body>"

0 commit comments

Comments
 (0)