Merge branch 'master' of git.dolda2000.com:/srv/git/r/ashd
[ashd.git] / src / htparser.c
index c1903b4..e6f545a 100644 (file)
@@ -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);