read header until \r\n\r\n or \n\n
This commit is contained in:
parent
19fbedc39a
commit
9fd46fd50e
1 changed files with 1 additions and 1 deletions
2
quark.c
2
quark.c
|
@ -447,7 +447,7 @@ request(void) {
|
|||
|
||||
/* read request into reqbuf (MAXBUFLEN byte of reqbuf is emergency 0 terminator */
|
||||
for (; (r = read(req.fd, reqbuf + offset, MAXBUFLEN - offset)) > 0 && offset < MAXBUFLEN
|
||||
&& (!strstr(reqbuf, "\r\n") || !strstr(reqbuf, "\n")); )
|
||||
&& !strstr(reqbuf, "\r\n\r\n") && !strstr(reqbuf, "\n\n"); )
|
||||
{
|
||||
offset += r;
|
||||
reqbuf[offset] = 0;
|
||||
|
|
Loading…
Reference in a new issue