disable keep-alive for POST requests to improve compatibility
[project/uhttpd.git] / client.c
index a971b3b..15f3d8c 100644 (file)
--- a/client.c
+++ b/client.c
@@ -180,7 +180,8 @@ static int client_parse_request(struct client *cl, char *data)
 
        req->method = h_method;
        req->version = h_version;
-       if (req->version < UH_HTTP_VER_1_1 || !conf.http_keepalive)
+       if (req->version < UH_HTTP_VER_1_1 || req->method == UH_HTTP_MSG_POST ||
+           !conf.http_keepalive)
                req->connection_close = true;
 
        return CLIENT_STATE_HEADER;