commit f46f4b75dd3bc97f3e20403fde46d37087f89d61
parent e9292a95ec87a3c4fe1c1662fae4b3cf8d887bbb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 6 Mar 2022 19:56:30 +0300
MHD_queue_response(): improved doxy
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git 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
@@ -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