ignore initial newlines in http requests
authorFelix Fietkau <nbd@openwrt.org>
Sat, 19 Jan 2013 15:48:05 +0000 (16:48 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 19 Jan 2013 15:48:05 +0000 (16:48 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
client.c

index bcb6897..e1fdca4 100644 (file)
--- 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);