From f46f4b75dd3bc97f3e20403fde46d37087f89d61 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 6 Mar 2022 19:56:30 +0300 Subject: [PATCH] MHD_queue_response(): improved doxy --- src/include/microhttpd.h | 5 +++++ src/microhttpd/connection.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 42409403..d26702da 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h @@ -3224,6 +3224,11 @@ MHD_lookup_connection_value_n (struct MHD_Connection *connection, * For suspended connection this function can be called at any moment. Response * will be sent as soon as connection is resumed. * + * If response object is used to answer HEAD request then the body of + * the response is not used, while all headers (including automatic headers) + * are used. In practice, the same response object can be used to respond to + * both HEAD and GET requests. + * * @param connection the connection identifying the client * @param status_code HTTP status code (i.e. #MHD_HTTP_OK) * @param response response to transmit, the NULL is tolerated diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 9e764b02..f408d1f1 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -5110,6 +5110,11 @@ MHD_set_connection_option (struct MHD_Connection *connection, * For suspended connection this function can be called at any moment. Response * will be sent as soon as connection is resumed. * + * If response object is used to answer HEAD request then the body of + * the response is not used, while all headers (including automatic headers) + * are used. In practice, the same response object can be used to respond to + * both HEAD and GET requests. + * * @param connection the connection identifying the client * @param status_code HTTP status code (i.e. #MHD_HTTP_OK) * @param response response to transmit, the NULL is tolerated