summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-02-22 09:39:02 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-02-22 09:39:02 -0500
commitf56976b7824759a96e790da1e32f2a7a1f1aeca3 (patch)
tree473e013fcf37fb983abc32b0e56fa663567aab02 /src
parent563c8f0612d5ebef309f3c9ef76cfddbaebae5d7 (diff)
Fix HTTP request parsing bug
Diffstat (limited to 'src')
-rw-r--r--src/c/http.c3
1 files changed, 2 insertions, 1 deletions
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;