commit e0251c6d4f8698c3416d0a30812d7242fa143526
parent a08cfbe742ad15174a7b0d6cf12f53e9a686f99b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 12 Dec 2021 15:56:13 +0300
test_get_chunked: follow HTTP specification
Use "Trailer: " header if trailers are used.
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c
@@ -20,7 +20,7 @@
*/
/**
- * @file daemontest_get_chunked.c
+ * @file test_get_chunked.c
* @brief Testcase for libmicrohttpd GET operations with chunked content encoding
* @author Christian Grothoff
* @author Karlson2k (Evgeny Grin)
@@ -244,6 +244,11 @@ ahc_echo (void *cls,
"chunked"))
abort ();
}
+ if (MHD_NO == MHD_add_response_header (response,
+ MHD_HTTP_HEADER_TRAILER,
+ RESP_FOOTER_NAME))
+ abort ();
+
if (resp_string || (resp_sized && resp_empty))
{
/* There is no chance to add footer later */