summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-19 16:48:05 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-19 16:48:05 +0100
commit9cfe019ff4b6637e2bb7fbf5fc8db37abdd3c569 (patch)
treef9a0859975add6b22685b3396d99a004077970af /client.c
parent70b9f135f8400349838df2d682a073a0706245c5 (diff)
ignore initial newlines in http requests
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'client.c')
-rw-r--r--client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.c b/client.c
index bcb6897..e1fdca4 100644
--- a/client.c
+++ b/client.c
@@ -193,6 +193,9 @@ static bool client_init_cb(struct client *cl, char *buf, int len)
if (!newline)
return false;
+ if (newline == buf)
+ return true;
+
*newline = 0;
blob_buf_init(&cl->hdr, 0);
cl->state = client_parse_request(cl, buf);