From b299ae6e69d365a198b19f95ccfd3ee6f031484c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 4 Apr 2021 19:04:55 +0200 Subject: expose xmime_matches --- src/include/taler_mhd_lib.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/include/taler_mhd_lib.h') diff --git a/src/include/taler_mhd_lib.h b/src/include/taler_mhd_lib.h index c1b65126c..894a701c6 100644 --- a/src/include/taler_mhd_lib.h +++ b/src/include/taler_mhd_lib.h @@ -96,6 +96,20 @@ MHD_RESULT TALER_MHD_can_compress (struct MHD_Connection *connection); +/** + * Check if @a mime matches the @a accept_pattern. For this function, the @a + * accept_pattern may include multiple values separated by ";". + * + * @param accept_pattern a mime pattern like "text/plain" + * or "image/STAR" or "text/plain; text/xml" + * @param mime the mime type to match + * @return true if @a mime matches the @a accept_pattern + */ +bool +TALER_MHD_xmime_matches (const char *accept_pattern, + const char *mime); + + /** * Send JSON object as response. * -- cgit v1.2.3