From cc5032b85365e567f02650f13ea6ad9a5bb5fef7 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Fri, 3 May 2019 16:48:57 +0300 Subject: Added MHD_lookup_connection_value_n(). --- src/include/microhttpd.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 6617dd98..3dbda318 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h @@ -128,7 +128,7 @@ typedef intptr_t ssize_t; * Current version of the library. * 0x01093001 = 1.9.30-1. */ -#define MHD_VERSION 0x00096303 +#define MHD_VERSION 0x00096304 /** * MHD-internal return code for "YES". @@ -2619,6 +2619,35 @@ MHD_lookup_connection_value (struct MHD_Connection *connection, const char *key); +/** + * Get a particular header value. If multiple + * values match the kind, return any one of them. + * @note Since MHD_VERSION 0x00096304 + * + * @param connection connection to get values from + * @param kind what kind of value are we looking for + * @param key the header to look for, NULL to lookup 'trailing' value without a key + * @param key_size the length of @a key in bytes + * @param[out] value_ptr the pointer to variable, which will be set to found value, + * will not be updated if key not found, + * could be NULL to just check for presence of @a key + * @param[out] value_size_ptr the pointer variable, which will set to found value, + * will not be updated if key not found, + * could be NULL + * @param key_size the length of @a key in bytes + * @return #MHD_YES if key is found, + * #MHD_NO otherwise. + * @ingroup request + */ +_MHD_EXTERN int +MHD_lookup_connection_value_n (struct MHD_Connection *connection, + enum MHD_ValueKind kind, + const char *key, + size_t key_size, + const char **value, + size_t *value_size); + + /** * Queue a response to be transmitted to the client (as soon as * possible but after #MHD_AccessHandlerCallback returns). -- cgit v1.2.3