diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/microhttpd.h | 40 | ||||
-rw-r--r-- | src/microhttpd/response.c | 10 |
2 files changed, 16 insertions, 34 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 93382152..9d28cdb1 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -132,7 +132,7 @@ typedef intptr_t ssize_t; | |||
132 | * Current version of the library. | 132 | * Current version of the library. |
133 | * 0x01093001 = 1.9.30-1. | 133 | * 0x01093001 = 1.9.30-1. |
134 | */ | 134 | */ |
135 | #define MHD_VERSION 0x00096503 | 135 | #define MHD_VERSION 0x00096502 |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * MHD-internal return code for "YES". | 138 | * MHD-internal return code for "YES". |
@@ -2256,12 +2256,10 @@ typedef ssize_t | |||
2256 | 2256 | ||
2257 | 2257 | ||
2258 | /** | 2258 | /** |
2259 | * This method is called by libmicrohttpd if we are done with a content | 2259 | * This method is called by libmicrohttpd if we |
2260 | * reader. It should be used to free resources associated with the content | 2260 | * are done with a content reader. It should |
2261 | * reader. | 2261 | * be used to free resources associated with the |
2262 | * | 2262 | * content reader. |
2263 | * It is also used as a va_arg in #MHD_set_response_options() in combination | ||
2264 | * with #MHD_RO_FREE_FUNCTION. | ||
2265 | * | 2263 | * |
2266 | * @param cls closure | 2264 | * @param cls closure |
2267 | * @ingroup response | 2265 | * @ingroup response |
@@ -2680,7 +2678,7 @@ _MHD_EXTERN int | |||
2680 | MHD_set_connection_value (struct MHD_Connection *connection, | 2678 | MHD_set_connection_value (struct MHD_Connection *connection, |
2681 | enum MHD_ValueKind kind, | 2679 | enum MHD_ValueKind kind, |
2682 | const char *key, | 2680 | const char *key, |
2683 | const char *value); | 2681 | const char *value); |
2684 | 2682 | ||
2685 | 2683 | ||
2686 | /** | 2684 | /** |
@@ -2710,11 +2708,11 @@ MHD_set_connection_value (struct MHD_Connection *connection, | |||
2710 | */ | 2708 | */ |
2711 | int | 2709 | int |
2712 | MHD_set_connection_value_n (struct MHD_Connection *connection, | 2710 | MHD_set_connection_value_n (struct MHD_Connection *connection, |
2713 | enum MHD_ValueKind kind, | 2711 | enum MHD_ValueKind kind, |
2714 | const char *key, | 2712 | const char *key, |
2715 | size_t key_size, | 2713 | size_t key_size, |
2716 | const char *value, | 2714 | const char *value, |
2717 | size_t value_size); | 2715 | size_t value_size); |
2718 | 2716 | ||
2719 | 2717 | ||
2720 | /** | 2718 | /** |
@@ -2808,7 +2806,7 @@ MHD_lookup_connection_value_n (struct MHD_Connection *connection, | |||
2808 | _MHD_EXTERN int | 2806 | _MHD_EXTERN int |
2809 | MHD_queue_response (struct MHD_Connection *connection, | 2807 | MHD_queue_response (struct MHD_Connection *connection, |
2810 | unsigned int status_code, | 2808 | unsigned int status_code, |
2811 | struct MHD_Response *response); | 2809 | struct MHD_Response *response); |
2812 | 2810 | ||
2813 | 2811 | ||
2814 | /** | 2812 | /** |
@@ -2897,18 +2895,10 @@ enum MHD_ResponseFlags | |||
2897 | */ | 2895 | */ |
2898 | enum MHD_ResponseOptions | 2896 | enum MHD_ResponseOptions |
2899 | { | 2897 | { |
2900 | 2898 | /** | |
2901 | /** | 2899 | * End of the list of options. |
2902 | * End of the list of options. | 2900 | */ |
2903 | */ | 2901 | MHD_RO_END = 0 |
2904 | MHD_RO_END = 0, | ||
2905 | |||
2906 | /** | ||
2907 | * Set a specific free() function | ||
2908 | * to free response buffer instead of libc void free(void * ptr) | ||
2909 | */ | ||
2910 | MHD_RO_FREE_FUNCTION = 1 | ||
2911 | |||
2912 | }; | 2902 | }; |
2913 | 2903 | ||
2914 | 2904 | ||
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index e9d5a4bf..035e3054 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -400,6 +400,7 @@ MHD_create_response_from_callback (uint64_t size, | |||
400 | return response; | 400 | return response; |
401 | } | 401 | } |
402 | 402 | ||
403 | |||
403 | /** | 404 | /** |
404 | * Set special flags and options for a response. | 405 | * Set special flags and options for a response. |
405 | * | 406 | * |
@@ -424,15 +425,6 @@ MHD_set_response_options (struct MHD_Response *response, | |||
424 | { | 425 | { |
425 | switch (ro) | 426 | switch (ro) |
426 | { | 427 | { |
427 | case MHD_RO_FREE_FUNCTION: | ||
428 | va_start (ap, flags); | ||
429 | if (NULL != (response->crfc = va_arg (ap, MHD_ContentReaderFreeCallback))) { | ||
430 | ret = MHD_YES; | ||
431 | } else { | ||
432 | ret = MHD_NO; | ||
433 | } | ||
434 | va_end (ap); | ||
435 | break; | ||
436 | default: | 428 | default: |
437 | ret = MHD_NO; | 429 | ret = MHD_NO; |
438 | break; | 430 | break; |