X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtparser.c;h=e6f545a6f87567a5bb7ae4f23368b7bd6c6f6ad6;hb=aa06d1b36cfaa0610205cf49003277e6a12c874b;hp=c1903b44a349157e87d1db806fea7e11fc7a9485;hpb=8d19a9ecff0be0cd79c161096ead60f60d6b50e2;p=ashd.git diff --git a/src/htparser.c b/src/htparser.c index c1903b4..e6f545a 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -319,7 +319,8 @@ void serve(FILE *in, struct conn *conn) if(recvchunks(in, out)) break; } else { - break; + /* Ignore rather than abort, to be kinder to broken clients. */ + headrmheader(req, "content-type"); } } if(fflush(out)) @@ -425,8 +426,8 @@ static void initroot(void *uu) { int fd; + setsid(); if(daemonize) { - setsid(); chdir("/"); if((fd = open("/dev/null", O_RDWR)) >= 0) { dup2(fd, 0);