htparser: Be more tolerant to broken clients.
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 26 Dec 2012 02:24:57 +0000 (03:24 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 26 Dec 2012 02:24:57 +0000 (03:24 +0100)
src/htparser.c

index c1903b4..5dfed8b 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))