libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 1e2bfba0914a0e85a736552f813875a8415c46dc
parent a8541b843eb578608d7822f40be0f828838240e3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 13 Sep 2011 07:46:29 +0000

stuff

Diffstat:
Msrc/daemon/connection.c | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/daemon/connection.c b/src/daemon/connection.c @@ -104,9 +104,12 @@ */ #define DEBUG_SEND_DATA MHD_NO + /** * Get all of the headers from the request. * + * @param connection connection to get values from + * @param kind types of values to iterate over * @param iterator callback to call on each header; * maybe NULL (then just count headers) * @param iterator_cls extra argument to iterator @@ -139,6 +142,7 @@ MHD_get_connection_values (struct MHD_Connection *connection, return ret; } + /** * This function can be used to add an entry to * the HTTP headers of a connection (so that the @@ -187,10 +191,13 @@ MHD_set_connection_value (struct MHD_Connection *connection, return MHD_YES; } + /** * Get a particular header value. If multiple * values match the kind, return any one of them. * + * @param connection connection to get values from + * @param kind what kind of value are we looking for * @param key the header to look for * @return NULL if no such item was found */ @@ -212,6 +219,7 @@ MHD_lookup_connection_value (struct MHD_Connection *connection, return NULL; } + /** * Queue a response to be transmitted to the client (as soon as * possible but after MHD_AccessHandlerCallback returns). @@ -254,9 +262,13 @@ MHD_queue_response (struct MHD_Connection *connection, return MHD_YES; } + /** * Do we (still) need to send a 100 continue * message for this connection? + * + * @param connection connection to test + * @return 0 if we don't need 100 CONTINUE, 1 if we do */ static int need_100_continue (struct MHD_Connection *connection) @@ -279,6 +291,9 @@ need_100_continue (struct MHD_Connection *connection) /** * Close the given connection and give the * specified termination code to the user. + * + * @param connection connection to close + * @param termination_code termination reason to give */ void MHD_connection_close (struct MHD_Connection *connection, @@ -296,6 +311,11 @@ MHD_connection_close (struct MHD_Connection *connection, &connection->client_context, termination_code); connection->client_aware = MHD_NO; + if (pos->response != NULL) + { + MHD_destroy_response (pos->response); + pos->response = NULL; + } }