From 20530a508b5e0c39f7c8aebf3e1107ba08e3de10 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 22 Feb 2011 09:39:02 -0500 Subject: Fix HTTP request parsing bug --- src/c/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/c') diff --git a/src/c/http.c b/src/c/http.c index 64e6ef1e..7ba06871 100644 --- a/src/c/http.c +++ b/src/c/http.c @@ -162,7 +162,8 @@ static void *worker(void *data) { headers = s + 2; method = s = buf; - if (!strsep(&s, " ")) { + strsep(&s, " "); + if (!s) { fprintf(stderr, "No first space in HTTP command\n"); close(sock); goto done; -- cgit v1.2.3