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 bcb6897fb0282a09f2d85f4e61d915c7831d26a9..e1fdca4dd6dbcd4ecd92c4e9b29f1ff983381e6a 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);