projects
/
oweals
/
uhttpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bf7e92
)
bail out on unsupported Expect: headers
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 2 Jan 2013 23:29:58 +0000
(
00:29
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 2 Jan 2013 23:29:58 +0000
(
00:29
+0100)
client.c
patch
|
blob
|
history
diff --git
a/client.c
b/client.c
index 25cc271a32090ef109528bb55a46de52b5af1f12..860403464ccd9fece961230ac3b192a662bebc99 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-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);