Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1425:139d019c7237 | 1426:6365d10cd326 |
---|---|
160 | 160 |
161 *s = 0; | 161 *s = 0; |
162 headers = s + 2; | 162 headers = s + 2; |
163 method = s = buf; | 163 method = s = buf; |
164 | 164 |
165 if (!strsep(&s, " ")) { | 165 strsep(&s, " "); |
166 if (!s) { | |
166 fprintf(stderr, "No first space in HTTP command\n"); | 167 fprintf(stderr, "No first space in HTTP command\n"); |
167 close(sock); | 168 close(sock); |
168 goto done; | 169 goto done; |
169 } | 170 } |
170 path = s; | 171 path = s; |