Use content-length: 0 when closing connection

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-18 10:18:09 +01:00
parent fbce6f5924
commit 7a46da3379

View File

@@ -1398,8 +1398,8 @@ int post_auth_handler(worker_st * ws, unsigned http_ver)
if (sd != -1)
close(sd);
cstp_printf(ws,
"HTTP/1.1 401 Unauthorized\r\nX-Reason: %s\r\n\r\n",
reason);
"HTTP/1.%d 401 Unauthorized\r\nContent-Length: 0\r\nX-Reason: %s\r\n\r\n",
http_ver, reason);
cstp_fatal_close(ws, GNUTLS_A_ACCESS_DENIED);
talloc_free(msg);
exit(1);