Perfect response error hints
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>main
parent
34bbc9264f
commit
278f7a19dd
|
@ -330,7 +330,7 @@ static void client_parse_header(struct uh_client *cl, char *data)
|
||||||
if (!strcmp(data, "content-length")) {
|
if (!strcmp(data, "content-length")) {
|
||||||
r->content_length = strtoul(val, &err, 0);
|
r->content_length = strtoul(val, &err, 0);
|
||||||
if (err && *err) {
|
if (err && *err) {
|
||||||
cl->send_error(cl, 400, "Bad Request", NULL);
|
cl->send_error(cl, 400, "Bad Request", "Invalid Content-Length");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!strcmp(data, "transfer-encoding") && !strcmp(val, "chunked")) {
|
} else if (!strcmp(data, "transfer-encoding") && !strcmp(val, "chunked")) {
|
||||||
|
|
Loading…
Reference in New Issue