diff options
-rw-r--r-- | hw1/proc_r.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw1/proc_r.c b/hw1/proc_r.c index 4446d20..888a1dc 100644 --- a/hw1/proc_r.c +++ b/hw1/proc_r.c @@ -64,6 +64,8 @@ bool procconn(server* svr, request* req, int maxfd){ request_free (&req[i], svr); } else { if (req[i].header_done) { + // ignore remaining chars in the buffer + req[i].buf_len = 0; FD_CLR (req[i].conn_fd, &(svr->readfds)); FD_SET (req[i].conn_fd, &(svr->writefds)); } |