aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/response.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-07-22 11:49:42 +0200
committerChristian Grothoff <christian@grothoff.org>2019-07-22 11:49:42 +0200
commit3d1b941137f9d8379e6e67d5abd57be5ae6ebe1a (patch)
tree43fa3d8dddba1f2bc160020e02f4b73f3521ca13 /src/microhttpd/response.c
parent3751044dc81a4b37de14b20dfc4cc7902fc36344 (diff)
downloadlibmicrohttpd-3d1b941137f9d8379e6e67d5abd57be5ae6ebe1a.tar.gz
libmicrohttpd-3d1b941137f9d8379e6e67d5abd57be5ae6ebe1a.zip
introducte MHD_RO_FREE_FUNCTION as proposed by Nicolas Mora on the list
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r--src/microhttpd/response.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 035e3054..21be419b 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -400,7 +400,6 @@ MHD_create_response_from_callback (uint64_t size,
400 return response; 400 return response;
401} 401}
402 402
403
404/** 403/**
405 * Set special flags and options for a response. 404 * Set special flags and options for a response.
406 * 405 *
@@ -425,6 +424,15 @@ MHD_set_response_options (struct MHD_Response *response,
425 { 424 {
426 switch (ro) 425 switch (ro)
427 { 426 {
427 case MHD_RO_FREE_FUNCTION:
428 va_start (ap, flags);
429 if (NULL != (response->crfc = va_arg (ap, MHD_free_ptr))) {
430 ret = MHD_YES;
431 } else {
432 ret = MHD_NO;
433 }
434 va_end (ap);
435 break;
428 default: 436 default:
429 ret = MHD_NO; 437 ret = MHD_NO;
430 break; 438 break;