libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 3a60c8a3a8bebfe12ca99478daf81bd620e2d479
parent b0b57638a0adf41d9f03f206700d8064794eeb98
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Fri, 27 Nov 2026 12:07:29 +0100

post_example: fixed the name of the header in responses

Diffstat:
Msrc/examples/post_example.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/examples/post_example.c b/src/examples/post_example.c @@ -295,11 +295,11 @@ serve_simple_form (const void *cls, add_session_cookie (session, response); if (MHD_YES != MHD_add_response_header (response, - MHD_HTTP_HEADER_CONTENT_ENCODING, + MHD_HTTP_HEADER_CONTENT_TYPE, mime)) { fprintf (stderr, - "Failed to set content encoding header!\n"); + "Failed to set content type header!\n"); } ret = MHD_queue_response (connection, MHD_HTTP_OK, @@ -350,11 +350,11 @@ fill_v1_form (const void *cls, add_session_cookie (session, response); if (MHD_YES != MHD_add_response_header (response, - MHD_HTTP_HEADER_CONTENT_ENCODING, + MHD_HTTP_HEADER_CONTENT_TYPE, mime)) { fprintf (stderr, - "Failed to set content encoding header!\n"); + "Failed to set content type header!\n"); } ret = MHD_queue_response (connection, MHD_HTTP_OK, @@ -407,11 +407,11 @@ fill_v1_v2_form (const void *cls, add_session_cookie (session, response); if (MHD_YES != MHD_add_response_header (response, - MHD_HTTP_HEADER_CONTENT_ENCODING, + MHD_HTTP_HEADER_CONTENT_TYPE, mime)) { fprintf (stderr, - "Failed to set content encoding header!\n"); + "Failed to set content type header!\n"); } ret = MHD_queue_response (connection, MHD_HTTP_OK, @@ -448,11 +448,11 @@ not_found_page (const void *cls, return MHD_NO; if (MHD_YES != MHD_add_response_header (response, - MHD_HTTP_HEADER_CONTENT_ENCODING, + MHD_HTTP_HEADER_CONTENT_TYPE, mime)) { fprintf (stderr, - "Failed to set content encoding header!\n"); + "Failed to set content type header!\n"); } ret = MHD_queue_response (connection, MHD_HTTP_NOT_FOUND,