summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-04 19:04:55 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-04 19:04:55 +0200
commitb299ae6e69d365a198b19f95ccfd3ee6f031484c (patch)
treeb072ee00b1e45267d646d74c6bb99d53f472eeed /src/include
parent94d7eb407549edcc9936de364647dd6241e3bb0c (diff)
downloadexchange-b299ae6e69d365a198b19f95ccfd3ee6f031484c.tar.gz
exchange-b299ae6e69d365a198b19f95ccfd3ee6f031484c.tar.bz2
exchange-b299ae6e69d365a198b19f95ccfd3ee6f031484c.zip
expose xmime_matches
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_mhd_lib.h14
1 files changed, 14 insertions, 0 deletions
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
@@ -97,6 +97,20 @@ 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.
*
* @param connection the MHD connection