diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-03 00:29:58 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-03 00:29:58 +0100 |
commit | c92b8cb32d10559791e7bd4937ecc5f49a45ba9d (patch) | |
tree | 0d3202243102d398b3859ed99d4b44c5f3f9f700 /client.c | |
parent | 0bf7e921683e2a6ef4b24d44f11436a6b9f20484 (diff) |
bail out on unsupported Expect: headers
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -224,9 +224,15 @@ static void client_parse_header(struct client *cl, char *data) if (isupper(*name)) *name = tolower(*name); - if (!strcasecmp(data, "Expect") && - !strcasecmp(val, "100-continue")) - cl->request.expect_cont = true; + if (!strcasecmp(data, "Expect")) { + if (!strcasecmp(val, "100-continue")) + cl->request.expect_cont = true; + else { + uh_header_error(cl, 400, "Bad Request"); + return; + } + } + blobmsg_add_string(&cl->hdr, data, val); |