mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-25 20:28:27 +00:00
Added "Content-Length: 0" to the authorization reply to make it keep-alive friendly
This commit is contained in:
1 parent
9bd2812fac
commit
23a3cc6472
1 file changed
+1
@@ -2215,6 +2215,7 @@ static void send_authorization_request(struct mg_connection *conn) {
|
|||||||
conn->request_info.status_code = 401;
|
conn->request_info.status_code = 401;
|
||||||
(void) mg_printf(conn,
|
(void) mg_printf(conn,
|
||||||
"HTTP/1.1 401 Unauthorized\r\n"
|
"HTTP/1.1 401 Unauthorized\r\n"
|
||||||
|
"Content-Length: 0\r\n"
|
||||||
"WWW-Authenticate: Digest qop=\"auth\", "
|
"WWW-Authenticate: Digest qop=\"auth\", "
|
||||||
"realm=\"%s\", nonce=\"%lu\"\r\n\r\n",
|
"realm=\"%s\", nonce=\"%lu\"\r\n\r\n",
|
||||||
conn->ctx->config[AUTHENTICATION_DOMAIN],
|
conn->ctx->config[AUTHENTICATION_DOMAIN],
|
||||||
|
|||||||
Reference in new issue
Block a user