diff src/c/http.c @ 1426:6365d10cd326

Fix HTTP request parsing bug
author Adam Chlipala <adam@chlipala.net>
date Tue, 22 Feb 2011 09:39:02 -0500
parents e65082d76d26
children 36f7d1debb37
line wrap: on
line diff
--- a/src/c/http.c	Thu Feb 17 18:05:08 2011 -0500
+++ b/src/c/http.c	Tue Feb 22 09:39:02 2011 -0500
@@ -162,7 +162,8 @@
         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;