htparser: Be more tolerant to broken clients.
[ashd.git] / 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))