[vlc-commits] httpd: handle Connection header on unauthenticated requests
Rémi Denis-Courmont
git at videolan.org
Sun Oct 8 17:28:20 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 8 18:18:19 2017 +0300| [2f398c08bfc40569814a95d4bf63161a55e60015] | committer: Rémi Denis-Courmont
httpd: handle Connection header on unauthenticated requests
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f398c08bfc40569814a95d4bf63161a55e60015
---
src/network/httpd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 58512b11bb..9bb827eb17 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1880,6 +1880,8 @@ static void httpdLoop(httpd_host_t *host)
cl->i_buffer = -1; /* Force the creation of the answer in httpd_ClientSend */
httpd_MsgAdd(answer, "Content-Length", "%d", answer->i_body);
httpd_MsgAdd(answer, "Content-Type", "%s", "text/html");
+ if (httpd_MsgGet(&cl->query, "Connection") != NULL)
+ httpd_MsgAdd(answer, "Connection", "close");
}
cl->i_state = HTTPD_CLIENT_SENDING;
More information about the vlc-commits
mailing list