diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index cc0cd38b..bf78d735 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -848,6 +848,38 @@ MHD_create_response_from_buffer_with_free_callback (size_t size, | |||
848 | 848 | ||
849 | 849 | ||
850 | /** | 850 | /** |
851 | * Create a response object. | ||
852 | * The response object can be extended with header information and then be | ||
853 | * used any number of times. | ||
854 | * | ||
855 | * @param size size of the data portion of the response | ||
856 | * @param buffer size bytes containing the response's data portion | ||
857 | * @param crfc function to call to cleanup, if set to NULL then callback | ||
858 | * is not called | ||
859 | * @param crfc_cls an argument for @a crfc | ||
860 | * @return NULL on error (i.e. invalid arguments, out of memory) | ||
861 | * @note Available since #MHD_VERSION 0x00097302 | ||
862 | * @ingroup response | ||
863 | */ | ||
864 | _MHD_EXTERN struct MHD_Response * | ||
865 | MHD_create_response_from_buffer_with_free_callback_cls (size_t size, | ||
866 | void *buffer, | ||
867 | MHD_ContentReaderFreeCallback | ||
868 | crfc, | ||
869 | void *crfc_cls) | ||
870 | { | ||
871 | struct MHD_Response *r; | ||
872 | |||
873 | r = MHD_create_response_from_buffer_with_free_callback (size, | ||
874 | buffer, | ||
875 | crfc); | ||
876 | if (NULL != r) | ||
877 | r->crc_cls = crfc_cls; | ||
878 | return r; | ||
879 | } | ||
880 | |||
881 | |||
882 | /** | ||
851 | * Create a response object from an array of memory buffers. | 883 | * Create a response object from an array of memory buffers. |
852 | * The response object can be extended with header information and then be used | 884 | * The response object can be extended with header information and then be used |
853 | * any number of times. | 885 | * any number of times. |