38#ifdef MHD_FAVOR_SMALL_CODE
39#ifdef _MHD_static_inline
40#undef _MHD_static_inline
45#define _MHD_static_inline static
46#ifndef HAVE_INLINE_FUNCS
47#define HAVE_INLINE_FUNCS 1
56#ifdef HAVE_INLINE_FUNCS
65_MHD_static_inline
bool
68 return (c >=
'a') && (c <=
'z');
81_MHD_static_inline
bool
84 return (c >=
'A') && (c <=
'Z');
95_MHD_static_inline
bool
111_MHD_static_inline
bool
114 return (c >=
'0') && (c <=
'9');
125_MHD_static_inline
bool
129 ( (c >=
'A') && (c <=
'F') ) ||
130 ( (c >=
'a') && (c <=
'f') );
140_MHD_static_inline
bool
160_MHD_static_inline
char
176_MHD_static_inline
char
186#if defined(MHD_FAVOR_SMALL_CODE)
193_MHD_static_inline
int
197 return (
unsigned char) (c -
'0');
212_MHD_static_inline
int
215#if ! defined(MHD_FAVOR_SMALL_CODE)
216 switch ((
unsigned char) c)
518 return (
unsigned char) (c -
'0');
519 if ( (c >=
'A') && (c <=
'F') )
520 return (
unsigned char) (c -
'A' + 10);
521 if ( (c >=
'a') && (c <=
'f') )
522 return (
unsigned char) (c -
'a' + 10);
536_MHD_static_inline
bool
539 return ( (c1 == c2) ||
541 ((c1 -
'A' +
'a') == c2) :
556#define isasciilower(c) (((char) (c)) >= 'a' && ((char) (c)) <= 'z')
566#define isasciiupper(c) (((char) (c)) >= 'A' && ((char) (c)) <= 'Z')
576#define isasciialpha(c) (isasciilower (c) || isasciiupper (c))
586#define isasciidigit(c) (((char) (c)) >= '0' && ((char) (c)) <= '9')
596#define isasciixdigit(c) (isasciidigit ((c)) || \
597 (((char) (c)) >= 'A' && ((char) (c)) <= 'F') || \
598 (((char) (c)) >= 'a' && ((char) (c)) <= 'f') )
608#define isasciialnum(c) (isasciialpha (c) || isasciidigit (c))
620#define toasciilower(c) ((isasciiupper (c)) ? (((char) (c)) - 'A' + 'a') : \
633#define toasciiupper(c) ((isasciilower (c)) ? (((char) (c)) - 'a' + 'A') : \
643#define todigitvalue(c) (isasciidigit (c) ? (int) (((char) (c)) - '0') : \
652#define toxdigitvalue(c) (isasciidigit (c) ? (int) (((char) (c)) - '0') : \
653 ( (((char) (c)) >= 'A' && ((char) (c)) <= 'F') ? \
654 (int) (((unsigned char) (c)) - 'A' + 10) : \
655 ( (((char) (c)) >= 'a' && ((char) (c)) <= 'f') ? \
656 (int) (((unsigned char) (c)) - 'a' + 10) : \
666#define charsequalcaseless(c1, c2) \
667 ( ((c1) == (c2)) || \
668 (isasciiupper (c1) ? \
669 (((c1) - 'A' + 'a') == (c2)) : \
670 (((c1) == ((c2) - 'A' + 'a')) && isasciiupper (c2))) )
675#ifndef MHD_FAVOR_SMALL_CODE
689 const char c1 = *str1;
690 const char c2 = *str2;
719 const char *
const str2,
724 for (i = 0; i < maxlen; ++i)
726 const char c1 = str1[i];
727 const char c2 = str2[i];
751 const char *
const str2,
756 for (i = 0; i < len; ++i)
758 const char c1 = str1[i];
759 const char c2 = str2[i];
784 const char *
const token,
794 while (
' ' == *str ||
'\t' == *str ||
',' == *str)
801 const char sc = *(str++);
802 const char tc = token[i++];
812 while (
' ' == *str ||
'\t' == *str)
815 if ((0 == *str) || (
',' == *str) )
822 while (0 != *str &&
',' != *str)
860 const char *
const token,
861 const size_t token_len,
876 if ((str_len / 2) >= (((
size_t)
SSIZE_MAX - 1) / 3))
879 *buf_size = (ssize_t) -1;
884 token_removed =
false;
886 while ((
size_t) (s1 - str) < str_len)
888 const char *cur_token;
892 while ( ((
size_t) (s1 - str) < str_len) &&
893 ((
' ' == *s1) || (
'\t' == *s1) || (
',' == *s1)) )
899 if ((
size_t) (s1 - str) >= str_len)
908 while ( ((
size_t) (s1 - str) < str_len) && (token_len > t_pos) &&
915 if ( (token_len == t_pos) && (0 != token_len) )
919 while ( ((
size_t) (s1 - str) < str_len) &&
920 ((
' ' == *s1) || (
'\t' == *s1)) )
925 if (((
size_t) (s1 - str) == str_len) || (
',' == *s1))
927 token_removed =
true;
938 copy_size = (size_t) (s1 - cur_token);
941 if ((
size_t) *buf_size < copy_size)
943 *buf_size = (ssize_t) -1;
950 if ((
size_t) *buf_size < ((
size_t) (s2 - buf)) + copy_size + 2)
952 *buf_size = (ssize_t) -1;
961 memcpy (s2, cur_token, copy_size);
965 while ( ((
size_t) (s1 - str) < str_len) && (
',' != *s1))
971 while ( ((
size_t) (s1 - str) < str_len) &&
972 (
',' != *s1) && (
' ' != *s1) && (
'\t' != *s1) )
975 if ((
size_t) *buf_size <= (
size_t) (s2 - buf))
977 *buf_size = (ssize_t) -1;
985 while ( ((
size_t) (s1 - str) < str_len) &&
986 ((
' ' == *s1) || (
'\t' == *s1)) )
992 if (((
size_t) (s1 - str) < str_len) && (
',' != *s1))
995 if ((
size_t) *buf_size <= (
size_t) (s2 - buf))
997 *buf_size = (ssize_t) -1;
1004 mhd_assert (((ssize_t) (s2 - buf)) <= *buf_size);
1005 *buf_size = (ssize_t) (s2 - buf);
1006 return token_removed;
1036 const char *
const tokens,
1037 const size_t tokens_len)
1039 const char *
const t = tokens;
1045 token_removed =
false;
1048 while (pt < tokens_len && *str_len != 0)
1054 while ( (pt < tokens_len) &&
1055 ((
' ' == t[pt]) || (
'\t' == t[pt]) || (
',' == t[pt])) )
1058 if (pt >= tokens_len)
1068 }
while (pt < tokens_len &&
1069 (
' ' != t[pt] &&
'\t' != t[pt] &&
',' != t[pt]));
1071 tkn_len = pt - (size_t) (tkn - t);
1074 while (pt < tokens_len && (
' ' == t[pt] ||
'\t' == t[pt]))
1077 }
while (pt < tokens_len &&
',' != t[pt]);
1082 if (*str_len == tkn_len)
1087 token_removed =
true;
1098 if (*str_len > tkn_len + 2)
1110 if ( ( ((*str_len) == (pr + tkn_len)) || (
',' == str[pr + tkn_len]) ) &&
1115 (
' ' == str[pr + tkn_len + 1]));
1116 token_removed =
true;
1141 }
while (pr < *str_len &&
',' != str[pr]);
1148 if ((*str_len) < (pr + tkn_len))
1150 if ((*str_len) > pr)
1153 copy_size = *str_len - pr;
1165 memmove (str + pw, str + pr, copy_size);
1171 mhd_assert ((
' ' != str[0]) && (
'\t' != str[0]));
1173 mhd_assert ((0 == pr) || (
' ' == str[pr - 1]));
1174 mhd_assert ((0 == pr) || (
',' == str[pr - 2]));
1179 return token_removed;
1183#ifndef MHD_FAVOR_SMALL_CODE
1200 const char *
const start = str;
1209 const int digit = (
unsigned char) (*str) -
'0';
1216 res += (
unsigned int) digit;
1221 return (
size_t) (str - start);
1246 if (! str || ! maxlen || ! out_val || !
isasciidigit (str[0]))
1253 const int digit = (
unsigned char) str[i] -
'0';
1261 res += (
unsigned int) digit;
1263 }
while ( (i < maxlen) &&
1285 const char *
const start = str;
1289 if (! str || ! out_val)
1301 res += (
unsigned int) digit;
1309 if (str - start > 0)
1311 return (
size_t) (str - start);
1336 if (! str || ! out_val)
1349 res += (
unsigned int) digit;
1373 const char *
const start = str;
1376 if (! str || ! out_val)
1388 res += (
unsigned int) digit;
1396 if (str - start > 0)
1398 return (
size_t) (str - start);
1423 if (! str || ! out_val)
1436 res += (
unsigned int) digit;
1466MHD_str_to_uvalue_n_ (
const char *str,
1475 const uint64_t max_v_div_b = max_val / base;
1476 const uint64_t max_v_mod_b = max_val % base;
1478 if (! str || ! out_val ||
1479 ((base != 16) && (base != 10)) )
1486 const int digit = (base == 16) ?
1491 if ( ((max_v_div_b) < res) ||
1492 (( (max_v_div_b) == res) && ( (max_v_mod_b) < (uint64_t) digit) ) )
1496 res += (
unsigned int) digit;
1503 *(uint64_t *) out_val = res;
1504 else if (4 == val_size)
1505 *(uint32_t *) out_val = (uint32_t) res;
1529 digit = (int) (val >> 28);
1531 }
while ((0 == digit) && (0 != digit_pos));
1533 while (o_pos < buf_size)
1536 (char) ((digit <= 9) ?
1537 (
'0' + (
char) digit) :
1538 (
'A' + (
char) digit - 10));
1542 digit = (int) (val >> 28);
1549#ifndef MHD_FAVOR_SMALL_CODE
1557 uint16_t divisor = UINT16_C (10000);
1561 digit = (int) (val / divisor);
1565 while ((0 == digit) && (1 < divisor))
1568 digit = (int) (val / divisor);
1572 while (0 != buf_size)
1574 *chr = (char) ((
char) digit +
'0');
1578 return (
size_t) (chr - buf);
1579 val = (uint16_t) (val % divisor);
1581 digit = (int) (val / divisor);
1598 uint64_t divisor = UINT64_C (10000000000000000000);
1602 digit = (int) (val / divisor);
1606 while ((0 == digit) && (1 < divisor))
1609 digit = (int) (val / divisor);
1613 while (0 != buf_size)
1615 *chr = (char) ((
char) digit +
'0');
1619 return (
size_t) (chr - buf);
1622 digit = (int) (val / divisor);
1645 if (3 <= min_digits)
1650 buf[pos++] = (char) (
'0' + (
char) digit);
1655 if (buf_size <= pos)
1660 if (2 <= min_digits)
1665 buf[pos++] = (char) (
'0' + (
char) digit);
1669 if (buf_size <= pos)
1671 buf[pos++] = (char) (
'0' + (
char) val);
1683 for (i = 0; i < size; ++i)
1686 const uint8_t b = ((
const uint8_t *) bin)[i];
1688 hex[i * 2] = (char) ((j < 10) ? (j +
'0') : (j - 10 +
'a'));
1690 hex[i * 2 + 1] = (char) ((j < 10) ? (j +
'0') : (j - 10 +
'a'));
1715 uint8_t *
const out = (uint8_t *) bin;
1726 const char c2 = hex[r++];
1730 out[w++] = (uint8_t) ((
unsigned int) l);
1734 const char c1 = hex[r++];
1735 const char c2 = hex[r++];
1738 if ((0 > h) || (0 > l))
1740 out[w++] = (uint8_t) ( ((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1741 | ((uint8_t) ((
unsigned int) l)) );
1751 size_t pct_encoded_len,
1755#ifdef MHD_FAVOR_SMALL_CODE
1770 if (buf_size >= pct_encoded_len)
1772 while (r < pct_encoded_len)
1774 const char chr = pct_encoded[r];
1777 if (3 > pct_encoded_len - r)
1780 const char c1 = pct_encoded[++r];
1781 const char c2 = pct_encoded[++r];
1785 if ((0 > h) || (0 > l))
1788 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1789 | ((uint8_t) ((
unsigned int) l)));
1790 decoded[w] = (char) out;
1801 while (r < pct_encoded_len)
1803 const char chr = pct_encoded[r];
1808 if (3 > pct_encoded_len - r)
1811 const char c1 = pct_encoded[++r];
1812 const char c2 = pct_encoded[++r];
1816 if ((0 > h) || (0 > l))
1819 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1820 | ((uint8_t) ((
unsigned int) l)));
1821 decoded[w] = (char) out;
1836 size_t pct_encoded_len,
1839 bool *broken_encoding)
1845 if (
NULL != broken_encoding)
1846 *broken_encoding =
false;
1847#ifndef MHD_FAVOR_SMALL_CODE
1848 if (buf_size >= pct_encoded_len)
1850 while (r < pct_encoded_len)
1852 const char chr = pct_encoded[r];
1855 if (3 > pct_encoded_len - r)
1857 if (
NULL != broken_encoding)
1858 *broken_encoding =
true;
1863 const char c1 = pct_encoded[++r];
1864 const char c2 = pct_encoded[++r];
1868 if ((0 > h) || (0 > l))
1871 if (
NULL != broken_encoding)
1872 *broken_encoding =
true;
1878 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1879 | ((uint8_t) ((
unsigned int) l)));
1880 decoded[w] = (char) out;
1892 while (r < pct_encoded_len)
1894 const char chr = pct_encoded[r];
1899 if (3 > pct_encoded_len - r)
1901 if (
NULL != broken_encoding)
1902 *broken_encoding =
true;
1907 const char c1 = pct_encoded[++r];
1908 const char c2 = pct_encoded[++r];
1911 if ((0 > h) || (0 > l))
1914 if (
NULL != broken_encoding)
1915 *broken_encoding =
true;
1922 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1923 | ((uint8_t) ((
unsigned int) l)));
1924 decoded[w] = (char) out;
1940#ifdef MHD_FAVOR_SMALL_CODE
1959 const char chr = str[r++];
1962 const char d1 = str[r++];
1967 const char d2 = str[r++];
1975 if ((0 > h) || (0 > l))
1978 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1979 | ((uint8_t) ((
unsigned int) l)));
1980 str[w++] = (char) out;
1995 bool *broken_encoding)
1997#ifdef MHD_FAVOR_SMALL_CODE
2009 if (
NULL != broken_encoding)
2010 *broken_encoding =
false;
2015 const char chr = str[r++];
2018 const char d1 = str[r++];
2021 if (
NULL != broken_encoding)
2022 *broken_encoding =
true;
2029 const char d2 = str[r++];
2032 if (
NULL != broken_encoding)
2033 *broken_encoding =
true;
2044 if ((0 > h) || (0 > l))
2046 if (
NULL != broken_encoding)
2047 *broken_encoding =
true;
2054 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
2055 | ((uint8_t) ((
unsigned int) l)));
2056 str[w++] = (char) out;
2071MHD_str_equal_quoted_bin_n (
const char *quoted,
2073 const char *unquoted,
2074 size_t unquoted_len)
2078 if (unquoted_len < quoted_len / 2)
2082 for (i = 0; quoted_len > i && unquoted_len > j; ++i, ++j)
2084 if (
'\\' == quoted[i])
2087 if (quoted_len == i)
2090 if (quoted[i] != unquoted[j])
2093 if ((quoted_len != i) || (unquoted_len != j))
2101MHD_str_equal_caseless_quoted_bin_n (
const char *quoted,
2103 const char *unquoted,
2104 size_t unquoted_len)
2108 if (unquoted_len < quoted_len / 2)
2112 for (i = 0; quoted_len > i && unquoted_len > j; ++i, ++j)
2114 if (
'\\' == quoted[i])
2117 if (quoted_len == i)
2123 if ((quoted_len != i) || (unquoted_len != j))
2131MHD_str_unquote (
const char *quoted,
2141 while (quoted_len > r)
2143 if (
'\\' == quoted[r])
2146 if (quoted_len == r)
2149 result[w++] = quoted[r++];
2157#if defined(DAUTH_SUPPORT) || defined(BAUTH_SUPPORT)
2160MHD_str_quote (
const char *unquoted,
2161 size_t unquoted_len,
2171#ifndef MHD_FAVOR_SMALL_CODE
2172 if (unquoted_len * 2 <= buf_size)
2175 while (unquoted_len > r)
2177 const char chr = unquoted[r++];
2178 if ((
'\\' == chr) || (
'\"' == chr))
2185 if (unquoted_len > buf_size)
2192 while (unquoted_len > r)
2198 const char chr = unquoted[r++];
2199 if ((
'\\' == chr) || (
'\"' == chr))
2226#ifndef MHD_BASE64_FUNC_VERSION
2227#ifdef MHD_FAVOR_SMALL_CODE
2228#define MHD_BASE64_FUNC_VERSION 1
2230#define MHD_BASE64_FUNC_VERSION 3
2234#if MHD_BASE64_FUNC_VERSION < 1 || MHD_BASE64_FUNC_VERSION > 3
2235#error Wrong MHD_BASE64_FUNC_VERSION value
2238#if MHD_BASE64_FUNC_VERSION == 3
2239#define MHD_base64_map_type_ int
2241#define MHD_base64_map_type_ int8_t
2244#if MHD_BASE64_FUNC_VERSION == 1
2245static MHD_base64_map_type_
2246base64_char_to_value_ (uint8_t c)
2251 return (MHD_base64_map_type_) ((c -
'A') + 0);
2255 return (MHD_base64_map_type_) ((c -
'0') + 52);
2266 if ((
'z' >= c) && (
'a' <= c))
2267 return (MHD_base64_map_type_) ((c -
'a') + 26);
2279MHD_base64_to_bin_n (
const char *base64,
2284#if MHD_BASE64_FUNC_VERSION >= 2
2285 static const MHD_base64_map_type_ map[] = {
2289 -1, -1, -1, -1, -1, -1, -1, -1,
2293 -1, -1, -1, -1, -1, -1, -1, -1,
2297 -1, -1, -1, -1, -1, -1, -1, -1,
2301 -1, -1, -1, -1, -1, -1, -1, -1,
2305 -1, -1, -1, -1, -1, -1, -1, -1,
2309 -1, -1, -1, 62, -1, -1, -1, 63,
2313 52, 53, 54, 55, 56, 57, 58, 59,
2317 60, 61, -1, -1, -1, -2, -1, -1,
2321 -1, 0, 1, 2, 3, 4, 5, 6,
2325 7, 8, 9, 10, 11, 12, 13, 14,
2329 15, 16, 17, 18, 19, 20, 21, 22,
2333 23, 24, 25, -1, -1, -1, -1, -1,
2337 -1, 26, 27, 28, 29, 30, 31, 32,
2341 33, 34, 35, 36, 37, 38, 39, 40,
2345 41, 42, 43, 44, 45, 46, 47, 48,
2349 49, 50, 51, -1, -1, -1, -1, -1
2351#if MHD_BASE64_FUNC_VERSION == 3
2353 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2357 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2359 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2363#define base64_char_to_value_(c) map[(c)]
2365 const uint8_t *
const in = (
const uint8_t *) base64;
2366 uint8_t *
const out = (uint8_t *) bin;
2369 if (0 == base64_len)
2371 if (0 != base64_len % 4)
2373 if (base64_len / 4 * 3 - 2 > bin_size)
2377 for (i = 0; i < (base64_len - 4); i += 4)
2379#if MHD_BASE64_FUNC_VERSION == 2
2380 if (0 != (0x80 & (in[i] | in[i + 1] | in[i + 2] | in[i + 3])))
2385 const MHD_base64_map_type_ v1 = base64_char_to_value_ (in[i + 0]);
2386 const MHD_base64_map_type_ v2 = base64_char_to_value_ (in[i + 1]);
2387 const MHD_base64_map_type_ v3 = base64_char_to_value_ (in[i + 2]);
2388 const MHD_base64_map_type_ v4 = base64_char_to_value_ (in[i + 3]);
2389 if ((0 > v1) || (0 > v2) || (0 > v3) || (0 > v4))
2391 out[j + 0] = (uint8_t) (((uint8_t) (((uint8_t) v1) << 2))
2392 | ((uint8_t) (((uint8_t) v2) >> 4)));
2393 out[j + 1] = (uint8_t) (((uint8_t) (((uint8_t) v2) << 4))
2394 | ((uint8_t) (((uint8_t) v3) >> 2)));
2395 out[j + 2] = (uint8_t) (((uint8_t) (((uint8_t) v3) << 6))
2400#if MHD_BASE64_FUNC_VERSION == 2
2401 if (0 != (0x80 & (in[i] | in[i + 1] | in[i + 2] | in[i + 3])))
2406 const MHD_base64_map_type_ v1 = base64_char_to_value_ (in[i + 0]);
2407 const MHD_base64_map_type_ v2 = base64_char_to_value_ (in[i + 1]);
2408 const MHD_base64_map_type_ v3 = base64_char_to_value_ (in[i + 2]);
2409 const MHD_base64_map_type_ v4 = base64_char_to_value_ (in[i + 3]);
2410 if ((0 > v1) || (0 > v2))
2413 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v1) << 2))
2414 | ((uint8_t) (((uint8_t) v2) >> 4)));
2417 if ((-2 != v3) || (-2 != v4))
2419 if (0 != (uint8_t) (((uint8_t) v2) << 4))
2425 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v2) << 4))
2426 | ((uint8_t) (((uint8_t) v3) >> 2)));
2431 if (0 != (uint8_t) (((uint8_t) v3) << 6))
2437 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v3) << 6))
2441#if MHD_BASE64_FUNC_VERSION >= 2
2442#undef base64_char_to_value_
2450#undef MHD_base64_map_type_
#define mhd_assert(ignore)
macros for MHD_CHECK_(), always-compiled memory-safety invariants
#define MHD_CHECK_RET_(expr, retval)
limits values definitions
#define MHD_DATA_TRUNCATION_RUNTIME_CHECK_DISABLE_
#define MHD_DATA_TRUNCATION_RUNTIME_CHECK_RESTORE_
int MHD_str_equal_caseless_(const char *str1, const char *str2)
size_t MHD_bin_to_hex(const void *bin, size_t size, char *hex)
size_t MHD_str_pct_decode_strict_n_(const char *pct_encoded, size_t pct_encoded_len, char *decoded, size_t buf_size)
size_t MHD_bin_to_hex_z(const void *bin, size_t size, char *hex)
size_t MHD_strx_to_uint32_(const char *str, uint32_t *out_val)
size_t MHD_uint8_to_str_pad(uint8_t val, uint8_t min_digits, char *buf, size_t buf_size)
bool MHD_str_remove_tokens_caseless_(char *str, size_t *str_len, const char *const tokens, const size_t tokens_len)
size_t MHD_str_pct_decode_lenient_n_(const char *pct_encoded, size_t pct_encoded_len, char *decoded, size_t buf_size, bool *broken_encoding)
size_t MHD_uint16_to_str(uint16_t val, char *buf, size_t buf_size)
size_t MHD_str_to_uint64_n_(const char *str, size_t maxlen, uint64_t *out_val)
size_t MHD_str_pct_decode_in_place_lenient_(char *str, bool *broken_encoding)
size_t MHD_uint64_to_str(uint64_t val, char *buf, size_t buf_size)
size_t MHD_strx_to_uint64_n_(const char *str, size_t maxlen, uint64_t *out_val)
int MHD_str_equal_caseless_n_(const char *const str1, const char *const str2, size_t maxlen)
size_t MHD_str_pct_decode_in_place_strict_(char *str)
size_t MHD_str_to_uint64_(const char *str, uint64_t *out_val)
#define charsequalcaseless(c1, c2)
bool MHD_str_has_token_caseless_(const char *str, const char *const token, size_t token_len)
bool MHD_str_remove_token_caseless_(const char *str, size_t str_len, const char *const token, const size_t token_len, char *buf, ssize_t *buf_size)
bool MHD_str_equal_caseless_bin_n_(const char *const str1, const char *const str2, size_t len)
size_t MHD_uint32_to_strx(uint32_t val, char *buf, size_t buf_size)
size_t MHD_strx_to_uint64_(const char *str, uint64_t *out_val)
size_t MHD_strx_to_uint32_n_(const char *str, size_t maxlen, uint32_t *out_val)
size_t MHD_hex_to_bin(const char *hex, size_t len, void *bin)
Header for string manipulating helpers.