httpd: handle Connection header on unknown requests

This commit is contained in:
Rémi Denis-Courmont 2017-10-08 18:18:05 +03:00
parent 7c0ae26a40
commit 394c9c90b5
1 changed files with 1 additions and 0 deletions

View File

@ -1818,6 +1818,7 @@ static void httpdLoop(httpd_host_t *host)
answer->i_body = httpd_HtmlError (&p, 501, NULL);
answer->p_body = (uint8_t *)p;
httpd_MsgAdd(answer, "Content-Length", "%d", answer->i_body);
httpd_MsgAdd(answer, "Connection", "close");
cl->i_buffer = -1; /* Force the creation of the answer in httpd_ClientSend */
cl->i_state = HTTPD_CLIENT_SENDING;