Revert "request: ignore empty request in log"
This reverts commit 68f51ac37a
.
The idea is good, but we just didn't yet get the right format
for the reading-cycle, which effectively keeps offset at 0
when it's all done in one read.
Let's call it a day and get back to the drawing-boards
tomorrow.
This commit is contained in:
parent
a86c7f10e3
commit
4674ccde50
1 changed files with 1 additions and 4 deletions
5
quark.c
5
quark.c
|
@ -457,8 +457,6 @@ request(void) {
|
|||
logerrmsg("error\tread: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
if(offset == 0)
|
||||
return -2; /* empty request, ignore in log */
|
||||
|
||||
/* extract host and mod */
|
||||
if (getreqentry("Host:", reqhost, LENGTH(reqhost), " \t\r\n") != 0)
|
||||
|
@ -539,8 +537,7 @@ serve(int fd) {
|
|||
status = -1;
|
||||
if (result == 0)
|
||||
response();
|
||||
if(result != -2)
|
||||
logmsg("%d\t%s\t%s\n", status, host, status == -1 ? "" : reqbuf);
|
||||
logmsg("%d\t%s\t%s\n", status, host, reqbuf);
|
||||
shutdown(req.fd, SHUT_WR);
|
||||
close(req.fd);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
Loading…
Reference in a new issue