/* Computed positions: -k'3,9,$' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
- && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
- && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
- && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
- && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
- && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
- && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
- && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
- && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
- && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
- && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
- && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
- && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
- && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
- && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
- && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
- && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
- && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
- && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
- && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
- && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
- && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
*/
#line 24 "RegisteredHeadersHash.gperf"
class HeaderTableRecord;
-enum
- {
+ enum
+{
TOTAL_KEYWORDS = 88,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 25,
MIN_HASH_VALUE = 5,
MAX_HASH_VALUE = 110
- };
+};
/* maximum key range = 106, duplicates = 0 */
#ifndef GPERF_DOWNCASE
#define GPERF_DOWNCASE 1
static unsigned char gperf_downcase[256] =
- {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
255
- };
+};
#endif
#ifndef GPERF_CASE_MEMCMP
static int
gperf_case_memcmp (const char *s1, const char *s2, size_t n)
{
- for (; n > 0;)
+ for (; n > 0;)
{
- unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
- unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
- if (c1 == c2)
+ unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
+ unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
+ if (c1 == c2)
{
- n--;
- continue;
+ n--;
+ continue;
}
- return (int)c1 - (int)c2;
+ return (int)c1 - (int)c2;
}
- return 0;
+ return 0;
}
#endif
class HttpHeaderHashTable
{
private:
- static inline unsigned int HttpHeaderHash (const char *str, size_t len);
+ static inline unsigned int HttpHeaderHash (const char *str, size_t len);
public:
- static const class HeaderTableRecord *lookup (const char *str, size_t len);
+ static const class HeaderTableRecord *lookup (const char *str, size_t len);
};
inline unsigned int
HttpHeaderHashTable::HttpHeaderHash (const char *str, size_t len)
{
- static const unsigned char asso_values[] =
+ static const unsigned char asso_values[] =
{
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 42, 111, 111, 34, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 42, 111, 111, 34, 111, 111, 111, 111,
9, 111, 111, 1, 111, 111, 111, 111, 21, 111,
- 111, 111, 111, 111, 111, 1, 57, 18, 34, 9,
+ 111, 111, 111, 111, 111, 1, 57, 18, 34, 9,
9, 49, 46, 35, 111, 1, 35, 5, 1, 1,
- 23, 5, 33, 27, 9, 10, 6, 10, 8, 41,
- 111, 111, 111, 111, 111, 111, 111, 1, 57, 18,
- 34, 9, 9, 49, 46, 35, 111, 1, 35, 5,
+ 23, 5, 33, 27, 9, 10, 6, 10, 8, 41,
+ 111, 111, 111, 111, 111, 111, 111, 1, 57, 18,
+ 34, 9, 9, 49, 46, 35, 111, 1, 35, 5,
1, 1, 23, 5, 33, 27, 9, 10, 6, 10,
8, 41, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
+ 111, 111, 111, 111, 111, 111
};
- unsigned int hval = len;
+ unsigned int hval = len;
- switch (hval)
+ switch (hval)
{
- default:
+ default:
hval += asso_values[static_cast<unsigned char>(str[8])];
- /*FALLTHROUGH*/
- case 8:
- case 7:
- case 6:
- case 5:
- case 4:
- case 3:
+ /*FALLTHROUGH*/
+ case 8:
+ case 7:
+ case 6:
+ case 5:
+ case 4:
+ case 3:
hval += asso_values[static_cast<unsigned char>(str[2])];
- /*FALLTHROUGH*/
- case 2:
+ /*FALLTHROUGH*/
+ case 2:
break;
}
- return hval + asso_values[static_cast<unsigned char>(str[len - 1])];
+ return hval + asso_values[static_cast<unsigned char>(str[len - 1])];
}
static const unsigned char lengthtable[] =
- {
- 0, 0, 0, 0, 0, 3, 4, 0, 6, 0, 4, 2, 0, 10,
- 0, 5, 6, 7, 11, 16, 0, 3, 4, 5, 13, 0, 0, 8,
- 9, 10, 19, 12, 8, 6, 10, 10, 25, 18, 6, 7, 4, 7,
- 6, 15, 16, 12, 13, 19, 12, 7, 5, 8, 15, 16, 4, 19,
+{
+ 0, 0, 0, 0, 0, 3, 4, 0, 6, 0, 4, 2, 0, 10,
+ 0, 5, 6, 7, 11, 16, 0, 3, 4, 5, 13, 0, 0, 8,
+ 9, 10, 19, 12, 8, 6, 10, 10, 25, 18, 6, 7, 4, 7,
+ 6, 15, 16, 12, 13, 19, 12, 7, 5, 8, 15, 16, 4, 19,
13, 7, 12, 13, 13, 16, 11, 10, 11, 7, 21, 13, 13, 11,
10, 18, 6, 6, 10, 16, 9, 15, 4, 12, 0, 6, 13, 15,
- 8, 3, 0, 14, 8, 7, 13, 15, 0, 18, 17, 17, 14, 19,
+ 8, 3, 0, 14, 8, 7, 13, 15, 0, 18, 17, 17, 14, 19,
13, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 13, 9
- };
+};
static const class HeaderTableRecord HttpHeaderDefinitionsTable[] =
- {
+{
{""}, {""}, {""}, {""}, {""},
#line 96 "RegisteredHeadersHash.gperf"
{"Via", Http::HdrType::VIA, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader},
{"Last-Modified", Http::HdrType::LAST_MODIFIED, Http::HdrFieldType::ftDate_1123, HdrKind::EntityHeader},
#line 55 "RegisteredHeadersHash.gperf"
{"Forwarded", Http::HdrType::FORWARDED, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader}
- };
+};
const class HeaderTableRecord *
-HttpHeaderHashTable::lookup (const char *str, size_t len)
+ HttpHeaderHashTable::lookup (const char *str, size_t len)
{
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- unsigned int key = HttpHeaderHash (str, len);
+ unsigned int key = HttpHeaderHash (str, len);
- if (key <= MAX_HASH_VALUE)
- if (len == lengthtable[key])
- {
- const char *s = HttpHeaderDefinitionsTable[key].name;
+ if (key <= MAX_HASH_VALUE)
+ if (len == lengthtable[key])
+ {
+ const char *s = HttpHeaderDefinitionsTable[key].name;
- if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
- return &HttpHeaderDefinitionsTable[key];
- }
+ if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
+ return &HttpHeaderDefinitionsTable[key];
+ }
}
- return nullptr;
+ return nullptr;
}
#line 114 "RegisteredHeadersHash.gperf"