1
0
Fork 0

http.c: Return error if check_length fails

Otherwise, fatal errors coming from the h->cfg.length would be
unnoticed, causing slweb to attempt to send a response.
This commit is contained in:
Xavier Del Campo Romero 2023-09-07 13:40:11 +02:00
parent f6562ddab3
commit 083dedbb9d
Signed by untrusted user: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 7 additions and 0 deletions

7
http.c
View File

@ -1050,6 +1050,13 @@ static int header_cr_line(struct http_ctx *const h)
if (res)
{
if (res < 0)
{
fprintf(stderr, "%s: check_length failed\n",
__func__);
return res;
}
h->wctx.close = true;
return start_response(h);
}