1type HeaderName = &'static [u8];
32type HeaderValue = &'static [u8];
33type HeaderValueEncPairs = &'static [(HeaderValue, u64)];
34pub const STATIC_ENCODE_TABLE: &[&[(HeaderName, HeaderValueEncPairs)]] = &[
35 &[],
37 &[],
39 &[],
41 &[(b"age", &[(b"0", 2)])],
43 &[
45 (b"etag", &[(b"", 7)]),
46 (b"date", &[(b"", 6)]),
47 (b"link", &[(b"", 11)]),
48 (b"vary", &[(b"accept-encoding", 59), (b"origin", 60)]),
49 ],
50 &[(b"range", &[(b"bytes=0-", 55)]), (b":path", &[(b"/", 1)])],
52 &[
54 (b"cookie", &[(b"", 5)]),
55 (b"origin", &[(b"", 90)]),
56 (b"server", &[(b"", 92)]),
57 (b"accept", &[(b"*/*", 29), (b"application/dns-message", 30)]),
58 ],
59 &[
61 (b"purpose", &[(b"prefetch", 91)]),
62 (b"referer", &[(b"", 13)]),
63 (b"alt-svc", &[(b"clear", 83)]),
64 (b":status", &[
65 (b"103", 24),
66 (b"200", 25),
67 (b"304", 26),
68 (b"404", 27),
69 (b"503", 28),
70 (b"100", 63),
71 (b"204", 64),
72 (b"206", 65),
73 (b"302", 66),
74 (b"400", 67),
75 (b"403", 68),
76 (b"421", 69),
77 (b"425", 70),
78 (b"500", 71),
79 ]),
80 (b":scheme", &[(b"http", 22), (b"https", 23)]),
81 (b":method", &[
82 (b"CONNECT", 15),
83 (b"DELETE", 16),
84 (b"GET", 17),
85 (b"HEAD", 18),
86 (b"OPTIONS", 19),
87 (b"POST", 20),
88 (b"PUT", 21),
89 ]),
90 ],
91 &[(b"location", &[(b"", 12)]), (b"if-range", &[(b"", 89)])],
93 &[(b"expect-ct", &[(b"", 87)]), (b"forwarded", &[(b"", 88)])],
95 &[
97 (b"user-agent", &[(b"", 95)]),
98 (b":authority", &[(b"", 0)]),
99 (b"set-cookie", &[(b"", 14)]),
100 (b"early-data", &[(b"1", 86)]),
101 ],
102 &[],
104 &[(b"content-type", &[
106 (b"application/dns-message", 44),
107 (b"application/javascript", 45),
108 (b"application/json", 46),
109 (b"application/x-www-form-urlencoded", 47),
110 (b"image/gif", 48),
111 (b"image/jpeg", 49),
112 (b"image/png", 50),
113 (b"text/css", 51),
114 (b"text/html; charset=utf-8", 52),
115 (b"text/plain", 53),
116 (b"text/plain;charset=utf-8", 54),
117 ])],
118 &[
120 (b"last-modified", &[(b"", 10)]),
121 (b"accept-ranges", &[(b"bytes", 32)]),
122 (b"authorization", &[(b"", 84)]),
123 (b"if-none-match", &[(b"", 9)]),
124 (b"cache-control", &[
125 (b"max-age=0", 36),
126 (b"max-age=2592000", 37),
127 (b"max-age=604800", 38),
128 (b"no-cache", 39),
129 (b"no-store", 40),
130 (b"public, max-age=31536000", 41),
131 ]),
132 ],
133 &[(b"content-length", &[(b"0", 4)])],
135 &[
137 (b"accept-encoding", &[(b"gzip, deflate, br", 31)]),
138 (b"x-forwarded-for", &[(b"", 96)]),
139 (b"accept-language", &[(b"", 72)]),
140 (b"x-frame-options", &[(b"deny", 97), (b"sameorigin", 98)]),
141 ],
142 &[
144 (b"content-encoding", &[(b"br", 42), (b"gzip", 43)]),
145 (b"x-xss-protection", &[(b"1; mode=block", 62)]),
146 ],
147 &[(b"if-modified-since", &[(b"", 8)])],
149 &[],
151 &[
153 (b"content-disposition", &[(b"", 3)]),
154 (b"timing-allow-origin", &[(b"*", 93)]),
155 ],
156 &[],
158 &[],
160 &[(b"x-content-type-options", &[(b"nosniff", 61)])],
162 &[(b"content-security-policy", &[(
164 b"script-src 'none'; object-src 'none'; base-uri 'none'",
165 85,
166 )])],
167 &[],
169 &[
171 (b"upgrade-insecure-requests", &[(b"1", 94)]),
172 (b"strict-transport-security", &[
173 (b"max-age=31536000", 56),
174 (b"max-age=31536000; includesubdomains", 57),
175 (b"max-age=31536000; includesubdomains; preload", 58),
176 ]),
177 ],
178 &[],
180 &[(b"access-control-allow-origin", &[(b"*", 35)])],
182 &[
184 (b"access-control-allow-methods", &[
185 (b"get", 76),
186 (b"get, post, options", 77),
187 (b"options", 78),
188 ]),
189 (b"access-control-allow-headers", &[
190 (b"cache-control", 33),
191 (b"content-type", 34),
192 (b"*", 75),
193 ]),
194 ],
195 &[
197 (b"access-control-expose-headers", &[(b"content-length", 79)]),
198 (b"access-control-request-method", &[
199 (b"get", 81),
200 (b"post", 82),
201 ]),
202 ],
203 &[(b"access-control-request-headers", &[(b"content-type", 80)])],
205 &[],
207 &[(b"access-control-allow-credentials", &[
209 (b"FALSE", 73),
210 (b"TRUE", 74),
211 ])],
212];
213
214pub const STATIC_DECODE_TABLE: [(&[u8], &[u8]); 99] = [
215 (b":authority", b""),
216 (b":path", b"/"),
217 (b"age", b"0"),
218 (b"content-disposition", b""),
219 (b"content-length", b"0"),
220 (b"cookie", b""),
221 (b"date", b""),
222 (b"etag", b""),
223 (b"if-modified-since", b""),
224 (b"if-none-match", b""),
225 (b"last-modified", b""),
226 (b"link", b""),
227 (b"location", b""),
228 (b"referer", b""),
229 (b"set-cookie", b""),
230 (b":method", b"CONNECT"),
231 (b":method", b"DELETE"),
232 (b":method", b"GET"),
233 (b":method", b"HEAD"),
234 (b":method", b"OPTIONS"),
235 (b":method", b"POST"),
236 (b":method", b"PUT"),
237 (b":scheme", b"http"),
238 (b":scheme", b"https"),
239 (b":status", b"103"),
240 (b":status", b"200"),
241 (b":status", b"304"),
242 (b":status", b"404"),
243 (b":status", b"503"),
244 (b"accept", b"*/*"),
245 (b"accept", b"application/dns-message"),
246 (b"accept-encoding", b"gzip, deflate, br"),
247 (b"accept-ranges", b"bytes"),
248 (b"access-control-allow-headers", b"cache-control"),
249 (b"access-control-allow-headers", b"content-type"),
250 (b"access-control-allow-origin", b"*"),
251 (b"cache-control", b"max-age=0"),
252 (b"cache-control", b"max-age=2592000"),
253 (b"cache-control", b"max-age=604800"),
254 (b"cache-control", b"no-cache"),
255 (b"cache-control", b"no-store"),
256 (b"cache-control", b"public, max-age=31536000"),
257 (b"content-encoding", b"br"),
258 (b"content-encoding", b"gzip"),
259 (b"content-type", b"application/dns-message"),
260 (b"content-type", b"application/javascript"),
261 (b"content-type", b"application/json"),
262 (b"content-type", b"application/x-www-form-urlencoded"),
263 (b"content-type", b"image/gif"),
264 (b"content-type", b"image/jpeg"),
265 (b"content-type", b"image/png"),
266 (b"content-type", b"text/css"),
267 (b"content-type", b"text/html; charset=utf-8"),
268 (b"content-type", b"text/plain"),
269 (b"content-type", b"text/plain;charset=utf-8"),
270 (b"range", b"bytes=0-"),
271 (b"strict-transport-security", b"max-age=31536000"),
272 (
273 b"strict-transport-security",
274 b"max-age=31536000; includesubdomains",
275 ),
276 (
277 b"strict-transport-security",
278 b"max-age=31536000; includesubdomains; preload",
279 ),
280 (b"vary", b"accept-encoding"),
281 (b"vary", b"origin"),
282 (b"x-content-type-options", b"nosniff"),
283 (b"x-xss-protection", b"1; mode=block"),
284 (b":status", b"100"),
285 (b":status", b"204"),
286 (b":status", b"206"),
287 (b":status", b"302"),
288 (b":status", b"400"),
289 (b":status", b"403"),
290 (b":status", b"421"),
291 (b":status", b"425"),
292 (b":status", b"500"),
293 (b"accept-language", b""),
294 (b"access-control-allow-credentials", b"FALSE"),
295 (b"access-control-allow-credentials", b"TRUE"),
296 (b"access-control-allow-headers", b"*"),
297 (b"access-control-allow-methods", b"get"),
298 (b"access-control-allow-methods", b"get, post, options"),
299 (b"access-control-allow-methods", b"options"),
300 (b"access-control-expose-headers", b"content-length"),
301 (b"access-control-request-headers", b"content-type"),
302 (b"access-control-request-method", b"get"),
303 (b"access-control-request-method", b"post"),
304 (b"alt-svc", b"clear"),
305 (b"authorization", b""),
306 (
307 b"content-security-policy",
308 b"script-src 'none'; object-src 'none'; base-uri 'none'",
309 ),
310 (b"early-data", b"1"),
311 (b"expect-ct", b""),
312 (b"forwarded", b""),
313 (b"if-range", b""),
314 (b"origin", b""),
315 (b"purpose", b"prefetch"),
316 (b"server", b""),
317 (b"timing-allow-origin", b"*"),
318 (b"upgrade-insecure-requests", b"1"),
319 (b"user-agent", b""),
320 (b"x-forwarded-for", b""),
321 (b"x-frame-options", b"deny"),
322 (b"x-frame-options", b"sameorigin"),
323];