From 5e54cdaa07de4f6036686f3b3957fb2ef73a90a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Tue, 29 Oct 2019 18:43:27 +0100 Subject: [PATCH] * tests/libtest.c (_answer_to_connection): Switch off Content-Length sanity checks in MHD --- tests/libtest.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/libtest.c b/tests/libtest.c index 72479aef5..656dda136 100644 --- a/tests/libtest.c +++ b/tests/libtest.c @@ -606,6 +606,13 @@ static int _answer_to_connection( ret = MHD_queue_response(connection, MHD_HTTP_OK, response); } + // switch off Content-Length sanity checks +#if MHD_VERSION >= 0x00096800 + MHD_set_response_options(response, + MHD_RF_INSANITY_HEADER_CONTENT_LENGTH, + MHD_RO_END); +#endif + // add available headers for (const char **header = request_url->headers; *header; header++) { const char *header_value = strchr(*header, ':');