aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-05-08 19:22:34 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-05-09 22:20:42 +0300
commitad7652a28c4308c24457fb98cc24dbce3c869201 (patch)
tree7f63a7be3655e1d704ab315fb43e17a67b617056 /src/microhttpd/internal.h
parente93439da71e027cafe5b2788a997cbfc85d193c8 (diff)
downloadlibmicrohttpd-ad7652a28c4308c24457fb98cc24dbce3c869201.tar.gz
libmicrohttpd-ad7652a28c4308c24457fb98cc24dbce3c869201.zip
Added internal function for finding token in response headers MHD_check_response_header_token_ci()
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index a9c46c6d..e2d8cfb6 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1888,4 +1888,38 @@ MHD_parse_arguments_ (struct MHD_Connection *connection,
1888 unsigned int *num_headers); 1888 unsigned int *num_headers);
1889 1889
1890 1890
1891/**
1892 * Check whether response header contains particular @a token.
1893 *
1894 * Token could be surrounded by spaces and tabs and delimited by comma.
1895 * Case-insensitive match used for header names and tokens.
1896 * @param response the response to query
1897 * @param key header name
1898 * @param token the token to find
1899 * @param token_len the length of token, not including optional
1900 * terminating null-character.
1901 * @return true if token is found in specified header,
1902 * false otherwise
1903 */
1904bool
1905MHD_check_response_header_token_ci (const struct MHD_Response *response,
1906 const char *key,
1907 const char *token,
1908 size_t token_len);
1909
1910/**
1911 * Check whether response header contains particular static @a tkn.
1912 *
1913 * Token could be surrounded by spaces and tabs and delimited by comma.
1914 * Case-insensitive match used for header names and tokens.
1915 * @param r the response to query
1916 * @param k header name
1917 * @param tkn the static string of token to find
1918 * @return true if token is found in specified header,
1919 * false otherwise
1920 */
1921#define MHD_check_response_header_s_token_ci(r,k,tkn) \
1922 MHD_check_response_header_token_ci((r),(k),(tkn),MHD_STATICSTR_LEN_(tkn))
1923
1924
1891#endif 1925#endif