37#ifdef MHD_FAVOR_SMALL_CODE
38#ifdef _MHD_static_inline
39#undef _MHD_static_inline
44#define _MHD_static_inline static
45#ifndef HAVE_INLINE_FUNCS
46#define HAVE_INLINE_FUNCS 1
55#ifdef HAVE_INLINE_FUNCS
64_MHD_static_inline
bool
67 return (c >=
'a') && (c <=
'z');
80_MHD_static_inline
bool
83 return (c >=
'A') && (c <=
'Z');
94_MHD_static_inline
bool
110_MHD_static_inline
bool
113 return (c >=
'0') && (c <=
'9');
124_MHD_static_inline
bool
128 ( (c >=
'A') && (c <=
'F') ) ||
129 ( (c >=
'a') && (c <=
'f') );
139_MHD_static_inline
bool
159_MHD_static_inline
char
175_MHD_static_inline
char
185#if defined(MHD_FAVOR_SMALL_CODE)
192_MHD_static_inline
int
196 return (
unsigned char) (c -
'0');
211_MHD_static_inline
int
214#if ! defined(MHD_FAVOR_SMALL_CODE)
215 switch ((
unsigned char) c)
517 return (
unsigned char) (c -
'0');
518 if ( (c >=
'A') && (c <=
'F') )
519 return (
unsigned char) (c -
'A' + 10);
520 if ( (c >=
'a') && (c <=
'f') )
521 return (
unsigned char) (c -
'a' + 10);
535_MHD_static_inline
bool
538 return ( (c1 == c2) ||
540 ((c1 -
'A' +
'a') == c2) :
555#define isasciilower(c) (((char) (c)) >= 'a' && ((char) (c)) <= 'z')
565#define isasciiupper(c) (((char) (c)) >= 'A' && ((char) (c)) <= 'Z')
575#define isasciialpha(c) (isasciilower (c) || isasciiupper (c))
585#define isasciidigit(c) (((char) (c)) >= '0' && ((char) (c)) <= '9')
595#define isasciixdigit(c) (isasciidigit ((c)) || \
596 (((char) (c)) >= 'A' && ((char) (c)) <= 'F') || \
597 (((char) (c)) >= 'a' && ((char) (c)) <= 'f') )
607#define isasciialnum(c) (isasciialpha (c) || isasciidigit (c))
619#define toasciilower(c) ((isasciiupper (c)) ? (((char) (c)) - 'A' + 'a') : \
632#define toasciiupper(c) ((isasciilower (c)) ? (((char) (c)) - 'a' + 'A') : \
642#define todigitvalue(c) (isasciidigit (c) ? (int) (((char) (c)) - '0') : \
651#define toxdigitvalue(c) (isasciidigit (c) ? (int) (((char) (c)) - '0') : \
652 ( (((char) (c)) >= 'A' && ((char) (c)) <= 'F') ? \
653 (int) (((unsigned char) (c)) - 'A' + 10) : \
654 ( (((char) (c)) >= 'a' && ((char) (c)) <= 'f') ? \
655 (int) (((unsigned char) (c)) - 'a' + 10) : \
665#define charsequalcaseless(c1, c2) \
666 ( ((c1) == (c2)) || \
667 (isasciiupper (c1) ? \
668 (((c1) - 'A' + 'a') == (c2)) : \
669 (((c1) == ((c2) - 'A' + 'a')) && isasciiupper (c2))) )
674#ifndef MHD_FAVOR_SMALL_CODE
688 const char c1 = *str1;
689 const char c2 = *str2;
718 const char *
const str2,
723 for (i = 0; i < maxlen; ++i)
725 const char c1 = str1[i];
726 const char c2 = str2[i];
750 const char *
const str2,
755 for (i = 0; i < len; ++i)
757 const char c1 = str1[i];
758 const char c2 = str2[i];
783 const char *
const token,
793 while (
' ' == *str ||
'\t' == *str ||
',' == *str)
800 const char sc = *(str++);
801 const char tc = token[i++];
811 while (
' ' == *str ||
'\t' == *str)
814 if ((0 == *str) || (
',' == *str) )
821 while (0 != *str &&
',' != *str)
859 const char *
const token,
860 const size_t token_len,
875 if (
SSIZE_MAX <= ((str_len / 2) * 3 + 3))
878 *buf_size = (ssize_t) -1;
883 token_removed =
false;
885 while ((
size_t) (s1 - str) < str_len)
887 const char *cur_token;
891 while ( ((
size_t) (s1 - str) < str_len) &&
892 ((
' ' == *s1) || (
'\t' == *s1) || (
',' == *s1)) )
898 if ((
size_t) (s1 - str) >= str_len)
907 while ( ((
size_t) (s1 - str) < str_len) && (token_len > t_pos) &&
914 if ( (token_len == t_pos) && (0 != token_len) )
918 while ( ((
size_t) (s1 - str) < str_len) &&
919 ((
' ' == *s1) || (
'\t' == *s1)) )
924 if (((
size_t) (s1 - str) == str_len) || (
',' == *s1))
926 token_removed =
true;
937 copy_size = (size_t) (s1 - cur_token);
940 if ((
size_t) *buf_size < copy_size)
942 *buf_size = (ssize_t) -1;
949 if ((
size_t) *buf_size < ((
size_t) (s2 - buf)) + copy_size + 2)
951 *buf_size = (ssize_t) -1;
960 memcpy (s2, cur_token, copy_size);
964 while ( ((
size_t) (s1 - str) < str_len) && (
',' != *s1))
970 while ( ((
size_t) (s1 - str) < str_len) &&
971 (
',' != *s1) && (
' ' != *s1) && (
'\t' != *s1) )
974 if ((
size_t) *buf_size <= (
size_t) (s2 - buf))
976 *buf_size = (ssize_t) -1;
984 while ( ((
size_t) (s1 - str) < str_len) &&
985 ((
' ' == *s1) || (
'\t' == *s1)) )
991 if (((
size_t) (s1 - str) < str_len) && (
',' != *s1))
994 if ((
size_t) *buf_size <= (
size_t) (s2 - buf))
996 *buf_size = (ssize_t) -1;
1003 mhd_assert (((ssize_t) (s2 - buf)) <= *buf_size);
1004 *buf_size = (ssize_t) (s2 - buf);
1005 return token_removed;
1035 const char *
const tokens,
1036 const size_t tokens_len)
1038 const char *
const t = tokens;
1044 token_removed =
false;
1047 while (pt < tokens_len && *str_len != 0)
1053 while ( (pt < tokens_len) &&
1054 ((
' ' == t[pt]) || (
'\t' == t[pt]) || (
',' == t[pt])) )
1057 if (pt >= tokens_len)
1067 }
while (pt < tokens_len &&
1068 (
' ' != t[pt] &&
'\t' != t[pt] &&
',' != t[pt]));
1070 tkn_len = pt - (size_t) (tkn - t);
1073 while (pt < tokens_len && (
' ' == t[pt] ||
'\t' == t[pt]))
1076 }
while (pt < tokens_len &&
',' != t[pt]);
1081 if (*str_len == tkn_len)
1086 token_removed =
true;
1097 if (*str_len > tkn_len + 2)
1109 if ( ( ((*str_len) == (pr + tkn_len)) || (
',' == str[pr + tkn_len]) ) &&
1114 (
' ' == str[pr + tkn_len + 1]));
1115 token_removed =
true;
1140 }
while (pr < *str_len &&
',' != str[pr]);
1147 if ((*str_len) < (pr + tkn_len))
1149 if ((*str_len) > pr)
1152 copy_size = *str_len - pr;
1164 memmove (str + pw, str + pr, copy_size);
1170 mhd_assert ((
' ' != str[0]) && (
'\t' != str[0]));
1172 mhd_assert ((0 == pr) || (
' ' == str[pr - 1]));
1173 mhd_assert ((0 == pr) || (
',' == str[pr - 2]));
1178 return token_removed;
1182#ifndef MHD_FAVOR_SMALL_CODE
1199 const char *
const start = str;
1208 const int digit = (
unsigned char) (*str) -
'0';
1215 res += (
unsigned int) digit;
1220 return (
size_t) (str - start);
1245 if (! str || ! maxlen || ! out_val || !
isasciidigit (str[0]))
1252 const int digit = (
unsigned char) str[i] -
'0';
1260 res += (
unsigned int) digit;
1262 }
while ( (i < maxlen) &&
1284 const char *
const start = str;
1288 if (! str || ! out_val)
1300 res += (
unsigned int) digit;
1308 if (str - start > 0)
1310 return (
size_t) (str - start);
1335 if (! str || ! out_val)
1348 res += (
unsigned int) digit;
1372 const char *
const start = str;
1375 if (! str || ! out_val)
1387 res += (
unsigned int) digit;
1395 if (str - start > 0)
1397 return (
size_t) (str - start);
1422 if (! str || ! out_val)
1435 res += (
unsigned int) digit;
1465MHD_str_to_uvalue_n_ (
const char *str,
1474 const uint64_t max_v_div_b = max_val / base;
1475 const uint64_t max_v_mod_b = max_val % base;
1477 if (! str || ! out_val ||
1478 ((base != 16) && (base != 10)) )
1485 const int digit = (base == 16) ?
1490 if ( ((max_v_div_b) < res) ||
1491 (( (max_v_div_b) == res) && ( (max_v_mod_b) < (uint64_t) digit) ) )
1495 res += (
unsigned int) digit;
1502 *(uint64_t *) out_val = res;
1503 else if (4 == val_size)
1504 *(uint32_t *) out_val = (uint32_t) res;
1528 digit = (int) (val >> 28);
1530 }
while ((0 == digit) && (0 != digit_pos));
1532 while (o_pos < buf_size)
1535 (char) ((digit <= 9) ?
1536 (
'0' + (
char) digit) :
1537 (
'A' + (
char) digit - 10));
1541 digit = (int) (val >> 28);
1548#ifndef MHD_FAVOR_SMALL_CODE
1556 uint16_t divisor = UINT16_C (10000);
1560 digit = (int) (val / divisor);
1564 while ((0 == digit) && (1 < divisor))
1567 digit = (int) (val / divisor);
1571 while (0 != buf_size)
1573 *chr = (char) ((
char) digit +
'0');
1577 return (
size_t) (chr - buf);
1578 val = (uint16_t) (val % divisor);
1580 digit = (int) (val / divisor);
1597 uint64_t divisor = UINT64_C (10000000000000000000);
1601 digit = (int) (val / divisor);
1605 while ((0 == digit) && (1 < divisor))
1608 digit = (int) (val / divisor);
1612 while (0 != buf_size)
1614 *chr = (char) ((
char) digit +
'0');
1618 return (
size_t) (chr - buf);
1621 digit = (int) (val / divisor);
1644 if (3 <= min_digits)
1649 buf[pos++] = (char) (
'0' + (
char) digit);
1654 if (buf_size <= pos)
1659 if (2 <= min_digits)
1664 buf[pos++] = (char) (
'0' + (
char) digit);
1668 if (buf_size <= pos)
1670 buf[pos++] = (char) (
'0' + (
char) val);
1682 for (i = 0; i < size; ++i)
1685 const uint8_t b = ((
const uint8_t *) bin)[i];
1687 hex[i * 2] = (char) ((j < 10) ? (j +
'0') : (j - 10 +
'a'));
1689 hex[i * 2 + 1] = (char) ((j < 10) ? (j +
'0') : (j - 10 +
'a'));
1714 uint8_t *
const out = (uint8_t *) bin;
1725 const char c2 = hex[r++];
1729 out[w++] = (uint8_t) ((
unsigned int) l);
1733 const char c1 = hex[r++];
1734 const char c2 = hex[r++];
1737 if ((0 > h) || (0 > l))
1739 out[w++] = (uint8_t) ( ((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1740 | ((uint8_t) ((
unsigned int) l)) );
1750 size_t pct_encoded_len,
1754#ifdef MHD_FAVOR_SMALL_CODE
1769 if (buf_size >= pct_encoded_len)
1771 while (r < pct_encoded_len)
1773 const char chr = pct_encoded[r];
1776 if (2 > 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 (2 > pct_encoded_len - r)
1812 const char c1 = pct_encoded[++r];
1813 const char c2 = pct_encoded[++r];
1817 if ((0 > h) || (0 > l))
1820 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1821 | ((uint8_t) ((
unsigned int) l)));
1822 decoded[w] = (char) out;
1837 size_t pct_encoded_len,
1840 bool *broken_encoding)
1846 if (
NULL != broken_encoding)
1847 *broken_encoding =
false;
1848#ifndef MHD_FAVOR_SMALL_CODE
1849 if (buf_size >= pct_encoded_len)
1851 while (r < pct_encoded_len)
1853 const char chr = pct_encoded[r];
1856 if (2 > pct_encoded_len - r)
1858 if (
NULL != broken_encoding)
1859 *broken_encoding =
true;
1864 const char c1 = pct_encoded[++r];
1865 const char c2 = pct_encoded[++r];
1869 if ((0 > h) || (0 > l))
1872 if (
NULL != broken_encoding)
1873 *broken_encoding =
true;
1879 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1880 | ((uint8_t) ((
unsigned int) l)));
1881 decoded[w] = (char) out;
1893 while (r < pct_encoded_len)
1895 const char chr = pct_encoded[r];
1900 if (2 > pct_encoded_len - r)
1902 if (
NULL != broken_encoding)
1903 *broken_encoding =
true;
1908 const char c1 = pct_encoded[++r];
1909 const char c2 = pct_encoded[++r];
1912 if ((0 > h) || (0 > l))
1915 if (
NULL != broken_encoding)
1916 *broken_encoding =
true;
1923 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1924 | ((uint8_t) ((
unsigned int) l)));
1925 decoded[w] = (char) out;
1941#ifdef MHD_FAVOR_SMALL_CODE
1960 const char chr = str[r++];
1963 const char d1 = str[r++];
1968 const char d2 = str[r++];
1976 if ((0 > h) || (0 > l))
1979 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
1980 | ((uint8_t) ((
unsigned int) l)));
1981 str[w++] = (char) out;
1996 bool *broken_encoding)
1998#ifdef MHD_FAVOR_SMALL_CODE
2010 if (
NULL != broken_encoding)
2011 *broken_encoding =
false;
2016 const char chr = str[r++];
2019 const char d1 = str[r++];
2022 if (
NULL != broken_encoding)
2023 *broken_encoding =
true;
2030 const char d2 = str[r++];
2033 if (
NULL != broken_encoding)
2034 *broken_encoding =
true;
2045 if ((0 > h) || (0 > l))
2047 if (
NULL != broken_encoding)
2048 *broken_encoding =
true;
2055 (
unsigned char) (((uint8_t) (((uint8_t) ((
unsigned int) h)) << 4))
2056 | ((uint8_t) ((
unsigned int) l)));
2057 str[w++] = (char) out;
2072MHD_str_equal_quoted_bin_n (
const char *quoted,
2074 const char *unquoted,
2075 size_t unquoted_len)
2079 if (unquoted_len < quoted_len / 2)
2083 for (i = 0; quoted_len > i && unquoted_len > j; ++i, ++j)
2085 if (
'\\' == quoted[i])
2088 if (quoted_len == i)
2091 if (quoted[i] != unquoted[j])
2094 if ((quoted_len != i) || (unquoted_len != j))
2102MHD_str_equal_caseless_quoted_bin_n (
const char *quoted,
2104 const char *unquoted,
2105 size_t unquoted_len)
2109 if (unquoted_len < quoted_len / 2)
2113 for (i = 0; quoted_len > i && unquoted_len > j; ++i, ++j)
2115 if (
'\\' == quoted[i])
2118 if (quoted_len == i)
2124 if ((quoted_len != i) || (unquoted_len != j))
2132MHD_str_unquote (
const char *quoted,
2142 while (quoted_len > r)
2144 if (
'\\' == quoted[r])
2147 if (quoted_len == r)
2150 result[w++] = quoted[r++];
2158#if defined(DAUTH_SUPPORT) || defined(BAUTH_SUPPORT)
2161MHD_str_quote (
const char *unquoted,
2162 size_t unquoted_len,
2172#ifndef MHD_FAVOR_SMALL_CODE
2173 if (unquoted_len * 2 <= buf_size)
2176 while (unquoted_len > r)
2178 const char chr = unquoted[r++];
2179 if ((
'\\' == chr) || (
'\"' == chr))
2186 if (unquoted_len > buf_size)
2193 while (unquoted_len > r)
2199 const char chr = unquoted[r++];
2200 if ((
'\\' == chr) || (
'\"' == chr))
2227#ifndef MHD_BASE64_FUNC_VERSION
2228#ifdef MHD_FAVOR_SMALL_CODE
2229#define MHD_BASE64_FUNC_VERSION 1
2231#define MHD_BASE64_FUNC_VERSION 3
2235#if MHD_BASE64_FUNC_VERSION < 1 || MHD_BASE64_FUNC_VERSION > 3
2236#error Wrong MHD_BASE64_FUNC_VERSION value
2239#if MHD_BASE64_FUNC_VERSION == 3
2240#define MHD_base64_map_type_ int
2242#define MHD_base64_map_type_ int8_t
2245#if MHD_BASE64_FUNC_VERSION == 1
2246static MHD_base64_map_type_
2247base64_char_to_value_ (uint8_t c)
2252 return (MHD_base64_map_type_) ((c -
'A') + 0);
2256 return (MHD_base64_map_type_) ((c -
'0') + 52);
2267 if ((
'z' >= c) && (
'a' <= c))
2268 return (MHD_base64_map_type_) ((c -
'a') + 26);
2280MHD_base64_to_bin_n (
const char *base64,
2285#if MHD_BASE64_FUNC_VERSION >= 2
2286 static const MHD_base64_map_type_ map[] = {
2290 -1, -1, -1, -1, -1, -1, -1, -1,
2294 -1, -1, -1, -1, -1, -1, -1, -1,
2298 -1, -1, -1, -1, -1, -1, -1, -1,
2302 -1, -1, -1, -1, -1, -1, -1, -1,
2306 -1, -1, -1, -1, -1, -1, -1, -1,
2310 -1, -1, -1, 62, -1, -1, -1, 63,
2314 52, 53, 54, 55, 56, 57, 58, 59,
2318 60, 61, -1, -1, -1, -2, -1, -1,
2322 -1, 0, 1, 2, 3, 4, 5, 6,
2326 7, 8, 9, 10, 11, 12, 13, 14,
2330 15, 16, 17, 18, 19, 20, 21, 22,
2334 23, 24, 25, -1, -1, -1, -1, -1,
2338 -1, 26, 27, 28, 29, 30, 31, 32,
2342 33, 34, 35, 36, 37, 38, 39, 40,
2346 41, 42, 43, 44, 45, 46, 47, 48,
2350 49, 50, 51, -1, -1, -1, -1, -1
2352#if MHD_BASE64_FUNC_VERSION == 3
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,
2361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2364#define base64_char_to_value_(c) map[(c)]
2366 const uint8_t *
const in = (
const uint8_t *) base64;
2367 uint8_t *
const out = (uint8_t *) bin;
2370 if (0 == base64_len)
2372 if (0 != base64_len % 4)
2374 if (base64_len / 4 * 3 - 2 > bin_size)
2378 for (i = 0; i < (base64_len - 4); i += 4)
2380#if MHD_BASE64_FUNC_VERSION == 2
2381 if (0 != (0x80 & (in[i] | in[i + 1] | in[i + 2] | in[i + 3])))
2386 const MHD_base64_map_type_ v1 = base64_char_to_value_ (in[i + 0]);
2387 const MHD_base64_map_type_ v2 = base64_char_to_value_ (in[i + 1]);
2388 const MHD_base64_map_type_ v3 = base64_char_to_value_ (in[i + 2]);
2389 const MHD_base64_map_type_ v4 = base64_char_to_value_ (in[i + 3]);
2390 if ((0 > v1) || (0 > v2) || (0 > v3) || (0 > v4))
2392 out[j + 0] = (uint8_t) (((uint8_t) (((uint8_t) v1) << 2))
2393 | ((uint8_t) (((uint8_t) v2) >> 4)));
2394 out[j + 1] = (uint8_t) (((uint8_t) (((uint8_t) v2) << 4))
2395 | ((uint8_t) (((uint8_t) v3) >> 2)));
2396 out[j + 2] = (uint8_t) (((uint8_t) (((uint8_t) v3) << 6))
2401#if MHD_BASE64_FUNC_VERSION == 2
2402 if (0 != (0x80 & (in[i] | in[i + 1] | in[i + 2] | in[i + 3])))
2407 const MHD_base64_map_type_ v1 = base64_char_to_value_ (in[i + 0]);
2408 const MHD_base64_map_type_ v2 = base64_char_to_value_ (in[i + 1]);
2409 const MHD_base64_map_type_ v3 = base64_char_to_value_ (in[i + 2]);
2410 const MHD_base64_map_type_ v4 = base64_char_to_value_ (in[i + 3]);
2411 if ((0 > v1) || (0 > v2))
2414 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v1) << 2))
2415 | ((uint8_t) (((uint8_t) v2) >> 4)));
2418 if ((-2 != v3) || (-2 != v4))
2420 if (0 != (uint8_t) (((uint8_t) v2) << 4))
2426 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v2) << 4))
2427 | ((uint8_t) (((uint8_t) v3) >> 2)));
2432 if (0 != (uint8_t) (((uint8_t) v3) << 6))
2438 out[j++] = (uint8_t) (((uint8_t) (((uint8_t) v3) << 6))
2442#if MHD_BASE64_FUNC_VERSION >= 2
2443#undef base64_char_to_value_
2451#undef MHD_base64_map_type_
#define mhd_assert(ignore)
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.