RegisteredHeadersHash.cci
Go to the documentation of this file.
1 /* C++ code produced by gperf version 3.1 */
2 /* Command-line: gperf -m 100000 RegisteredHeadersHash.gperf */
3 /* Computed positions: -k'3,9,$' */
4 
5 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28 /* The character set is not based on ISO-646. */
29 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
30 #endif
31 
32 #line 1 "RegisteredHeadersHash.gperf"
33 
34 /* AUTO GENERATED FROM RegisteredHeadersHash.gperf. DO NOT EDIT */
35 
36 /*
37  * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
38  *
39  * Squid software is distributed under GPLv2+ license and includes
40  * contributions from numerous individuals and organizations.
41  * Please see the COPYING and CONTRIBUTORS files for details.
42  */
43 #line 24 "RegisteredHeadersHash.gperf"
44 class HeaderTableRecord;
45  enum
46 {
51  MAX_HASH_VALUE = 109
52 };
53 
54 /* maximum key range = 105, duplicates = 0 */
55 
56 #ifndef GPERF_DOWNCASE
57 #define GPERF_DOWNCASE 1
58 static unsigned char gperf_downcase[256] =
59 {
60  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
61  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
62  30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
63  45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
64  60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
65  107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
66  122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
67  105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
68  120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
69  135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
70  150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
71  165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
72  180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
73  195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
74  210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
75  225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
76  240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
77  255
78 };
79 #endif
80 
81 #ifndef GPERF_CASE_MEMCMP
82 #define GPERF_CASE_MEMCMP 1
83 static int
84 gperf_case_memcmp (const char *s1, const char *s2, size_t n)
85 {
86  for (; n > 0;)
87  {
88  unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
89  unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
90  if (c1 == c2)
91  {
92  n--;
93  continue;
94  }
95  return (int)c1 - (int)c2;
96  }
97  return 0;
98 }
99 #endif
100 
102 {
103 private:
104  static inline unsigned int HttpHeaderHash (const char *str, size_t len);
105 public:
106  static const class HeaderTableRecord *lookup (const char *str, size_t len);
107 };
108 
109 inline unsigned int
110 HttpHeaderHashTable::HttpHeaderHash (const char *str, size_t len)
111 {
112  static const unsigned char asso_values[] =
113  {
114  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
115  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
116  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
117  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
118  110, 110, 0, 110, 110, 13, 110, 110, 110, 110,
119  12, 110, 110, 41, 110, 110, 110, 110, 26, 110,
120  110, 110, 110, 110, 110, 16, 10, 10, 20, 4,
121  10, 47, 50, 62, 110, 0, 38, 30, 1, 2,
122  33, 30, 32, 14, 0, 21, 5, 23, 19, 36,
123  110, 110, 110, 110, 110, 110, 110, 16, 10, 10,
124  20, 4, 10, 47, 50, 62, 110, 0, 38, 30,
125  1, 2, 33, 30, 32, 14, 0, 21, 5, 23,
126  19, 36, 110, 110, 110, 110, 110, 110, 110, 110,
127  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
128  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
129  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
130  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
131  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
132  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
133  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
134  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
135  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
136  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
137  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
138  110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
139  110, 110, 110, 110, 110, 110
140  };
141  unsigned int hval = len;
142 
143  switch (hval)
144  {
145  default:
146  hval += asso_values[static_cast<unsigned char>(str[8])];
147  /* [[fallthrough]] */
148  case 8:
149  case 7:
150  case 6:
151  case 5:
152  case 4:
153  case 3:
154  hval += asso_values[static_cast<unsigned char>(str[2])];
155  /*FALLTHROUGH*/
156  case 2:
157  break;
158  }
159  return hval + asso_values[static_cast<unsigned char>(str[len - 1])];
160 }
161 
162 static const unsigned char lengthtable[] =
163 {
164  0, 0, 0, 0, 0, 4, 2, 0, 4, 5, 5, 3, 6, 0,
165  10, 10, 6, 12, 4, 8, 16, 7, 19, 10, 18, 8, 6, 12,
166  14, 25, 13, 19, 0, 9, 15, 3, 4, 10, 6, 6, 0, 19,
167  8, 11, 7, 15, 10, 16, 13, 7, 13, 15, 12, 13, 7, 7,
168  16, 12, 7, 16, 18, 12, 13, 13, 9, 21, 5, 4, 16, 6,
169  6, 8, 4, 15, 14, 3, 10, 15, 10, 13, 11, 9, 6, 11,
170  0, 11, 7, 0, 0, 0, 13, 17, 20, 17, 0, 0, 17, 0,
171  19, 0, 0, 0, 18, 14, 0, 0, 13, 13, 0, 13
172 };
173 
174 static const class HeaderTableRecord HttpHeaderDefinitionsTable[] =
175 {
176  {""}, {""}, {""}, {""}, {""},
177 #line 67 "RegisteredHeadersHash.gperf"
178  {"Link", Http::HdrType::LINK, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::EntityHeader},
179 #line 87 "RegisteredHeadersHash.gperf"
180  {"TE", Http::HdrType::TE, Http::HdrFieldType::ftStr, HdrKind::RequestHeader|HdrKind::HopByHopHeader},
181  {""},
182 #line 51 "RegisteredHeadersHash.gperf"
183  {"Date", Http::HdrType::DATE, Http::HdrFieldType::ftDate_1123, HdrKind::GeneralHeader},
184 #line 88 "RegisteredHeadersHash.gperf"
185  {"Title", Http::HdrType::TITLE, Http::HdrFieldType::ftStr, HdrKind::None},
186 #line 80 "RegisteredHeadersHash.gperf"
187  {"Range", Http::HdrType::RANGE, Http::HdrFieldType::ftPRange, HdrKind::RequestHeader},
188 #line 31 "RegisteredHeadersHash.gperf"
189  {"Age", Http::HdrType::AGE, Http::HdrFieldType::ftInt, HdrKind::ReplyHeader},
190 #line 49 "RegisteredHeadersHash.gperf"
191  {"Cookie", Http::HdrType::COOKIE, Http::HdrFieldType::ftStr, HdrKind::None},
192  {""},
193 #line 39 "RegisteredHeadersHash.gperf"
195 #line 94 "RegisteredHeadersHash.gperf"
196  {"User-Agent", Http::HdrType::USER_AGENT, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
197 #line 26 "RegisteredHeadersHash.gperf"
198  {"Accept", Http::HdrType::ACCEPT, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
199 #line 48 "RegisteredHeadersHash.gperf"
200  {"Content-Type", Http::HdrType::CONTENT_TYPE, Http::HdrFieldType::ftStr, HdrKind::EntityHeader},
201 #line 57 "RegisteredHeadersHash.gperf"
202  {"Host", Http::HdrType::HOST, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
203 #line 68 "RegisteredHeadersHash.gperf"
204  {"Location", Http::HdrType::LOCATION, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
205 #line 77 "RegisteredHeadersHash.gperf"
207 #line 50 "RegisteredHeadersHash.gperf"
208  {"Cookie2", Http::HdrType::COOKIE2, Http::HdrFieldType::ftStr, HdrKind::None},
209 #line 76 "RegisteredHeadersHash.gperf"
210  {"Proxy-Authorization", Http::HdrType::PROXY_AUTHORIZATION, Http::HdrFieldType::ftStr, HdrKind::RequestHeader|HdrKind::HopByHopHeader},
211 #line 64 "RegisteredHeadersHash.gperf"
212  {"Keep-Alive", Http::HdrType::KEEP_ALIVE, Http::HdrFieldType::ftStr, HdrKind::HopByHopHeader},
213 #line 74 "RegisteredHeadersHash.gperf"
214  {"Proxy-Authenticate", Http::HdrType::PROXY_AUTHENTICATE, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
215 #line 62 "RegisteredHeadersHash.gperf"
217 #line 79 "RegisteredHeadersHash.gperf"
218  {"Public", Http::HdrType::PUBLIC, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
219 #line 40 "RegisteredHeadersHash.gperf"
220  {"Content-Base", Http::HdrType::CONTENT_BASE, Http::HdrFieldType::ftStr, HdrKind::EntityHeader},
221 #line 58 "RegisteredHeadersHash.gperf"
222  {"HTTP2-Settings", Http::HdrType::HTTP2_SETTINGS, Http::HdrFieldType::ftStr, HdrKind::RequestHeader|HdrKind::HopByHopHeader},
223 #line 75 "RegisteredHeadersHash.gperf"
224  {"Proxy-Authentication-Info", Http::HdrType::PROXY_AUTHENTICATION_INFO, Http::HdrFieldType::ftStr, HdrKind::ListHeader},
225 #line 35 "RegisteredHeadersHash.gperf"
226  {"Authorization", Http::HdrType::AUTHORIZATION, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
227 #line 34 "RegisteredHeadersHash.gperf"
228  {"Authentication-Info", Http::HdrType::AUTHENTICATION_INFO, Http::HdrFieldType::ftStr, HdrKind::ListHeader},
229  {""},
230 #line 91 "RegisteredHeadersHash.gperf"
231  {"Translate", Http::HdrType::TRANSLATE, Http::HdrFieldType::ftStr, HdrKind::None},
232 #line 103 "RegisteredHeadersHash.gperf"
233  {"X-Next-Services", Http::HdrType::X_NEXT_SERVICES, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
234 #line 96 "RegisteredHeadersHash.gperf"
235  {"Via", Http::HdrType::VIA, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader},
236 #line 56 "RegisteredHeadersHash.gperf"
237  {"From", Http::HdrType::FROM, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
238 #line 113 "RegisteredHeadersHash.gperf"
239  {"*INVALID*:", Http::HdrType::BAD_HDR, Http::HdrFieldType::ftInvalid, HdrKind::None},
240 #line 73 "RegisteredHeadersHash.gperf"
241  {"Pragma", Http::HdrType::PRAGMA, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader},
242 #line 53 "RegisteredHeadersHash.gperf"
243  {"Expect", Http::HdrType::EXPECT, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
244  {""},
245 #line 41 "RegisteredHeadersHash.gperf"
246  {"Content-Disposition", Http::HdrType::CONTENT_DISPOSITION, Http::HdrFieldType::ftStr, HdrKind::None},
247 #line 38 "RegisteredHeadersHash.gperf"
248  {"CDN-Loop", Http::HdrType::CDN_LOOP, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
249 #line 83 "RegisteredHeadersHash.gperf"
250  {"Retry-After", Http::HdrType::RETRY_AFTER, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
251 #line 109 "RegisteredHeadersHash.gperf"
252  {"FTP-Pre", Http::HdrType::FTP_PRE, Http::HdrFieldType::ftStr, HdrKind::None},
253 #line 29 "RegisteredHeadersHash.gperf"
254  {"Accept-Language", Http::HdrType::ACCEPT_LANGUAGE, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
255 #line 111 "RegisteredHeadersHash.gperf"
256  {"FTP-Reason", Http::HdrType::FTP_REASON, Http::HdrFieldType::ftStr, HdrKind::None},
257 #line 98 "RegisteredHeadersHash.gperf"
258  {"WWW-Authenticate", Http::HdrType::WWW_AUTHENTICATE, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
259 #line 78 "RegisteredHeadersHash.gperf"
260  {"Proxy-support", Http::HdrType::PROXY_SUPPORT, Http::HdrFieldType::ftStr, HdrKind::ListHeader},
261 #line 81 "RegisteredHeadersHash.gperf"
262  {"Referer", Http::HdrType::REFERER, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
263 #line 47 "RegisteredHeadersHash.gperf"
264  {"Content-Range", Http::HdrType::CONTENT_RANGE, Http::HdrFieldType::ftPContRange, HdrKind::EntityHeader},
265 #line 106 "RegisteredHeadersHash.gperf"
266  {"Front-End-Https", Http::HdrType::FRONT_END_HTTPS, Http::HdrFieldType::ftStr, HdrKind::None},
267 #line 37 "RegisteredHeadersHash.gperf"
268  {"Cache-Status", Http::HdrType::CACHE_STATUS, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
269 #line 30 "RegisteredHeadersHash.gperf"
270  {"Accept-Ranges", Http::HdrType::ACCEPT_RANGES, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
271 #line 54 "RegisteredHeadersHash.gperf"
272  {"Expires", Http::HdrType::EXPIRES, Http::HdrFieldType::ftDate_1123, HdrKind::EntityHeader},
273 #line 89 "RegisteredHeadersHash.gperf"
274  {"Trailer", Http::HdrType::TRAILER, Http::HdrFieldType::ftStr, HdrKind::HopByHopHeader},
275 #line 45 "RegisteredHeadersHash.gperf"
276  {"Content-Location", Http::HdrType::CONTENT_LOCATION, Http::HdrFieldType::ftStr, HdrKind::EntityHeader},
277 #line 70 "RegisteredHeadersHash.gperf"
278  {"Mime-Version", Http::HdrType::MIME_VERSION, Http::HdrFieldType::ftStr, HdrKind::GeneralHeader},
279 #line 93 "RegisteredHeadersHash.gperf"
281 #line 43 "RegisteredHeadersHash.gperf"
282  {"Content-Language", Http::HdrType::CONTENT_LANGUAGE, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::EntityHeader},
283 #line 33 "RegisteredHeadersHash.gperf"
284  {"Alternate-Protocol", Http::HdrType::ALTERNATE_PROTOCOL, Http::HdrFieldType::ftStr, HdrKind::HopByHopHeader},
285 #line 69 "RegisteredHeadersHash.gperf"
286  {"Max-Forwards", Http::HdrType::MAX_FORWARDS, Http::HdrFieldType::ftInt64, HdrKind::RequestHeader},
287 #line 36 "RegisteredHeadersHash.gperf"
288  {"Cache-Control", Http::HdrType::CACHE_CONTROL, Http::HdrFieldType::ftPCc, HdrKind::ListHeader|HdrKind::GeneralHeader},
289 #line 101 "RegisteredHeadersHash.gperf"
290  {"X-Squid-Error", Http::HdrType::X_SQUID_ERROR, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
291 #line 71 "RegisteredHeadersHash.gperf"
292  {"Negotiate", Http::HdrType::NEGOTIATE, Http::HdrFieldType::ftStr, HdrKind::None},
293 #line 92 "RegisteredHeadersHash.gperf"
294  {"Unless-Modified-Since", Http::HdrType::UNLESS_MODIFIED_SINCE, Http::HdrFieldType::ftStr, HdrKind::None},
295 #line 32 "RegisteredHeadersHash.gperf"
296  {"Allow", Http::HdrType::ALLOW, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::EntityHeader},
297 #line 52 "RegisteredHeadersHash.gperf"
298  {"ETag", Http::HdrType::ETAG, Http::HdrFieldType::ftETag, HdrKind::EntityHeader},
299 #line 42 "RegisteredHeadersHash.gperf"
300  {"Content-Encoding", Http::HdrType::CONTENT_ENCODING, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::EntityHeader},
301 #line 72 "RegisteredHeadersHash.gperf"
302  {"Origin", Http::HdrType::ORIGIN, Http::HdrFieldType::ftStr, HdrKind::RequestHeader},
303 #line 84 "RegisteredHeadersHash.gperf"
304  {"Server", Http::HdrType::SERVER, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
305 #line 59 "RegisteredHeadersHash.gperf"
306  {"If-Match", Http::HdrType::IF_MATCH, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
307 #line 95 "RegisteredHeadersHash.gperf"
308  {"Vary", Http::HdrType::VARY, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
309 #line 28 "RegisteredHeadersHash.gperf"
311 #line 27 "RegisteredHeadersHash.gperf"
312  {"Accept-Charset", Http::HdrType::ACCEPT_CHARSET, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
313 #line 65 "RegisteredHeadersHash.gperf"
314  {"Key", Http::HdrType::KEY, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
315 #line 85 "RegisteredHeadersHash.gperf"
316  {"Set-Cookie", Http::HdrType::SET_COOKIE, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
317 #line 99 "RegisteredHeadersHash.gperf"
318  {"X-Forwarded-For", Http::HdrType::X_FORWARDED_FOR, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader},
319 #line 110 "RegisteredHeadersHash.gperf"
320  {"FTP-Status", Http::HdrType::FTP_STATUS, Http::HdrFieldType::ftInt, HdrKind::None},
321 #line 82 "RegisteredHeadersHash.gperf"
322  {"Request-Range", Http::HdrType::REQUEST_RANGE, Http::HdrFieldType::ftPRange, HdrKind::None},
323 #line 107 "RegisteredHeadersHash.gperf"
324  {"FTP-Command", Http::HdrType::FTP_COMMAND, Http::HdrFieldType::ftStr, HdrKind::None},
325 #line 55 "RegisteredHeadersHash.gperf"
326  {"Forwarded", Http::HdrType::FORWARDED, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::GeneralHeader},
327 #line 112 "RegisteredHeadersHash.gperf"
328  {"Other:", Http::HdrType::OTHER, Http::HdrFieldType::ftStr, HdrKind::EntityHeader},
329 #line 46 "RegisteredHeadersHash.gperf"
330  {"Content-MD5", Http::HdrType::CONTENT_MD5, Http::HdrFieldType::ftStr, HdrKind::EntityHeader},
331  {""},
332 #line 86 "RegisteredHeadersHash.gperf"
333  {"Set-Cookie2", Http::HdrType::SET_COOKIE2, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
334 #line 97 "RegisteredHeadersHash.gperf"
335  {"Warning", Http::HdrType::WARNING, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
336  {""}, {""}, {""},
337 #line 108 "RegisteredHeadersHash.gperf"
338  {"FTP-Arguments", Http::HdrType::FTP_ARGUMENTS, Http::HdrFieldType::ftStr, HdrKind::None},
339 #line 105 "RegisteredHeadersHash.gperf"
340  {"Surrogate-Control", Http::HdrType::SURROGATE_CONTROL, Http::HdrFieldType::ftPSc, HdrKind::ListHeader|HdrKind::ReplyHeader},
341 #line 104 "RegisteredHeadersHash.gperf"
342  {"Surrogate-Capability", Http::HdrType::SURROGATE_CAPABILITY, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader},
343 #line 90 "RegisteredHeadersHash.gperf"
345  {""}, {""},
346 #line 60 "RegisteredHeadersHash.gperf"
347  {"If-Modified-Since", Http::HdrType::IF_MODIFIED_SINCE, Http::HdrFieldType::ftDate_1123, HdrKind::RequestHeader},
348  {""},
349 #line 63 "RegisteredHeadersHash.gperf"
350  {"If-Unmodified-Since", Http::HdrType::IF_UNMODIFIED_SINCE, Http::HdrFieldType::ftDate_1123, HdrKind::None},
351  {""}, {""}, {""},
352 #line 102 "RegisteredHeadersHash.gperf"
353  {"X-Accelerator-Vary", Http::HdrType::HDR_X_ACCELERATOR_VARY, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::ReplyHeader},
354 #line 44 "RegisteredHeadersHash.gperf"
355  {"Content-Length", Http::HdrType::CONTENT_LENGTH, Http::HdrFieldType::ftInt64, HdrKind::EntityHeader},
356  {""}, {""},
357 #line 61 "RegisteredHeadersHash.gperf"
358  {"If-None-Match", Http::HdrType::IF_NONE_MATCH, Http::HdrFieldType::ftStr, HdrKind::ListHeader},
359 #line 100 "RegisteredHeadersHash.gperf"
360  {"X-Request-URI", Http::HdrType::X_REQUEST_URI, Http::HdrFieldType::ftStr, HdrKind::ReplyHeader},
361  {""},
362 #line 66 "RegisteredHeadersHash.gperf"
363  {"Last-Modified", Http::HdrType::LAST_MODIFIED, Http::HdrFieldType::ftDate_1123, HdrKind::EntityHeader}
364 };
365 
366 const class HeaderTableRecord *
367  HttpHeaderHashTable::lookup (const char *str, size_t len)
368 {
369  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
370  {
371  unsigned int key = HttpHeaderHash (str, len);
372 
373  if (key <= MAX_HASH_VALUE)
374  if (len == lengthtable[key])
375  {
376  const char *s = HttpHeaderDefinitionsTable[key].name;
377 
378  if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
379  return &HttpHeaderDefinitionsTable[key];
380  }
381  }
382  return 0;
383 }
384 #line 114 "RegisteredHeadersHash.gperf"
385 
@ MAX_WORD_LENGTH
@ SURROGATE_CONTROL
@ HDR_X_ACCELERATOR_VARY
@ s1
Definition: cf_gen.cc:55
@ PROXY_CONNECTION
@ HTTP2_SETTINGS
@ CONTENT_ENCODING
@ CONTENT_LANGUAGE
@ MIN_HASH_VALUE
@ AUTHENTICATION_INFO
@ IF_MODIFIED_SINCE
@ CONTENT_LENGTH
@ WWW_AUTHENTICATE
@ MAX_HASH_VALUE
@ ACCEPT_LANGUAGE
@ CONTENT_LOCATION
@ IF_UNMODIFIED_SINCE
@ TRANSFER_ENCODING
@ MIN_WORD_LENGTH
static unsigned int HttpHeaderHash(const char *str, size_t len)
@ ACCEPT_ENCODING
@ PROXY_AUTHENTICATE
static int gperf_case_memcmp(const char *s1, const char *s2, size_t n)
@ CONTENT_DISPOSITION
static const unsigned char lengthtable[]
@ PROXY_AUTHENTICATION_INFO
@ SURROGATE_CAPABILITY
static unsigned char gperf_downcase[256]
@ ALTERNATE_PROTOCOL
static const class HeaderTableRecord HttpHeaderDefinitionsTable[]
@ UNLESS_MODIFIED_SINCE
#define TRANSLATE(d)
Definition: GnuRegex.c:771
@ ACCEPT_CHARSET
int unsigned int
Definition: stub_fd.cc:19
@ TOTAL_KEYWORDS
static const class HeaderTableRecord * lookup(const char *str, size_t len)
@ PROXY_AUTHORIZATION

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors