aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-04-19 18:51:11 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-04-19 20:27:36 +0300
commit43cca25d4484ce137c95410be28e4cdf83a3a3b0 (patch)
tree3c2d2ab0da847263aa92f0079928c9c0b1b91493 /src/include
parentae4fcbad73324878198b8d5d3a156281d1bcd125 (diff)
downloadlibmicrohttpd-43cca25d4484ce137c95410be28e4cdf83a3a3b0.tar.gz
libmicrohttpd-43cca25d4484ce137c95410be28e4cdf83a3a3b0.zip
Added new API function MHD_create_response_from_buffer_copy()
Diffstat (limited to 'src/include')
-rw-r--r--src/include/microhttpd.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 8178584c..bd928ace 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -96,7 +96,7 @@ extern "C"
96 * they are parsed as decimal numbers. 96 * they are parsed as decimal numbers.
97 * Example: 0x01093001 = 1.9.30-1. 97 * Example: 0x01093001 = 1.9.30-1.
98 */ 98 */
99#define MHD_VERSION 0x00097506 99#define MHD_VERSION 0x00097507
100 100
101/* If generic headers don't work on your platform, include headers 101/* If generic headers don't work on your platform, include headers
102 which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 102 which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
@@ -3565,6 +3565,33 @@ MHD_create_response_from_buffer_static (size_t size,
3565 3565
3566 3566
3567/** 3567/**
3568 * Create a response object with the content of provided statically allocated
3569 * buffer used as the response body.
3570 *
3571 * An internal copy of the buffer will be made automatically, so buffer have
3572 * to be valid only during the call of this function (as a typical example:
3573 * buffer is a local (non-static) array).
3574 *
3575 * The response object can be extended with header information and then
3576 * be used any number of times.
3577 *
3578 * If response object is used to answer HEAD request then the body
3579 * of the response is not used, while all headers (including automatic
3580 * headers) are used.
3581 *
3582 * @param size the size of the data in @a buffer, can be zero
3583 * @param buffer the buffer with the data for the response body, can be NULL
3584 * if @a size is zero
3585 * @return NULL on error (i.e. invalid arguments, out of memory)
3586 * @note Available since #MHD_VERSION 0x00097507
3587 * @ingroup response
3588 */
3589_MHD_EXTERN struct MHD_Response *
3590MHD_create_response_from_buffer_copy (size_t size,
3591 const void *buffer);
3592
3593
3594/**
3568 * Create a response object with the content of provided buffer used as 3595 * Create a response object with the content of provided buffer used as
3569 * the response body. 3596 * the response body.
3570 * 3597 *