From 13db035fc9e191e99dbaf3507e45516eb4ffeabd Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Fri, 22 Jul 2022 16:32:08 +0300 Subject: MHD_add_response_entry(): refactoring + added internal function --- src/microhttpd/response.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/microhttpd/response.h') diff --git a/src/microhttpd/response.h b/src/microhttpd/response.h index ba6c4ab8..4f9c32c9 100644 --- a/src/microhttpd/response.h +++ b/src/microhttpd/response.h @@ -73,4 +73,26 @@ MHD_get_response_element_n_ (struct MHD_Response *response, const char *key, size_t key_len); +/** + * Add a header or footer line to the response without checking. + * + * It is assumed that parameters are correct. + * + * @param response response to add a header to + * @param kind header or footer + * @param header the header to add, does not need to be zero-terminated + * @param header_len the length of the @a header + * @param content value to add, does not need to be zero-terminated + * @param content_len the length of the @a content + * @return false on error (like out-of-memory), + * true if succeed + */ +bool +MHD_add_response_entry_no_check_ (struct MHD_Response *response, + enum MHD_ValueKind kind, + const char *header, + size_t header_len, + const char *content, + size_t content_len); + #endif -- cgit v1.2.3