/src/libgit2/deps/llhttp/llhttp.c
Line | Count | Source (jump to first uncovered line) |
1 | | #include <stdlib.h> |
2 | | #include <stdint.h> |
3 | | #include <string.h> |
4 | | |
5 | | #ifdef __SSE4_2__ |
6 | | #ifdef _MSC_VER |
7 | | #include <nmmintrin.h> |
8 | | #else /* !_MSC_VER */ |
9 | | #include <x86intrin.h> |
10 | | #endif /* _MSC_VER */ |
11 | | #endif /* __SSE4_2__ */ |
12 | | |
13 | | #ifdef _MSC_VER |
14 | | #define ALIGN(n) _declspec(align(n)) |
15 | | #else /* !_MSC_VER */ |
16 | | #define ALIGN(n) __attribute__((aligned(n))) |
17 | | #endif /* _MSC_VER */ |
18 | | |
19 | | #include "llhttp.h" |
20 | | |
21 | | typedef int (*llhttp__internal__span_cb)( |
22 | | llhttp__internal_t*, const char*, const char*); |
23 | | |
24 | | static const unsigned char llparse_blob0[] = { |
25 | | 'o', 'n' |
26 | | }; |
27 | | static const unsigned char llparse_blob1[] = { |
28 | | 'e', 'c', 't', 'i', 'o', 'n' |
29 | | }; |
30 | | static const unsigned char llparse_blob2[] = { |
31 | | 'l', 'o', 's', 'e' |
32 | | }; |
33 | | static const unsigned char llparse_blob3[] = { |
34 | | 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e' |
35 | | }; |
36 | | static const unsigned char llparse_blob4[] = { |
37 | | 'p', 'g', 'r', 'a', 'd', 'e' |
38 | | }; |
39 | | static const unsigned char llparse_blob5[] = { |
40 | | 'c', 'h', 'u', 'n', 'k', 'e', 'd' |
41 | | }; |
42 | | #ifdef __SSE4_2__ |
43 | | static const unsigned char ALIGN(16) llparse_blob6[] = { |
44 | | 0x9, 0x9, ' ', '~', 0x80, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, |
45 | | 0x0, 0x0, 0x0, 0x0, 0x0 |
46 | | }; |
47 | | #endif /* __SSE4_2__ */ |
48 | | #ifdef __SSE4_2__ |
49 | | static const unsigned char ALIGN(16) llparse_blob7[] = { |
50 | | '!', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A', |
51 | | 'Z', '^', 'z', '|', '|' |
52 | | }; |
53 | | #endif /* __SSE4_2__ */ |
54 | | #ifdef __SSE4_2__ |
55 | | static const unsigned char ALIGN(16) llparse_blob8[] = { |
56 | | '~', '~', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, |
57 | | 0x0, 0x0, 0x0, 0x0, 0x0 |
58 | | }; |
59 | | #endif /* __SSE4_2__ */ |
60 | | static const unsigned char llparse_blob9[] = { |
61 | | 'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h' |
62 | | }; |
63 | | static const unsigned char llparse_blob10[] = { |
64 | | 'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c', |
65 | | 't', 'i', 'o', 'n' |
66 | | }; |
67 | | static const unsigned char llparse_blob11[] = { |
68 | | 'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c', |
69 | | 'o', 'd', 'i', 'n', 'g' |
70 | | }; |
71 | | static const unsigned char llparse_blob12[] = { |
72 | | 'p', 'g', 'r', 'a', 'd', 'e' |
73 | | }; |
74 | | static const unsigned char llparse_blob13[] = { |
75 | | 'T', 'T', 'P', '/' |
76 | | }; |
77 | | static const unsigned char llparse_blob14[] = { |
78 | | 0xd, 0xa, 0xd, 0xa, 'S', 'M', 0xd, 0xa, 0xd, 0xa |
79 | | }; |
80 | | static const unsigned char llparse_blob15[] = { |
81 | | 'C', 'E', '/' |
82 | | }; |
83 | | static const unsigned char llparse_blob16[] = { |
84 | | 'T', 'S', 'P', '/' |
85 | | }; |
86 | | static const unsigned char llparse_blob17[] = { |
87 | | 'N', 'O', 'U', 'N', 'C', 'E' |
88 | | }; |
89 | | static const unsigned char llparse_blob18[] = { |
90 | | 'I', 'N', 'D' |
91 | | }; |
92 | | static const unsigned char llparse_blob19[] = { |
93 | | 'E', 'C', 'K', 'O', 'U', 'T' |
94 | | }; |
95 | | static const unsigned char llparse_blob20[] = { |
96 | | 'N', 'E', 'C', 'T' |
97 | | }; |
98 | | static const unsigned char llparse_blob21[] = { |
99 | | 'E', 'T', 'E' |
100 | | }; |
101 | | static const unsigned char llparse_blob22[] = { |
102 | | 'C', 'R', 'I', 'B', 'E' |
103 | | }; |
104 | | static const unsigned char llparse_blob23[] = { |
105 | | 'L', 'U', 'S', 'H' |
106 | | }; |
107 | | static const unsigned char llparse_blob24[] = { |
108 | | 'E', 'T' |
109 | | }; |
110 | | static const unsigned char llparse_blob25[] = { |
111 | | 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' |
112 | | }; |
113 | | static const unsigned char llparse_blob26[] = { |
114 | | 'E', 'A', 'D' |
115 | | }; |
116 | | static const unsigned char llparse_blob27[] = { |
117 | | 'N', 'K' |
118 | | }; |
119 | | static const unsigned char llparse_blob28[] = { |
120 | | 'C', 'K' |
121 | | }; |
122 | | static const unsigned char llparse_blob29[] = { |
123 | | 'S', 'E', 'A', 'R', 'C', 'H' |
124 | | }; |
125 | | static const unsigned char llparse_blob30[] = { |
126 | | 'R', 'G', 'E' |
127 | | }; |
128 | | static const unsigned char llparse_blob31[] = { |
129 | | 'C', 'T', 'I', 'V', 'I', 'T', 'Y' |
130 | | }; |
131 | | static const unsigned char llparse_blob32[] = { |
132 | | 'L', 'E', 'N', 'D', 'A', 'R' |
133 | | }; |
134 | | static const unsigned char llparse_blob33[] = { |
135 | | 'V', 'E' |
136 | | }; |
137 | | static const unsigned char llparse_blob34[] = { |
138 | | 'O', 'T', 'I', 'F', 'Y' |
139 | | }; |
140 | | static const unsigned char llparse_blob35[] = { |
141 | | 'P', 'T', 'I', 'O', 'N', 'S' |
142 | | }; |
143 | | static const unsigned char llparse_blob36[] = { |
144 | | 'C', 'H' |
145 | | }; |
146 | | static const unsigned char llparse_blob37[] = { |
147 | | 'S', 'E' |
148 | | }; |
149 | | static const unsigned char llparse_blob38[] = { |
150 | | 'A', 'Y' |
151 | | }; |
152 | | static const unsigned char llparse_blob39[] = { |
153 | | 'S', 'T' |
154 | | }; |
155 | | static const unsigned char llparse_blob40[] = { |
156 | | 'I', 'N', 'D' |
157 | | }; |
158 | | static const unsigned char llparse_blob41[] = { |
159 | | 'A', 'T', 'C', 'H' |
160 | | }; |
161 | | static const unsigned char llparse_blob42[] = { |
162 | | 'G', 'E' |
163 | | }; |
164 | | static const unsigned char llparse_blob43[] = { |
165 | | 'U', 'E', 'R', 'Y' |
166 | | }; |
167 | | static const unsigned char llparse_blob44[] = { |
168 | | 'I', 'N', 'D' |
169 | | }; |
170 | | static const unsigned char llparse_blob45[] = { |
171 | | 'O', 'R', 'D' |
172 | | }; |
173 | | static const unsigned char llparse_blob46[] = { |
174 | | 'I', 'R', 'E', 'C', 'T' |
175 | | }; |
176 | | static const unsigned char llparse_blob47[] = { |
177 | | 'O', 'R', 'T' |
178 | | }; |
179 | | static const unsigned char llparse_blob48[] = { |
180 | | 'R', 'C', 'H' |
181 | | }; |
182 | | static const unsigned char llparse_blob49[] = { |
183 | | 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' |
184 | | }; |
185 | | static const unsigned char llparse_blob50[] = { |
186 | | 'U', 'R', 'C', 'E' |
187 | | }; |
188 | | static const unsigned char llparse_blob51[] = { |
189 | | 'B', 'S', 'C', 'R', 'I', 'B', 'E' |
190 | | }; |
191 | | static const unsigned char llparse_blob52[] = { |
192 | | 'A', 'R', 'D', 'O', 'W', 'N' |
193 | | }; |
194 | | static const unsigned char llparse_blob53[] = { |
195 | | 'A', 'C', 'E' |
196 | | }; |
197 | | static const unsigned char llparse_blob54[] = { |
198 | | 'I', 'N', 'D' |
199 | | }; |
200 | | static const unsigned char llparse_blob55[] = { |
201 | | 'N', 'K' |
202 | | }; |
203 | | static const unsigned char llparse_blob56[] = { |
204 | | 'C', 'K' |
205 | | }; |
206 | | static const unsigned char llparse_blob57[] = { |
207 | | 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E' |
208 | | }; |
209 | | static const unsigned char llparse_blob58[] = { |
210 | | 'H', 'T', 'T', 'P', '/' |
211 | | }; |
212 | | static const unsigned char llparse_blob59[] = { |
213 | | 'A', 'D' |
214 | | }; |
215 | | static const unsigned char llparse_blob60[] = { |
216 | | 'T', 'P', '/' |
217 | | }; |
218 | | |
219 | | enum llparse_match_status_e { |
220 | | kMatchComplete, |
221 | | kMatchPause, |
222 | | kMatchMismatch |
223 | | }; |
224 | | typedef enum llparse_match_status_e llparse_match_status_t; |
225 | | |
226 | | struct llparse_match_s { |
227 | | llparse_match_status_t status; |
228 | | const unsigned char* current; |
229 | | }; |
230 | | typedef struct llparse_match_s llparse_match_t; |
231 | | |
232 | | static llparse_match_t llparse__match_sequence_to_lower( |
233 | | llhttp__internal_t* s, const unsigned char* p, |
234 | | const unsigned char* endp, |
235 | 0 | const unsigned char* seq, uint32_t seq_len) { |
236 | 0 | uint32_t index; |
237 | 0 | llparse_match_t res; |
238 | |
|
239 | 0 | index = s->_index; |
240 | 0 | for (; p != endp; p++) { |
241 | 0 | unsigned char current; |
242 | |
|
243 | 0 | current = ((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p)); |
244 | 0 | if (current == seq[index]) { |
245 | 0 | if (++index == seq_len) { |
246 | 0 | res.status = kMatchComplete; |
247 | 0 | goto reset; |
248 | 0 | } |
249 | 0 | } else { |
250 | 0 | res.status = kMatchMismatch; |
251 | 0 | goto reset; |
252 | 0 | } |
253 | 0 | } |
254 | 0 | s->_index = index; |
255 | 0 | res.status = kMatchPause; |
256 | 0 | res.current = p; |
257 | 0 | return res; |
258 | 0 | reset: |
259 | 0 | s->_index = 0; |
260 | 0 | res.current = p; |
261 | 0 | return res; |
262 | 0 | } |
263 | | |
264 | | static llparse_match_t llparse__match_sequence_to_lower_unsafe( |
265 | | llhttp__internal_t* s, const unsigned char* p, |
266 | | const unsigned char* endp, |
267 | 0 | const unsigned char* seq, uint32_t seq_len) { |
268 | 0 | uint32_t index; |
269 | 0 | llparse_match_t res; |
270 | |
|
271 | 0 | index = s->_index; |
272 | 0 | for (; p != endp; p++) { |
273 | 0 | unsigned char current; |
274 | |
|
275 | 0 | current = ((*p) | 0x20); |
276 | 0 | if (current == seq[index]) { |
277 | 0 | if (++index == seq_len) { |
278 | 0 | res.status = kMatchComplete; |
279 | 0 | goto reset; |
280 | 0 | } |
281 | 0 | } else { |
282 | 0 | res.status = kMatchMismatch; |
283 | 0 | goto reset; |
284 | 0 | } |
285 | 0 | } |
286 | 0 | s->_index = index; |
287 | 0 | res.status = kMatchPause; |
288 | 0 | res.current = p; |
289 | 0 | return res; |
290 | 0 | reset: |
291 | 0 | s->_index = 0; |
292 | 0 | res.current = p; |
293 | 0 | return res; |
294 | 0 | } |
295 | | |
296 | | static llparse_match_t llparse__match_sequence_id( |
297 | | llhttp__internal_t* s, const unsigned char* p, |
298 | | const unsigned char* endp, |
299 | 0 | const unsigned char* seq, uint32_t seq_len) { |
300 | 0 | uint32_t index; |
301 | 0 | llparse_match_t res; |
302 | |
|
303 | 0 | index = s->_index; |
304 | 0 | for (; p != endp; p++) { |
305 | 0 | unsigned char current; |
306 | |
|
307 | 0 | current = *p; |
308 | 0 | if (current == seq[index]) { |
309 | 0 | if (++index == seq_len) { |
310 | 0 | res.status = kMatchComplete; |
311 | 0 | goto reset; |
312 | 0 | } |
313 | 0 | } else { |
314 | 0 | res.status = kMatchMismatch; |
315 | 0 | goto reset; |
316 | 0 | } |
317 | 0 | } |
318 | 0 | s->_index = index; |
319 | 0 | res.status = kMatchPause; |
320 | 0 | res.current = p; |
321 | 0 | return res; |
322 | 0 | reset: |
323 | 0 | s->_index = 0; |
324 | 0 | res.current = p; |
325 | 0 | return res; |
326 | 0 | } |
327 | | |
328 | | enum llparse_state_e { |
329 | | s_error, |
330 | | s_n_llhttp__internal__n_closed, |
331 | | s_n_llhttp__internal__n_invoke_llhttp__after_message_complete, |
332 | | s_n_llhttp__internal__n_pause_1, |
333 | | s_n_llhttp__internal__n_invoke_is_equal_upgrade, |
334 | | s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2, |
335 | | s_n_llhttp__internal__n_chunk_data_almost_done_1, |
336 | | s_n_llhttp__internal__n_chunk_data_almost_done, |
337 | | s_n_llhttp__internal__n_consume_content_length, |
338 | | s_n_llhttp__internal__n_span_start_llhttp__on_body, |
339 | | s_n_llhttp__internal__n_invoke_is_equal_content_length, |
340 | | s_n_llhttp__internal__n_chunk_size_almost_done, |
341 | | s_n_llhttp__internal__n_invoke_test_lenient_flags_9, |
342 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete, |
343 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1, |
344 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2, |
345 | | s_n_llhttp__internal__n_invoke_test_lenient_flags_10, |
346 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete, |
347 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1, |
348 | | s_n_llhttp__internal__n_chunk_extension_quoted_value_done, |
349 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2, |
350 | | s_n_llhttp__internal__n_error_30, |
351 | | s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair, |
352 | | s_n_llhttp__internal__n_error_31, |
353 | | s_n_llhttp__internal__n_chunk_extension_quoted_value, |
354 | | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3, |
355 | | s_n_llhttp__internal__n_error_33, |
356 | | s_n_llhttp__internal__n_chunk_extension_value, |
357 | | s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value, |
358 | | s_n_llhttp__internal__n_error_34, |
359 | | s_n_llhttp__internal__n_chunk_extension_name, |
360 | | s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name, |
361 | | s_n_llhttp__internal__n_chunk_extensions, |
362 | | s_n_llhttp__internal__n_chunk_size_otherwise, |
363 | | s_n_llhttp__internal__n_chunk_size, |
364 | | s_n_llhttp__internal__n_chunk_size_digit, |
365 | | s_n_llhttp__internal__n_invoke_update_content_length_1, |
366 | | s_n_llhttp__internal__n_consume_content_length_1, |
367 | | s_n_llhttp__internal__n_span_start_llhttp__on_body_1, |
368 | | s_n_llhttp__internal__n_eof, |
369 | | s_n_llhttp__internal__n_span_start_llhttp__on_body_2, |
370 | | s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete, |
371 | | s_n_llhttp__internal__n_error_5, |
372 | | s_n_llhttp__internal__n_headers_almost_done, |
373 | | s_n_llhttp__internal__n_header_field_colon_discard_ws, |
374 | | s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete, |
375 | | s_n_llhttp__internal__n_span_start_llhttp__on_header_value, |
376 | | s_n_llhttp__internal__n_header_value_discard_lws, |
377 | | s_n_llhttp__internal__n_header_value_discard_ws_almost_done, |
378 | | s_n_llhttp__internal__n_header_value_lws, |
379 | | s_n_llhttp__internal__n_header_value_almost_done, |
380 | | s_n_llhttp__internal__n_invoke_test_lenient_flags_17, |
381 | | s_n_llhttp__internal__n_header_value_lenient, |
382 | | s_n_llhttp__internal__n_error_54, |
383 | | s_n_llhttp__internal__n_header_value_otherwise, |
384 | | s_n_llhttp__internal__n_header_value_connection_token, |
385 | | s_n_llhttp__internal__n_header_value_connection_ws, |
386 | | s_n_llhttp__internal__n_header_value_connection_1, |
387 | | s_n_llhttp__internal__n_header_value_connection_2, |
388 | | s_n_llhttp__internal__n_header_value_connection_3, |
389 | | s_n_llhttp__internal__n_header_value_connection, |
390 | | s_n_llhttp__internal__n_error_56, |
391 | | s_n_llhttp__internal__n_error_57, |
392 | | s_n_llhttp__internal__n_header_value_content_length_ws, |
393 | | s_n_llhttp__internal__n_header_value_content_length, |
394 | | s_n_llhttp__internal__n_error_59, |
395 | | s_n_llhttp__internal__n_error_58, |
396 | | s_n_llhttp__internal__n_header_value_te_token_ows, |
397 | | s_n_llhttp__internal__n_header_value, |
398 | | s_n_llhttp__internal__n_header_value_te_token, |
399 | | s_n_llhttp__internal__n_header_value_te_chunked_last, |
400 | | s_n_llhttp__internal__n_header_value_te_chunked, |
401 | | s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1, |
402 | | s_n_llhttp__internal__n_header_value_discard_ws, |
403 | | s_n_llhttp__internal__n_invoke_load_header_state, |
404 | | s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete, |
405 | | s_n_llhttp__internal__n_header_field_general_otherwise, |
406 | | s_n_llhttp__internal__n_header_field_general, |
407 | | s_n_llhttp__internal__n_header_field_colon, |
408 | | s_n_llhttp__internal__n_header_field_3, |
409 | | s_n_llhttp__internal__n_header_field_4, |
410 | | s_n_llhttp__internal__n_header_field_2, |
411 | | s_n_llhttp__internal__n_header_field_1, |
412 | | s_n_llhttp__internal__n_header_field_5, |
413 | | s_n_llhttp__internal__n_header_field_6, |
414 | | s_n_llhttp__internal__n_header_field_7, |
415 | | s_n_llhttp__internal__n_header_field, |
416 | | s_n_llhttp__internal__n_span_start_llhttp__on_header_field, |
417 | | s_n_llhttp__internal__n_header_field_start, |
418 | | s_n_llhttp__internal__n_headers_start, |
419 | | s_n_llhttp__internal__n_url_to_http_09, |
420 | | s_n_llhttp__internal__n_url_skip_to_http09, |
421 | | s_n_llhttp__internal__n_url_skip_lf_to_http09_1, |
422 | | s_n_llhttp__internal__n_url_skip_lf_to_http09, |
423 | | s_n_llhttp__internal__n_req_pri_upgrade, |
424 | | s_n_llhttp__internal__n_req_http_complete_crlf, |
425 | | s_n_llhttp__internal__n_req_http_complete, |
426 | | s_n_llhttp__internal__n_invoke_load_method_1, |
427 | | s_n_llhttp__internal__n_invoke_llhttp__on_version_complete, |
428 | | s_n_llhttp__internal__n_error_66, |
429 | | s_n_llhttp__internal__n_error_73, |
430 | | s_n_llhttp__internal__n_req_http_minor, |
431 | | s_n_llhttp__internal__n_error_74, |
432 | | s_n_llhttp__internal__n_req_http_dot, |
433 | | s_n_llhttp__internal__n_error_75, |
434 | | s_n_llhttp__internal__n_req_http_major, |
435 | | s_n_llhttp__internal__n_span_start_llhttp__on_version, |
436 | | s_n_llhttp__internal__n_req_http_start_1, |
437 | | s_n_llhttp__internal__n_req_http_start_2, |
438 | | s_n_llhttp__internal__n_req_http_start_3, |
439 | | s_n_llhttp__internal__n_req_http_start, |
440 | | s_n_llhttp__internal__n_url_to_http, |
441 | | s_n_llhttp__internal__n_url_skip_to_http, |
442 | | s_n_llhttp__internal__n_url_fragment, |
443 | | s_n_llhttp__internal__n_span_end_stub_query_3, |
444 | | s_n_llhttp__internal__n_url_query, |
445 | | s_n_llhttp__internal__n_url_query_or_fragment, |
446 | | s_n_llhttp__internal__n_url_path, |
447 | | s_n_llhttp__internal__n_span_start_stub_path_2, |
448 | | s_n_llhttp__internal__n_span_start_stub_path, |
449 | | s_n_llhttp__internal__n_span_start_stub_path_1, |
450 | | s_n_llhttp__internal__n_url_server_with_at, |
451 | | s_n_llhttp__internal__n_url_server, |
452 | | s_n_llhttp__internal__n_url_schema_delim_1, |
453 | | s_n_llhttp__internal__n_url_schema_delim, |
454 | | s_n_llhttp__internal__n_span_end_stub_schema, |
455 | | s_n_llhttp__internal__n_url_schema, |
456 | | s_n_llhttp__internal__n_url_start, |
457 | | s_n_llhttp__internal__n_span_start_llhttp__on_url_1, |
458 | | s_n_llhttp__internal__n_url_entry_normal, |
459 | | s_n_llhttp__internal__n_span_start_llhttp__on_url, |
460 | | s_n_llhttp__internal__n_url_entry_connect, |
461 | | s_n_llhttp__internal__n_req_spaces_before_url, |
462 | | s_n_llhttp__internal__n_req_first_space_before_url, |
463 | | s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1, |
464 | | s_n_llhttp__internal__n_after_start_req_2, |
465 | | s_n_llhttp__internal__n_after_start_req_3, |
466 | | s_n_llhttp__internal__n_after_start_req_1, |
467 | | s_n_llhttp__internal__n_after_start_req_4, |
468 | | s_n_llhttp__internal__n_after_start_req_6, |
469 | | s_n_llhttp__internal__n_after_start_req_8, |
470 | | s_n_llhttp__internal__n_after_start_req_9, |
471 | | s_n_llhttp__internal__n_after_start_req_7, |
472 | | s_n_llhttp__internal__n_after_start_req_5, |
473 | | s_n_llhttp__internal__n_after_start_req_12, |
474 | | s_n_llhttp__internal__n_after_start_req_13, |
475 | | s_n_llhttp__internal__n_after_start_req_11, |
476 | | s_n_llhttp__internal__n_after_start_req_10, |
477 | | s_n_llhttp__internal__n_after_start_req_14, |
478 | | s_n_llhttp__internal__n_after_start_req_17, |
479 | | s_n_llhttp__internal__n_after_start_req_16, |
480 | | s_n_llhttp__internal__n_after_start_req_15, |
481 | | s_n_llhttp__internal__n_after_start_req_18, |
482 | | s_n_llhttp__internal__n_after_start_req_20, |
483 | | s_n_llhttp__internal__n_after_start_req_21, |
484 | | s_n_llhttp__internal__n_after_start_req_19, |
485 | | s_n_llhttp__internal__n_after_start_req_23, |
486 | | s_n_llhttp__internal__n_after_start_req_24, |
487 | | s_n_llhttp__internal__n_after_start_req_26, |
488 | | s_n_llhttp__internal__n_after_start_req_28, |
489 | | s_n_llhttp__internal__n_after_start_req_29, |
490 | | s_n_llhttp__internal__n_after_start_req_27, |
491 | | s_n_llhttp__internal__n_after_start_req_25, |
492 | | s_n_llhttp__internal__n_after_start_req_30, |
493 | | s_n_llhttp__internal__n_after_start_req_22, |
494 | | s_n_llhttp__internal__n_after_start_req_31, |
495 | | s_n_llhttp__internal__n_after_start_req_32, |
496 | | s_n_llhttp__internal__n_after_start_req_35, |
497 | | s_n_llhttp__internal__n_after_start_req_36, |
498 | | s_n_llhttp__internal__n_after_start_req_34, |
499 | | s_n_llhttp__internal__n_after_start_req_37, |
500 | | s_n_llhttp__internal__n_after_start_req_38, |
501 | | s_n_llhttp__internal__n_after_start_req_42, |
502 | | s_n_llhttp__internal__n_after_start_req_43, |
503 | | s_n_llhttp__internal__n_after_start_req_41, |
504 | | s_n_llhttp__internal__n_after_start_req_40, |
505 | | s_n_llhttp__internal__n_after_start_req_39, |
506 | | s_n_llhttp__internal__n_after_start_req_45, |
507 | | s_n_llhttp__internal__n_after_start_req_44, |
508 | | s_n_llhttp__internal__n_after_start_req_33, |
509 | | s_n_llhttp__internal__n_after_start_req_46, |
510 | | s_n_llhttp__internal__n_after_start_req_49, |
511 | | s_n_llhttp__internal__n_after_start_req_50, |
512 | | s_n_llhttp__internal__n_after_start_req_51, |
513 | | s_n_llhttp__internal__n_after_start_req_52, |
514 | | s_n_llhttp__internal__n_after_start_req_48, |
515 | | s_n_llhttp__internal__n_after_start_req_47, |
516 | | s_n_llhttp__internal__n_after_start_req_55, |
517 | | s_n_llhttp__internal__n_after_start_req_57, |
518 | | s_n_llhttp__internal__n_after_start_req_58, |
519 | | s_n_llhttp__internal__n_after_start_req_56, |
520 | | s_n_llhttp__internal__n_after_start_req_54, |
521 | | s_n_llhttp__internal__n_after_start_req_59, |
522 | | s_n_llhttp__internal__n_after_start_req_60, |
523 | | s_n_llhttp__internal__n_after_start_req_53, |
524 | | s_n_llhttp__internal__n_after_start_req_62, |
525 | | s_n_llhttp__internal__n_after_start_req_63, |
526 | | s_n_llhttp__internal__n_after_start_req_61, |
527 | | s_n_llhttp__internal__n_after_start_req_66, |
528 | | s_n_llhttp__internal__n_after_start_req_68, |
529 | | s_n_llhttp__internal__n_after_start_req_69, |
530 | | s_n_llhttp__internal__n_after_start_req_67, |
531 | | s_n_llhttp__internal__n_after_start_req_70, |
532 | | s_n_llhttp__internal__n_after_start_req_65, |
533 | | s_n_llhttp__internal__n_after_start_req_64, |
534 | | s_n_llhttp__internal__n_after_start_req, |
535 | | s_n_llhttp__internal__n_span_start_llhttp__on_method_1, |
536 | | s_n_llhttp__internal__n_res_line_almost_done, |
537 | | s_n_llhttp__internal__n_invoke_test_lenient_flags_30, |
538 | | s_n_llhttp__internal__n_res_status, |
539 | | s_n_llhttp__internal__n_span_start_llhttp__on_status, |
540 | | s_n_llhttp__internal__n_res_status_code_otherwise, |
541 | | s_n_llhttp__internal__n_res_status_code_digit_3, |
542 | | s_n_llhttp__internal__n_res_status_code_digit_2, |
543 | | s_n_llhttp__internal__n_res_status_code_digit_1, |
544 | | s_n_llhttp__internal__n_res_after_version, |
545 | | s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1, |
546 | | s_n_llhttp__internal__n_error_89, |
547 | | s_n_llhttp__internal__n_error_103, |
548 | | s_n_llhttp__internal__n_res_http_minor, |
549 | | s_n_llhttp__internal__n_error_104, |
550 | | s_n_llhttp__internal__n_res_http_dot, |
551 | | s_n_llhttp__internal__n_error_105, |
552 | | s_n_llhttp__internal__n_res_http_major, |
553 | | s_n_llhttp__internal__n_span_start_llhttp__on_version_1, |
554 | | s_n_llhttp__internal__n_start_res, |
555 | | s_n_llhttp__internal__n_invoke_llhttp__on_method_complete, |
556 | | s_n_llhttp__internal__n_req_or_res_method_2, |
557 | | s_n_llhttp__internal__n_invoke_update_type_1, |
558 | | s_n_llhttp__internal__n_req_or_res_method_3, |
559 | | s_n_llhttp__internal__n_req_or_res_method_1, |
560 | | s_n_llhttp__internal__n_req_or_res_method, |
561 | | s_n_llhttp__internal__n_span_start_llhttp__on_method, |
562 | | s_n_llhttp__internal__n_start_req_or_res, |
563 | | s_n_llhttp__internal__n_invoke_load_type, |
564 | | s_n_llhttp__internal__n_invoke_update_finish, |
565 | | s_n_llhttp__internal__n_start, |
566 | | }; |
567 | | typedef enum llparse_state_e llparse_state_t; |
568 | | |
569 | | int llhttp__on_method( |
570 | | llhttp__internal_t* s, const unsigned char* p, |
571 | | const unsigned char* endp); |
572 | | |
573 | | int llhttp__on_url( |
574 | | llhttp__internal_t* s, const unsigned char* p, |
575 | | const unsigned char* endp); |
576 | | |
577 | | int llhttp__on_version( |
578 | | llhttp__internal_t* s, const unsigned char* p, |
579 | | const unsigned char* endp); |
580 | | |
581 | | int llhttp__on_header_field( |
582 | | llhttp__internal_t* s, const unsigned char* p, |
583 | | const unsigned char* endp); |
584 | | |
585 | | int llhttp__on_header_value( |
586 | | llhttp__internal_t* s, const unsigned char* p, |
587 | | const unsigned char* endp); |
588 | | |
589 | | int llhttp__on_body( |
590 | | llhttp__internal_t* s, const unsigned char* p, |
591 | | const unsigned char* endp); |
592 | | |
593 | | int llhttp__on_chunk_extension_name( |
594 | | llhttp__internal_t* s, const unsigned char* p, |
595 | | const unsigned char* endp); |
596 | | |
597 | | int llhttp__on_chunk_extension_value( |
598 | | llhttp__internal_t* s, const unsigned char* p, |
599 | | const unsigned char* endp); |
600 | | |
601 | | int llhttp__on_status( |
602 | | llhttp__internal_t* s, const unsigned char* p, |
603 | | const unsigned char* endp); |
604 | | |
605 | | int llhttp__internal__c_load_initial_message_completed( |
606 | | llhttp__internal_t* state, |
607 | | const unsigned char* p, |
608 | 0 | const unsigned char* endp) { |
609 | 0 | return state->initial_message_completed; |
610 | 0 | } |
611 | | |
612 | | int llhttp__on_reset( |
613 | | llhttp__internal_t* s, const unsigned char* p, |
614 | | const unsigned char* endp); |
615 | | |
616 | | int llhttp__internal__c_update_finish( |
617 | | llhttp__internal_t* state, |
618 | | const unsigned char* p, |
619 | 0 | const unsigned char* endp) { |
620 | 0 | state->finish = 2; |
621 | 0 | return 0; |
622 | 0 | } |
623 | | |
624 | | int llhttp__on_message_begin( |
625 | | llhttp__internal_t* s, const unsigned char* p, |
626 | | const unsigned char* endp); |
627 | | |
628 | | int llhttp__internal__c_load_type( |
629 | | llhttp__internal_t* state, |
630 | | const unsigned char* p, |
631 | 0 | const unsigned char* endp) { |
632 | 0 | return state->type; |
633 | 0 | } |
634 | | |
635 | | int llhttp__internal__c_store_method( |
636 | | llhttp__internal_t* state, |
637 | | const unsigned char* p, |
638 | | const unsigned char* endp, |
639 | 0 | int match) { |
640 | 0 | state->method = match; |
641 | 0 | return 0; |
642 | 0 | } |
643 | | |
644 | | int llhttp__on_method_complete( |
645 | | llhttp__internal_t* s, const unsigned char* p, |
646 | | const unsigned char* endp); |
647 | | |
648 | | int llhttp__internal__c_is_equal_method( |
649 | | llhttp__internal_t* state, |
650 | | const unsigned char* p, |
651 | 0 | const unsigned char* endp) { |
652 | 0 | return state->method == 5; |
653 | 0 | } |
654 | | |
655 | | int llhttp__internal__c_update_http_major( |
656 | | llhttp__internal_t* state, |
657 | | const unsigned char* p, |
658 | 0 | const unsigned char* endp) { |
659 | 0 | state->http_major = 0; |
660 | 0 | return 0; |
661 | 0 | } |
662 | | |
663 | | int llhttp__internal__c_update_http_minor( |
664 | | llhttp__internal_t* state, |
665 | | const unsigned char* p, |
666 | 0 | const unsigned char* endp) { |
667 | 0 | state->http_minor = 9; |
668 | 0 | return 0; |
669 | 0 | } |
670 | | |
671 | | int llhttp__on_url_complete( |
672 | | llhttp__internal_t* s, const unsigned char* p, |
673 | | const unsigned char* endp); |
674 | | |
675 | | int llhttp__internal__c_test_lenient_flags( |
676 | | llhttp__internal_t* state, |
677 | | const unsigned char* p, |
678 | 0 | const unsigned char* endp) { |
679 | 0 | return (state->lenient_flags & 1) == 1; |
680 | 0 | } |
681 | | |
682 | | int llhttp__internal__c_test_lenient_flags_1( |
683 | | llhttp__internal_t* state, |
684 | | const unsigned char* p, |
685 | 0 | const unsigned char* endp) { |
686 | 0 | return (state->lenient_flags & 256) == 256; |
687 | 0 | } |
688 | | |
689 | | int llhttp__internal__c_test_flags( |
690 | | llhttp__internal_t* state, |
691 | | const unsigned char* p, |
692 | 0 | const unsigned char* endp) { |
693 | 0 | return (state->flags & 128) == 128; |
694 | 0 | } |
695 | | |
696 | | int llhttp__on_chunk_complete( |
697 | | llhttp__internal_t* s, const unsigned char* p, |
698 | | const unsigned char* endp); |
699 | | |
700 | | int llhttp__on_message_complete( |
701 | | llhttp__internal_t* s, const unsigned char* p, |
702 | | const unsigned char* endp); |
703 | | |
704 | | int llhttp__internal__c_is_equal_upgrade( |
705 | | llhttp__internal_t* state, |
706 | | const unsigned char* p, |
707 | 0 | const unsigned char* endp) { |
708 | 0 | return state->upgrade == 1; |
709 | 0 | } |
710 | | |
711 | | int llhttp__after_message_complete( |
712 | | llhttp__internal_t* s, const unsigned char* p, |
713 | | const unsigned char* endp); |
714 | | |
715 | | int llhttp__internal__c_update_content_length( |
716 | | llhttp__internal_t* state, |
717 | | const unsigned char* p, |
718 | 0 | const unsigned char* endp) { |
719 | 0 | state->content_length = 0; |
720 | 0 | return 0; |
721 | 0 | } |
722 | | |
723 | | int llhttp__internal__c_update_initial_message_completed( |
724 | | llhttp__internal_t* state, |
725 | | const unsigned char* p, |
726 | 0 | const unsigned char* endp) { |
727 | 0 | state->initial_message_completed = 1; |
728 | 0 | return 0; |
729 | 0 | } |
730 | | |
731 | | int llhttp__internal__c_update_finish_1( |
732 | | llhttp__internal_t* state, |
733 | | const unsigned char* p, |
734 | 0 | const unsigned char* endp) { |
735 | 0 | state->finish = 0; |
736 | 0 | return 0; |
737 | 0 | } |
738 | | |
739 | | int llhttp__internal__c_test_lenient_flags_2( |
740 | | llhttp__internal_t* state, |
741 | | const unsigned char* p, |
742 | 0 | const unsigned char* endp) { |
743 | 0 | return (state->lenient_flags & 4) == 4; |
744 | 0 | } |
745 | | |
746 | | int llhttp__internal__c_test_lenient_flags_3( |
747 | | llhttp__internal_t* state, |
748 | | const unsigned char* p, |
749 | 0 | const unsigned char* endp) { |
750 | 0 | return (state->lenient_flags & 32) == 32; |
751 | 0 | } |
752 | | |
753 | | int llhttp__before_headers_complete( |
754 | | llhttp__internal_t* s, const unsigned char* p, |
755 | | const unsigned char* endp); |
756 | | |
757 | | int llhttp__on_headers_complete( |
758 | | llhttp__internal_t* s, const unsigned char* p, |
759 | | const unsigned char* endp); |
760 | | |
761 | | int llhttp__after_headers_complete( |
762 | | llhttp__internal_t* s, const unsigned char* p, |
763 | | const unsigned char* endp); |
764 | | |
765 | | int llhttp__internal__c_mul_add_content_length( |
766 | | llhttp__internal_t* state, |
767 | | const unsigned char* p, |
768 | | const unsigned char* endp, |
769 | 0 | int match) { |
770 | | /* Multiplication overflow */ |
771 | 0 | if (state->content_length > 0xffffffffffffffffULL / 16) { |
772 | 0 | return 1; |
773 | 0 | } |
774 | | |
775 | 0 | state->content_length *= 16; |
776 | | |
777 | | /* Addition overflow */ |
778 | 0 | if (match >= 0) { |
779 | 0 | if (state->content_length > 0xffffffffffffffffULL - match) { |
780 | 0 | return 1; |
781 | 0 | } |
782 | 0 | } else { |
783 | 0 | if (state->content_length < 0ULL - match) { |
784 | 0 | return 1; |
785 | 0 | } |
786 | 0 | } |
787 | 0 | state->content_length += match; |
788 | 0 | return 0; |
789 | 0 | } |
790 | | |
791 | | int llhttp__internal__c_test_lenient_flags_4( |
792 | | llhttp__internal_t* state, |
793 | | const unsigned char* p, |
794 | 0 | const unsigned char* endp) { |
795 | 0 | return (state->lenient_flags & 512) == 512; |
796 | 0 | } |
797 | | |
798 | | int llhttp__on_chunk_header( |
799 | | llhttp__internal_t* s, const unsigned char* p, |
800 | | const unsigned char* endp); |
801 | | |
802 | | int llhttp__internal__c_is_equal_content_length( |
803 | | llhttp__internal_t* state, |
804 | | const unsigned char* p, |
805 | 0 | const unsigned char* endp) { |
806 | 0 | return state->content_length == 0; |
807 | 0 | } |
808 | | |
809 | | int llhttp__internal__c_test_lenient_flags_7( |
810 | | llhttp__internal_t* state, |
811 | | const unsigned char* p, |
812 | 0 | const unsigned char* endp) { |
813 | 0 | return (state->lenient_flags & 128) == 128; |
814 | 0 | } |
815 | | |
816 | | int llhttp__internal__c_or_flags( |
817 | | llhttp__internal_t* state, |
818 | | const unsigned char* p, |
819 | 0 | const unsigned char* endp) { |
820 | 0 | state->flags |= 128; |
821 | 0 | return 0; |
822 | 0 | } |
823 | | |
824 | | int llhttp__internal__c_test_lenient_flags_8( |
825 | | llhttp__internal_t* state, |
826 | | const unsigned char* p, |
827 | 0 | const unsigned char* endp) { |
828 | 0 | return (state->lenient_flags & 64) == 64; |
829 | 0 | } |
830 | | |
831 | | int llhttp__on_chunk_extension_name_complete( |
832 | | llhttp__internal_t* s, const unsigned char* p, |
833 | | const unsigned char* endp); |
834 | | |
835 | | int llhttp__on_chunk_extension_value_complete( |
836 | | llhttp__internal_t* s, const unsigned char* p, |
837 | | const unsigned char* endp); |
838 | | |
839 | | int llhttp__internal__c_update_finish_3( |
840 | | llhttp__internal_t* state, |
841 | | const unsigned char* p, |
842 | 0 | const unsigned char* endp) { |
843 | 0 | state->finish = 1; |
844 | 0 | return 0; |
845 | 0 | } |
846 | | |
847 | | int llhttp__internal__c_or_flags_1( |
848 | | llhttp__internal_t* state, |
849 | | const unsigned char* p, |
850 | 0 | const unsigned char* endp) { |
851 | 0 | state->flags |= 64; |
852 | 0 | return 0; |
853 | 0 | } |
854 | | |
855 | | int llhttp__internal__c_update_upgrade( |
856 | | llhttp__internal_t* state, |
857 | | const unsigned char* p, |
858 | 0 | const unsigned char* endp) { |
859 | 0 | state->upgrade = 1; |
860 | 0 | return 0; |
861 | 0 | } |
862 | | |
863 | | int llhttp__internal__c_store_header_state( |
864 | | llhttp__internal_t* state, |
865 | | const unsigned char* p, |
866 | | const unsigned char* endp, |
867 | 0 | int match) { |
868 | 0 | state->header_state = match; |
869 | 0 | return 0; |
870 | 0 | } |
871 | | |
872 | | int llhttp__on_header_field_complete( |
873 | | llhttp__internal_t* s, const unsigned char* p, |
874 | | const unsigned char* endp); |
875 | | |
876 | | int llhttp__internal__c_load_header_state( |
877 | | llhttp__internal_t* state, |
878 | | const unsigned char* p, |
879 | 0 | const unsigned char* endp) { |
880 | 0 | return state->header_state; |
881 | 0 | } |
882 | | |
883 | | int llhttp__internal__c_test_flags_4( |
884 | | llhttp__internal_t* state, |
885 | | const unsigned char* p, |
886 | 0 | const unsigned char* endp) { |
887 | 0 | return (state->flags & 512) == 512; |
888 | 0 | } |
889 | | |
890 | | int llhttp__internal__c_test_lenient_flags_22( |
891 | | llhttp__internal_t* state, |
892 | | const unsigned char* p, |
893 | 0 | const unsigned char* endp) { |
894 | 0 | return (state->lenient_flags & 2) == 2; |
895 | 0 | } |
896 | | |
897 | | int llhttp__internal__c_or_flags_5( |
898 | | llhttp__internal_t* state, |
899 | | const unsigned char* p, |
900 | 0 | const unsigned char* endp) { |
901 | 0 | state->flags |= 1; |
902 | 0 | return 0; |
903 | 0 | } |
904 | | |
905 | | int llhttp__internal__c_update_header_state( |
906 | | llhttp__internal_t* state, |
907 | | const unsigned char* p, |
908 | 0 | const unsigned char* endp) { |
909 | 0 | state->header_state = 1; |
910 | 0 | return 0; |
911 | 0 | } |
912 | | |
913 | | int llhttp__on_header_value_complete( |
914 | | llhttp__internal_t* s, const unsigned char* p, |
915 | | const unsigned char* endp); |
916 | | |
917 | | int llhttp__internal__c_or_flags_6( |
918 | | llhttp__internal_t* state, |
919 | | const unsigned char* p, |
920 | 0 | const unsigned char* endp) { |
921 | 0 | state->flags |= 2; |
922 | 0 | return 0; |
923 | 0 | } |
924 | | |
925 | | int llhttp__internal__c_or_flags_7( |
926 | | llhttp__internal_t* state, |
927 | | const unsigned char* p, |
928 | 0 | const unsigned char* endp) { |
929 | 0 | state->flags |= 4; |
930 | 0 | return 0; |
931 | 0 | } |
932 | | |
933 | | int llhttp__internal__c_or_flags_8( |
934 | | llhttp__internal_t* state, |
935 | | const unsigned char* p, |
936 | 0 | const unsigned char* endp) { |
937 | 0 | state->flags |= 8; |
938 | 0 | return 0; |
939 | 0 | } |
940 | | |
941 | | int llhttp__internal__c_update_header_state_3( |
942 | | llhttp__internal_t* state, |
943 | | const unsigned char* p, |
944 | 0 | const unsigned char* endp) { |
945 | 0 | state->header_state = 6; |
946 | 0 | return 0; |
947 | 0 | } |
948 | | |
949 | | int llhttp__internal__c_update_header_state_1( |
950 | | llhttp__internal_t* state, |
951 | | const unsigned char* p, |
952 | 0 | const unsigned char* endp) { |
953 | 0 | state->header_state = 0; |
954 | 0 | return 0; |
955 | 0 | } |
956 | | |
957 | | int llhttp__internal__c_update_header_state_6( |
958 | | llhttp__internal_t* state, |
959 | | const unsigned char* p, |
960 | 0 | const unsigned char* endp) { |
961 | 0 | state->header_state = 5; |
962 | 0 | return 0; |
963 | 0 | } |
964 | | |
965 | | int llhttp__internal__c_update_header_state_7( |
966 | | llhttp__internal_t* state, |
967 | | const unsigned char* p, |
968 | 0 | const unsigned char* endp) { |
969 | 0 | state->header_state = 7; |
970 | 0 | return 0; |
971 | 0 | } |
972 | | |
973 | | int llhttp__internal__c_test_flags_2( |
974 | | llhttp__internal_t* state, |
975 | | const unsigned char* p, |
976 | 0 | const unsigned char* endp) { |
977 | 0 | return (state->flags & 32) == 32; |
978 | 0 | } |
979 | | |
980 | | int llhttp__internal__c_mul_add_content_length_1( |
981 | | llhttp__internal_t* state, |
982 | | const unsigned char* p, |
983 | | const unsigned char* endp, |
984 | 0 | int match) { |
985 | | /* Multiplication overflow */ |
986 | 0 | if (state->content_length > 0xffffffffffffffffULL / 10) { |
987 | 0 | return 1; |
988 | 0 | } |
989 | | |
990 | 0 | state->content_length *= 10; |
991 | | |
992 | | /* Addition overflow */ |
993 | 0 | if (match >= 0) { |
994 | 0 | if (state->content_length > 0xffffffffffffffffULL - match) { |
995 | 0 | return 1; |
996 | 0 | } |
997 | 0 | } else { |
998 | 0 | if (state->content_length < 0ULL - match) { |
999 | 0 | return 1; |
1000 | 0 | } |
1001 | 0 | } |
1002 | 0 | state->content_length += match; |
1003 | 0 | return 0; |
1004 | 0 | } |
1005 | | |
1006 | | int llhttp__internal__c_or_flags_17( |
1007 | | llhttp__internal_t* state, |
1008 | | const unsigned char* p, |
1009 | 0 | const unsigned char* endp) { |
1010 | 0 | state->flags |= 32; |
1011 | 0 | return 0; |
1012 | 0 | } |
1013 | | |
1014 | | int llhttp__internal__c_test_flags_3( |
1015 | | llhttp__internal_t* state, |
1016 | | const unsigned char* p, |
1017 | 0 | const unsigned char* endp) { |
1018 | 0 | return (state->flags & 8) == 8; |
1019 | 0 | } |
1020 | | |
1021 | | int llhttp__internal__c_test_lenient_flags_20( |
1022 | | llhttp__internal_t* state, |
1023 | | const unsigned char* p, |
1024 | 0 | const unsigned char* endp) { |
1025 | 0 | return (state->lenient_flags & 8) == 8; |
1026 | 0 | } |
1027 | | |
1028 | | int llhttp__internal__c_or_flags_18( |
1029 | | llhttp__internal_t* state, |
1030 | | const unsigned char* p, |
1031 | 0 | const unsigned char* endp) { |
1032 | 0 | state->flags |= 512; |
1033 | 0 | return 0; |
1034 | 0 | } |
1035 | | |
1036 | | int llhttp__internal__c_and_flags( |
1037 | | llhttp__internal_t* state, |
1038 | | const unsigned char* p, |
1039 | 0 | const unsigned char* endp) { |
1040 | 0 | state->flags &= -9; |
1041 | 0 | return 0; |
1042 | 0 | } |
1043 | | |
1044 | | int llhttp__internal__c_update_header_state_8( |
1045 | | llhttp__internal_t* state, |
1046 | | const unsigned char* p, |
1047 | 0 | const unsigned char* endp) { |
1048 | 0 | state->header_state = 8; |
1049 | 0 | return 0; |
1050 | 0 | } |
1051 | | |
1052 | | int llhttp__internal__c_or_flags_20( |
1053 | | llhttp__internal_t* state, |
1054 | | const unsigned char* p, |
1055 | 0 | const unsigned char* endp) { |
1056 | 0 | state->flags |= 16; |
1057 | 0 | return 0; |
1058 | 0 | } |
1059 | | |
1060 | | int llhttp__internal__c_load_method( |
1061 | | llhttp__internal_t* state, |
1062 | | const unsigned char* p, |
1063 | 0 | const unsigned char* endp) { |
1064 | 0 | return state->method; |
1065 | 0 | } |
1066 | | |
1067 | | int llhttp__internal__c_store_http_major( |
1068 | | llhttp__internal_t* state, |
1069 | | const unsigned char* p, |
1070 | | const unsigned char* endp, |
1071 | 0 | int match) { |
1072 | 0 | state->http_major = match; |
1073 | 0 | return 0; |
1074 | 0 | } |
1075 | | |
1076 | | int llhttp__internal__c_store_http_minor( |
1077 | | llhttp__internal_t* state, |
1078 | | const unsigned char* p, |
1079 | | const unsigned char* endp, |
1080 | 0 | int match) { |
1081 | 0 | state->http_minor = match; |
1082 | 0 | return 0; |
1083 | 0 | } |
1084 | | |
1085 | | int llhttp__internal__c_test_lenient_flags_24( |
1086 | | llhttp__internal_t* state, |
1087 | | const unsigned char* p, |
1088 | 0 | const unsigned char* endp) { |
1089 | 0 | return (state->lenient_flags & 16) == 16; |
1090 | 0 | } |
1091 | | |
1092 | | int llhttp__on_version_complete( |
1093 | | llhttp__internal_t* s, const unsigned char* p, |
1094 | | const unsigned char* endp); |
1095 | | |
1096 | | int llhttp__internal__c_load_http_major( |
1097 | | llhttp__internal_t* state, |
1098 | | const unsigned char* p, |
1099 | 0 | const unsigned char* endp) { |
1100 | 0 | return state->http_major; |
1101 | 0 | } |
1102 | | |
1103 | | int llhttp__internal__c_load_http_minor( |
1104 | | llhttp__internal_t* state, |
1105 | | const unsigned char* p, |
1106 | 0 | const unsigned char* endp) { |
1107 | 0 | return state->http_minor; |
1108 | 0 | } |
1109 | | |
1110 | | int llhttp__internal__c_update_status_code( |
1111 | | llhttp__internal_t* state, |
1112 | | const unsigned char* p, |
1113 | 0 | const unsigned char* endp) { |
1114 | 0 | state->status_code = 0; |
1115 | 0 | return 0; |
1116 | 0 | } |
1117 | | |
1118 | | int llhttp__internal__c_mul_add_status_code( |
1119 | | llhttp__internal_t* state, |
1120 | | const unsigned char* p, |
1121 | | const unsigned char* endp, |
1122 | 0 | int match) { |
1123 | | /* Multiplication overflow */ |
1124 | 0 | if (state->status_code > 0xffff / 10) { |
1125 | 0 | return 1; |
1126 | 0 | } |
1127 | | |
1128 | 0 | state->status_code *= 10; |
1129 | | |
1130 | | /* Addition overflow */ |
1131 | 0 | if (match >= 0) { |
1132 | 0 | if (state->status_code > 0xffff - match) { |
1133 | 0 | return 1; |
1134 | 0 | } |
1135 | 0 | } else { |
1136 | 0 | if (state->status_code < 0 - match) { |
1137 | 0 | return 1; |
1138 | 0 | } |
1139 | 0 | } |
1140 | 0 | state->status_code += match; |
1141 | 0 | return 0; |
1142 | 0 | } |
1143 | | |
1144 | | int llhttp__on_status_complete( |
1145 | | llhttp__internal_t* s, const unsigned char* p, |
1146 | | const unsigned char* endp); |
1147 | | |
1148 | | int llhttp__internal__c_update_type( |
1149 | | llhttp__internal_t* state, |
1150 | | const unsigned char* p, |
1151 | 0 | const unsigned char* endp) { |
1152 | 0 | state->type = 1; |
1153 | 0 | return 0; |
1154 | 0 | } |
1155 | | |
1156 | | int llhttp__internal__c_update_type_1( |
1157 | | llhttp__internal_t* state, |
1158 | | const unsigned char* p, |
1159 | 0 | const unsigned char* endp) { |
1160 | 0 | state->type = 2; |
1161 | 0 | return 0; |
1162 | 0 | } |
1163 | | |
1164 | 0 | int llhttp__internal_init(llhttp__internal_t* state) { |
1165 | 0 | memset(state, 0, sizeof(*state)); |
1166 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_start; |
1167 | 0 | return 0; |
1168 | 0 | } |
1169 | | |
1170 | | static llparse_state_t llhttp__internal__run( |
1171 | | llhttp__internal_t* state, |
1172 | | const unsigned char* p, |
1173 | 0 | const unsigned char* endp) { |
1174 | 0 | int match; |
1175 | 0 | switch ((llparse_state_t) (intptr_t) state->_current) { |
1176 | 0 | case s_n_llhttp__internal__n_closed: |
1177 | 0 | s_n_llhttp__internal__n_closed: { |
1178 | 0 | if (p == endp) { |
1179 | 0 | return s_n_llhttp__internal__n_closed; |
1180 | 0 | } |
1181 | 0 | switch (*p) { |
1182 | 0 | case 10: { |
1183 | 0 | p++; |
1184 | 0 | goto s_n_llhttp__internal__n_closed; |
1185 | 0 | } |
1186 | 0 | case 13: { |
1187 | 0 | p++; |
1188 | 0 | goto s_n_llhttp__internal__n_closed; |
1189 | 0 | } |
1190 | 0 | default: { |
1191 | 0 | p++; |
1192 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_3; |
1193 | 0 | } |
1194 | 0 | } |
1195 | 0 | /* UNREACHABLE */; |
1196 | 0 | abort(); |
1197 | 0 | } |
1198 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: |
1199 | 0 | s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: { |
1200 | 0 | switch (llhttp__after_message_complete(state, p, endp)) { |
1201 | 0 | case 1: |
1202 | 0 | goto s_n_llhttp__internal__n_invoke_update_content_length; |
1203 | 0 | default: |
1204 | 0 | goto s_n_llhttp__internal__n_invoke_update_finish_1; |
1205 | 0 | } |
1206 | 0 | /* UNREACHABLE */; |
1207 | 0 | abort(); |
1208 | 0 | } |
1209 | 0 | case s_n_llhttp__internal__n_pause_1: |
1210 | 0 | s_n_llhttp__internal__n_pause_1: { |
1211 | 0 | state->error = 0x16; |
1212 | 0 | state->reason = "Pause on CONNECT/Upgrade"; |
1213 | 0 | state->error_pos = (const char*) p; |
1214 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; |
1215 | 0 | return s_error; |
1216 | 0 | /* UNREACHABLE */; |
1217 | 0 | abort(); |
1218 | 0 | } |
1219 | 0 | case s_n_llhttp__internal__n_invoke_is_equal_upgrade: |
1220 | 0 | s_n_llhttp__internal__n_invoke_is_equal_upgrade: { |
1221 | 0 | switch (llhttp__internal__c_is_equal_upgrade(state, p, endp)) { |
1222 | 0 | case 0: |
1223 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; |
1224 | 0 | default: |
1225 | 0 | goto s_n_llhttp__internal__n_pause_1; |
1226 | 0 | } |
1227 | 0 | /* UNREACHABLE */; |
1228 | 0 | abort(); |
1229 | 0 | } |
1230 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: |
1231 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: { |
1232 | 0 | switch (llhttp__on_message_complete(state, p, endp)) { |
1233 | 0 | case 0: |
1234 | 0 | goto s_n_llhttp__internal__n_invoke_is_equal_upgrade; |
1235 | 0 | case 21: |
1236 | 0 | goto s_n_llhttp__internal__n_pause_13; |
1237 | 0 | default: |
1238 | 0 | goto s_n_llhttp__internal__n_error_38; |
1239 | 0 | } |
1240 | 0 | /* UNREACHABLE */; |
1241 | 0 | abort(); |
1242 | 0 | } |
1243 | 0 | case s_n_llhttp__internal__n_chunk_data_almost_done_1: |
1244 | 0 | s_n_llhttp__internal__n_chunk_data_almost_done_1: { |
1245 | 0 | if (p == endp) { |
1246 | 0 | return s_n_llhttp__internal__n_chunk_data_almost_done_1; |
1247 | 0 | } |
1248 | 0 | switch (*p) { |
1249 | 0 | case 10: { |
1250 | 0 | p++; |
1251 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; |
1252 | 0 | } |
1253 | 0 | default: { |
1254 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7; |
1255 | 0 | } |
1256 | 0 | } |
1257 | 0 | /* UNREACHABLE */; |
1258 | 0 | abort(); |
1259 | 0 | } |
1260 | 0 | case s_n_llhttp__internal__n_chunk_data_almost_done: |
1261 | 0 | s_n_llhttp__internal__n_chunk_data_almost_done: { |
1262 | 0 | if (p == endp) { |
1263 | 0 | return s_n_llhttp__internal__n_chunk_data_almost_done; |
1264 | 0 | } |
1265 | 0 | switch (*p) { |
1266 | 0 | case 10: { |
1267 | 0 | p++; |
1268 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_6; |
1269 | 0 | } |
1270 | 0 | case 13: { |
1271 | 0 | p++; |
1272 | 0 | goto s_n_llhttp__internal__n_chunk_data_almost_done_1; |
1273 | 0 | } |
1274 | 0 | default: { |
1275 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7; |
1276 | 0 | } |
1277 | 0 | } |
1278 | 0 | /* UNREACHABLE */; |
1279 | 0 | abort(); |
1280 | 0 | } |
1281 | 0 | case s_n_llhttp__internal__n_consume_content_length: |
1282 | 0 | s_n_llhttp__internal__n_consume_content_length: { |
1283 | 0 | size_t avail; |
1284 | 0 | uint64_t need; |
1285 | | |
1286 | 0 | avail = endp - p; |
1287 | 0 | need = state->content_length; |
1288 | 0 | if (avail >= need) { |
1289 | 0 | p += need; |
1290 | 0 | state->content_length = 0; |
1291 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_body; |
1292 | 0 | } |
1293 | | |
1294 | 0 | state->content_length -= avail; |
1295 | 0 | return s_n_llhttp__internal__n_consume_content_length; |
1296 | 0 | /* UNREACHABLE */; |
1297 | 0 | abort(); |
1298 | 0 | } |
1299 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_body: |
1300 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_body: { |
1301 | 0 | if (p == endp) { |
1302 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_body; |
1303 | 0 | } |
1304 | 0 | state->_span_pos0 = (void*) p; |
1305 | 0 | state->_span_cb0 = llhttp__on_body; |
1306 | 0 | goto s_n_llhttp__internal__n_consume_content_length; |
1307 | 0 | /* UNREACHABLE */; |
1308 | 0 | abort(); |
1309 | 0 | } |
1310 | 0 | case s_n_llhttp__internal__n_invoke_is_equal_content_length: |
1311 | 0 | s_n_llhttp__internal__n_invoke_is_equal_content_length: { |
1312 | 0 | switch (llhttp__internal__c_is_equal_content_length(state, p, endp)) { |
1313 | 0 | case 0: |
1314 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_body; |
1315 | 0 | default: |
1316 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags; |
1317 | 0 | } |
1318 | 0 | /* UNREACHABLE */; |
1319 | 0 | abort(); |
1320 | 0 | } |
1321 | 0 | case s_n_llhttp__internal__n_chunk_size_almost_done: |
1322 | 0 | s_n_llhttp__internal__n_chunk_size_almost_done: { |
1323 | 0 | if (p == endp) { |
1324 | 0 | return s_n_llhttp__internal__n_chunk_size_almost_done; |
1325 | 0 | } |
1326 | 0 | switch (*p) { |
1327 | 0 | case 10: { |
1328 | 0 | p++; |
1329 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header; |
1330 | 0 | } |
1331 | 0 | default: { |
1332 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_8; |
1333 | 0 | } |
1334 | 0 | } |
1335 | 0 | /* UNREACHABLE */; |
1336 | 0 | abort(); |
1337 | 0 | } |
1338 | 0 | case s_n_llhttp__internal__n_invoke_test_lenient_flags_9: |
1339 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_9: { |
1340 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
1341 | 0 | case 1: |
1342 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1343 | 0 | default: |
1344 | 0 | goto s_n_llhttp__internal__n_error_20; |
1345 | 0 | } |
1346 | 0 | /* UNREACHABLE */; |
1347 | 0 | abort(); |
1348 | 0 | } |
1349 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete: |
1350 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete: { |
1351 | 0 | switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { |
1352 | 0 | case 0: |
1353 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_9; |
1354 | 0 | case 21: |
1355 | 0 | goto s_n_llhttp__internal__n_pause_5; |
1356 | 0 | default: |
1357 | 0 | goto s_n_llhttp__internal__n_error_19; |
1358 | 0 | } |
1359 | 0 | /* UNREACHABLE */; |
1360 | 0 | abort(); |
1361 | 0 | } |
1362 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1: |
1363 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1: { |
1364 | 0 | switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { |
1365 | 0 | case 0: |
1366 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1367 | 0 | case 21: |
1368 | 0 | goto s_n_llhttp__internal__n_pause_6; |
1369 | 0 | default: |
1370 | 0 | goto s_n_llhttp__internal__n_error_21; |
1371 | 0 | } |
1372 | 0 | /* UNREACHABLE */; |
1373 | 0 | abort(); |
1374 | 0 | } |
1375 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: |
1376 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: { |
1377 | 0 | switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { |
1378 | 0 | case 0: |
1379 | 0 | goto s_n_llhttp__internal__n_chunk_extensions; |
1380 | 0 | case 21: |
1381 | 0 | goto s_n_llhttp__internal__n_pause_7; |
1382 | 0 | default: |
1383 | 0 | goto s_n_llhttp__internal__n_error_22; |
1384 | 0 | } |
1385 | 0 | /* UNREACHABLE */; |
1386 | 0 | abort(); |
1387 | 0 | } |
1388 | 0 | case s_n_llhttp__internal__n_invoke_test_lenient_flags_10: |
1389 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_10: { |
1390 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
1391 | 0 | case 1: |
1392 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1393 | 0 | default: |
1394 | 0 | goto s_n_llhttp__internal__n_error_25; |
1395 | 0 | } |
1396 | 0 | /* UNREACHABLE */; |
1397 | 0 | abort(); |
1398 | 0 | } |
1399 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete: |
1400 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete: { |
1401 | 0 | switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { |
1402 | 0 | case 0: |
1403 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_10; |
1404 | 0 | case 21: |
1405 | 0 | goto s_n_llhttp__internal__n_pause_8; |
1406 | 0 | default: |
1407 | 0 | goto s_n_llhttp__internal__n_error_24; |
1408 | 0 | } |
1409 | 0 | /* UNREACHABLE */; |
1410 | 0 | abort(); |
1411 | 0 | } |
1412 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: |
1413 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: { |
1414 | 0 | switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { |
1415 | 0 | case 0: |
1416 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1417 | 0 | case 21: |
1418 | 0 | goto s_n_llhttp__internal__n_pause_9; |
1419 | 0 | default: |
1420 | 0 | goto s_n_llhttp__internal__n_error_26; |
1421 | 0 | } |
1422 | 0 | /* UNREACHABLE */; |
1423 | 0 | abort(); |
1424 | 0 | } |
1425 | 0 | case s_n_llhttp__internal__n_chunk_extension_quoted_value_done: |
1426 | 0 | s_n_llhttp__internal__n_chunk_extension_quoted_value_done: { |
1427 | 0 | if (p == endp) { |
1428 | 0 | return s_n_llhttp__internal__n_chunk_extension_quoted_value_done; |
1429 | 0 | } |
1430 | 0 | switch (*p) { |
1431 | 0 | case 10: { |
1432 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_11; |
1433 | 0 | } |
1434 | 0 | case 13: { |
1435 | 0 | p++; |
1436 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1437 | 0 | } |
1438 | 0 | case ';': { |
1439 | 0 | p++; |
1440 | 0 | goto s_n_llhttp__internal__n_chunk_extensions; |
1441 | 0 | } |
1442 | 0 | default: { |
1443 | 0 | goto s_n_llhttp__internal__n_error_29; |
1444 | 0 | } |
1445 | 0 | } |
1446 | 0 | /* UNREACHABLE */; |
1447 | 0 | abort(); |
1448 | 0 | } |
1449 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: |
1450 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: { |
1451 | 0 | switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { |
1452 | 0 | case 0: |
1453 | 0 | goto s_n_llhttp__internal__n_chunk_extension_quoted_value_done; |
1454 | 0 | case 21: |
1455 | 0 | goto s_n_llhttp__internal__n_pause_10; |
1456 | 0 | default: |
1457 | 0 | goto s_n_llhttp__internal__n_error_27; |
1458 | 0 | } |
1459 | 0 | /* UNREACHABLE */; |
1460 | 0 | abort(); |
1461 | 0 | } |
1462 | 0 | case s_n_llhttp__internal__n_error_30: |
1463 | 0 | s_n_llhttp__internal__n_error_30: { |
1464 | 0 | state->error = 0x2; |
1465 | 0 | state->reason = "Invalid quoted-pair in chunk extensions quoted value"; |
1466 | 0 | state->error_pos = (const char*) p; |
1467 | 0 | state->_current = (void*) (intptr_t) s_error; |
1468 | 0 | return s_error; |
1469 | 0 | /* UNREACHABLE */; |
1470 | 0 | abort(); |
1471 | 0 | } |
1472 | 0 | case s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair: |
1473 | 0 | s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair: { |
1474 | 0 | static uint8_t lookup_table[] = { |
1475 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
1476 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1477 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1478 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1479 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1480 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1481 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1482 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
1483 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1484 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1485 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1486 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1487 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1488 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1489 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1490 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
1491 | 0 | }; |
1492 | 0 | if (p == endp) { |
1493 | 0 | return s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair; |
1494 | 0 | } |
1495 | 0 | switch (lookup_table[(uint8_t) *p]) { |
1496 | 0 | case 1: { |
1497 | 0 | p++; |
1498 | 0 | goto s_n_llhttp__internal__n_chunk_extension_quoted_value; |
1499 | 0 | } |
1500 | 0 | default: { |
1501 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3; |
1502 | 0 | } |
1503 | 0 | } |
1504 | 0 | /* UNREACHABLE */; |
1505 | 0 | abort(); |
1506 | 0 | } |
1507 | 0 | case s_n_llhttp__internal__n_error_31: |
1508 | 0 | s_n_llhttp__internal__n_error_31: { |
1509 | 0 | state->error = 0x2; |
1510 | 0 | state->reason = "Invalid character in chunk extensions quoted value"; |
1511 | 0 | state->error_pos = (const char*) p; |
1512 | 0 | state->_current = (void*) (intptr_t) s_error; |
1513 | 0 | return s_error; |
1514 | 0 | /* UNREACHABLE */; |
1515 | 0 | abort(); |
1516 | 0 | } |
1517 | 0 | case s_n_llhttp__internal__n_chunk_extension_quoted_value: |
1518 | 0 | s_n_llhttp__internal__n_chunk_extension_quoted_value: { |
1519 | 0 | static uint8_t lookup_table[] = { |
1520 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
1521 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1522 | 0 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1523 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1524 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1525 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, |
1526 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1527 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1528 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1529 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1530 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1531 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1532 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1533 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1534 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1535 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
1536 | 0 | }; |
1537 | 0 | if (p == endp) { |
1538 | 0 | return s_n_llhttp__internal__n_chunk_extension_quoted_value; |
1539 | 0 | } |
1540 | 0 | switch (lookup_table[(uint8_t) *p]) { |
1541 | 0 | case 1: { |
1542 | 0 | p++; |
1543 | 0 | goto s_n_llhttp__internal__n_chunk_extension_quoted_value; |
1544 | 0 | } |
1545 | 0 | case 2: { |
1546 | 0 | p++; |
1547 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2; |
1548 | 0 | } |
1549 | 0 | case 3: { |
1550 | 0 | p++; |
1551 | 0 | goto s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair; |
1552 | 0 | } |
1553 | 0 | default: { |
1554 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4; |
1555 | 0 | } |
1556 | 0 | } |
1557 | 0 | /* UNREACHABLE */; |
1558 | 0 | abort(); |
1559 | 0 | } |
1560 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3: |
1561 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3: { |
1562 | 0 | switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { |
1563 | 0 | case 0: |
1564 | 0 | goto s_n_llhttp__internal__n_chunk_extensions; |
1565 | 0 | case 21: |
1566 | 0 | goto s_n_llhttp__internal__n_pause_11; |
1567 | 0 | default: |
1568 | 0 | goto s_n_llhttp__internal__n_error_32; |
1569 | 0 | } |
1570 | 0 | /* UNREACHABLE */; |
1571 | 0 | abort(); |
1572 | 0 | } |
1573 | 0 | case s_n_llhttp__internal__n_error_33: |
1574 | 0 | s_n_llhttp__internal__n_error_33: { |
1575 | 0 | state->error = 0x2; |
1576 | 0 | state->reason = "Invalid character in chunk extensions value"; |
1577 | 0 | state->error_pos = (const char*) p; |
1578 | 0 | state->_current = (void*) (intptr_t) s_error; |
1579 | 0 | return s_error; |
1580 | 0 | /* UNREACHABLE */; |
1581 | 0 | abort(); |
1582 | 0 | } |
1583 | 0 | case s_n_llhttp__internal__n_chunk_extension_value: |
1584 | 0 | s_n_llhttp__internal__n_chunk_extension_value: { |
1585 | 0 | static uint8_t lookup_table[] = { |
1586 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, |
1587 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1588 | 0 | 0, 3, 4, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, |
1589 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 5, 0, 0, 0, 0, |
1590 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
1591 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, |
1592 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
1593 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, |
1594 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1595 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1596 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1597 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1598 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1599 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1600 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1601 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
1602 | 0 | }; |
1603 | 0 | if (p == endp) { |
1604 | 0 | return s_n_llhttp__internal__n_chunk_extension_value; |
1605 | 0 | } |
1606 | 0 | switch (lookup_table[(uint8_t) *p]) { |
1607 | 0 | case 1: { |
1608 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value; |
1609 | 0 | } |
1610 | 0 | case 2: { |
1611 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1; |
1612 | 0 | } |
1613 | 0 | case 3: { |
1614 | 0 | p++; |
1615 | 0 | goto s_n_llhttp__internal__n_chunk_extension_value; |
1616 | 0 | } |
1617 | 0 | case 4: { |
1618 | 0 | p++; |
1619 | 0 | goto s_n_llhttp__internal__n_chunk_extension_quoted_value; |
1620 | 0 | } |
1621 | 0 | case 5: { |
1622 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5; |
1623 | 0 | } |
1624 | 0 | default: { |
1625 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6; |
1626 | 0 | } |
1627 | 0 | } |
1628 | 0 | /* UNREACHABLE */; |
1629 | 0 | abort(); |
1630 | 0 | } |
1631 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value: |
1632 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value: { |
1633 | 0 | if (p == endp) { |
1634 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value; |
1635 | 0 | } |
1636 | 0 | state->_span_pos0 = (void*) p; |
1637 | 0 | state->_span_cb0 = llhttp__on_chunk_extension_value; |
1638 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3; |
1639 | 0 | /* UNREACHABLE */; |
1640 | 0 | abort(); |
1641 | 0 | } |
1642 | 0 | case s_n_llhttp__internal__n_error_34: |
1643 | 0 | s_n_llhttp__internal__n_error_34: { |
1644 | 0 | state->error = 0x2; |
1645 | 0 | state->reason = "Invalid character in chunk extensions name"; |
1646 | 0 | state->error_pos = (const char*) p; |
1647 | 0 | state->_current = (void*) (intptr_t) s_error; |
1648 | 0 | return s_error; |
1649 | 0 | /* UNREACHABLE */; |
1650 | 0 | abort(); |
1651 | 0 | } |
1652 | 0 | case s_n_llhttp__internal__n_chunk_extension_name: |
1653 | 0 | s_n_llhttp__internal__n_chunk_extension_name: { |
1654 | 0 | static uint8_t lookup_table[] = { |
1655 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, |
1656 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1657 | 0 | 0, 3, 0, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, |
1658 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 5, 0, 0, |
1659 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
1660 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, |
1661 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
1662 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, |
1663 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1664 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1665 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1666 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1667 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1668 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1669 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
1670 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
1671 | 0 | }; |
1672 | 0 | if (p == endp) { |
1673 | 0 | return s_n_llhttp__internal__n_chunk_extension_name; |
1674 | 0 | } |
1675 | 0 | switch (lookup_table[(uint8_t) *p]) { |
1676 | 0 | case 1: { |
1677 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name; |
1678 | 0 | } |
1679 | 0 | case 2: { |
1680 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1; |
1681 | 0 | } |
1682 | 0 | case 3: { |
1683 | 0 | p++; |
1684 | 0 | goto s_n_llhttp__internal__n_chunk_extension_name; |
1685 | 0 | } |
1686 | 0 | case 4: { |
1687 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2; |
1688 | 0 | } |
1689 | 0 | case 5: { |
1690 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3; |
1691 | 0 | } |
1692 | 0 | default: { |
1693 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4; |
1694 | 0 | } |
1695 | 0 | } |
1696 | 0 | /* UNREACHABLE */; |
1697 | 0 | abort(); |
1698 | 0 | } |
1699 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name: |
1700 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name: { |
1701 | 0 | if (p == endp) { |
1702 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name; |
1703 | 0 | } |
1704 | 0 | state->_span_pos0 = (void*) p; |
1705 | 0 | state->_span_cb0 = llhttp__on_chunk_extension_name; |
1706 | 0 | goto s_n_llhttp__internal__n_chunk_extension_name; |
1707 | 0 | /* UNREACHABLE */; |
1708 | 0 | abort(); |
1709 | 0 | } |
1710 | 0 | case s_n_llhttp__internal__n_chunk_extensions: |
1711 | 0 | s_n_llhttp__internal__n_chunk_extensions: { |
1712 | 0 | if (p == endp) { |
1713 | 0 | return s_n_llhttp__internal__n_chunk_extensions; |
1714 | 0 | } |
1715 | 0 | switch (*p) { |
1716 | 0 | case 13: { |
1717 | 0 | p++; |
1718 | 0 | goto s_n_llhttp__internal__n_error_17; |
1719 | 0 | } |
1720 | 0 | case ' ': { |
1721 | 0 | p++; |
1722 | 0 | goto s_n_llhttp__internal__n_error_18; |
1723 | 0 | } |
1724 | 0 | default: { |
1725 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name; |
1726 | 0 | } |
1727 | 0 | } |
1728 | 0 | /* UNREACHABLE */; |
1729 | 0 | abort(); |
1730 | 0 | } |
1731 | 0 | case s_n_llhttp__internal__n_chunk_size_otherwise: |
1732 | 0 | s_n_llhttp__internal__n_chunk_size_otherwise: { |
1733 | 0 | if (p == endp) { |
1734 | 0 | return s_n_llhttp__internal__n_chunk_size_otherwise; |
1735 | 0 | } |
1736 | 0 | switch (*p) { |
1737 | 0 | case 9: { |
1738 | 0 | p++; |
1739 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4; |
1740 | 0 | } |
1741 | 0 | case 10: { |
1742 | 0 | p++; |
1743 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_5; |
1744 | 0 | } |
1745 | 0 | case 13: { |
1746 | 0 | p++; |
1747 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
1748 | 0 | } |
1749 | 0 | case ' ': { |
1750 | 0 | p++; |
1751 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4; |
1752 | 0 | } |
1753 | 0 | case ';': { |
1754 | 0 | p++; |
1755 | 0 | goto s_n_llhttp__internal__n_chunk_extensions; |
1756 | 0 | } |
1757 | 0 | default: { |
1758 | 0 | goto s_n_llhttp__internal__n_error_35; |
1759 | 0 | } |
1760 | 0 | } |
1761 | 0 | /* UNREACHABLE */; |
1762 | 0 | abort(); |
1763 | 0 | } |
1764 | 0 | case s_n_llhttp__internal__n_chunk_size: |
1765 | 0 | s_n_llhttp__internal__n_chunk_size: { |
1766 | 0 | if (p == endp) { |
1767 | 0 | return s_n_llhttp__internal__n_chunk_size; |
1768 | 0 | } |
1769 | 0 | switch (*p) { |
1770 | 0 | case '0': { |
1771 | 0 | p++; |
1772 | 0 | match = 0; |
1773 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1774 | 0 | } |
1775 | 0 | case '1': { |
1776 | 0 | p++; |
1777 | 0 | match = 1; |
1778 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1779 | 0 | } |
1780 | 0 | case '2': { |
1781 | 0 | p++; |
1782 | 0 | match = 2; |
1783 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1784 | 0 | } |
1785 | 0 | case '3': { |
1786 | 0 | p++; |
1787 | 0 | match = 3; |
1788 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1789 | 0 | } |
1790 | 0 | case '4': { |
1791 | 0 | p++; |
1792 | 0 | match = 4; |
1793 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1794 | 0 | } |
1795 | 0 | case '5': { |
1796 | 0 | p++; |
1797 | 0 | match = 5; |
1798 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1799 | 0 | } |
1800 | 0 | case '6': { |
1801 | 0 | p++; |
1802 | 0 | match = 6; |
1803 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1804 | 0 | } |
1805 | 0 | case '7': { |
1806 | 0 | p++; |
1807 | 0 | match = 7; |
1808 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1809 | 0 | } |
1810 | 0 | case '8': { |
1811 | 0 | p++; |
1812 | 0 | match = 8; |
1813 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1814 | 0 | } |
1815 | 0 | case '9': { |
1816 | 0 | p++; |
1817 | 0 | match = 9; |
1818 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1819 | 0 | } |
1820 | 0 | case 'A': { |
1821 | 0 | p++; |
1822 | 0 | match = 10; |
1823 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1824 | 0 | } |
1825 | 0 | case 'B': { |
1826 | 0 | p++; |
1827 | 0 | match = 11; |
1828 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1829 | 0 | } |
1830 | 0 | case 'C': { |
1831 | 0 | p++; |
1832 | 0 | match = 12; |
1833 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1834 | 0 | } |
1835 | 0 | case 'D': { |
1836 | 0 | p++; |
1837 | 0 | match = 13; |
1838 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1839 | 0 | } |
1840 | 0 | case 'E': { |
1841 | 0 | p++; |
1842 | 0 | match = 14; |
1843 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1844 | 0 | } |
1845 | 0 | case 'F': { |
1846 | 0 | p++; |
1847 | 0 | match = 15; |
1848 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1849 | 0 | } |
1850 | 0 | case 'a': { |
1851 | 0 | p++; |
1852 | 0 | match = 10; |
1853 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1854 | 0 | } |
1855 | 0 | case 'b': { |
1856 | 0 | p++; |
1857 | 0 | match = 11; |
1858 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1859 | 0 | } |
1860 | 0 | case 'c': { |
1861 | 0 | p++; |
1862 | 0 | match = 12; |
1863 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1864 | 0 | } |
1865 | 0 | case 'd': { |
1866 | 0 | p++; |
1867 | 0 | match = 13; |
1868 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1869 | 0 | } |
1870 | 0 | case 'e': { |
1871 | 0 | p++; |
1872 | 0 | match = 14; |
1873 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1874 | 0 | } |
1875 | 0 | case 'f': { |
1876 | 0 | p++; |
1877 | 0 | match = 15; |
1878 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1879 | 0 | } |
1880 | 0 | default: { |
1881 | 0 | goto s_n_llhttp__internal__n_chunk_size_otherwise; |
1882 | 0 | } |
1883 | 0 | } |
1884 | 0 | /* UNREACHABLE */; |
1885 | 0 | abort(); |
1886 | 0 | } |
1887 | 0 | case s_n_llhttp__internal__n_chunk_size_digit: |
1888 | 0 | s_n_llhttp__internal__n_chunk_size_digit: { |
1889 | 0 | if (p == endp) { |
1890 | 0 | return s_n_llhttp__internal__n_chunk_size_digit; |
1891 | 0 | } |
1892 | 0 | switch (*p) { |
1893 | 0 | case '0': { |
1894 | 0 | p++; |
1895 | 0 | match = 0; |
1896 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1897 | 0 | } |
1898 | 0 | case '1': { |
1899 | 0 | p++; |
1900 | 0 | match = 1; |
1901 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1902 | 0 | } |
1903 | 0 | case '2': { |
1904 | 0 | p++; |
1905 | 0 | match = 2; |
1906 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1907 | 0 | } |
1908 | 0 | case '3': { |
1909 | 0 | p++; |
1910 | 0 | match = 3; |
1911 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1912 | 0 | } |
1913 | 0 | case '4': { |
1914 | 0 | p++; |
1915 | 0 | match = 4; |
1916 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1917 | 0 | } |
1918 | 0 | case '5': { |
1919 | 0 | p++; |
1920 | 0 | match = 5; |
1921 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1922 | 0 | } |
1923 | 0 | case '6': { |
1924 | 0 | p++; |
1925 | 0 | match = 6; |
1926 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1927 | 0 | } |
1928 | 0 | case '7': { |
1929 | 0 | p++; |
1930 | 0 | match = 7; |
1931 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1932 | 0 | } |
1933 | 0 | case '8': { |
1934 | 0 | p++; |
1935 | 0 | match = 8; |
1936 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1937 | 0 | } |
1938 | 0 | case '9': { |
1939 | 0 | p++; |
1940 | 0 | match = 9; |
1941 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1942 | 0 | } |
1943 | 0 | case 'A': { |
1944 | 0 | p++; |
1945 | 0 | match = 10; |
1946 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1947 | 0 | } |
1948 | 0 | case 'B': { |
1949 | 0 | p++; |
1950 | 0 | match = 11; |
1951 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1952 | 0 | } |
1953 | 0 | case 'C': { |
1954 | 0 | p++; |
1955 | 0 | match = 12; |
1956 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1957 | 0 | } |
1958 | 0 | case 'D': { |
1959 | 0 | p++; |
1960 | 0 | match = 13; |
1961 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1962 | 0 | } |
1963 | 0 | case 'E': { |
1964 | 0 | p++; |
1965 | 0 | match = 14; |
1966 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1967 | 0 | } |
1968 | 0 | case 'F': { |
1969 | 0 | p++; |
1970 | 0 | match = 15; |
1971 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1972 | 0 | } |
1973 | 0 | case 'a': { |
1974 | 0 | p++; |
1975 | 0 | match = 10; |
1976 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1977 | 0 | } |
1978 | 0 | case 'b': { |
1979 | 0 | p++; |
1980 | 0 | match = 11; |
1981 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1982 | 0 | } |
1983 | 0 | case 'c': { |
1984 | 0 | p++; |
1985 | 0 | match = 12; |
1986 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1987 | 0 | } |
1988 | 0 | case 'd': { |
1989 | 0 | p++; |
1990 | 0 | match = 13; |
1991 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1992 | 0 | } |
1993 | 0 | case 'e': { |
1994 | 0 | p++; |
1995 | 0 | match = 14; |
1996 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
1997 | 0 | } |
1998 | 0 | case 'f': { |
1999 | 0 | p++; |
2000 | 0 | match = 15; |
2001 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length; |
2002 | 0 | } |
2003 | 0 | default: { |
2004 | 0 | goto s_n_llhttp__internal__n_error_37; |
2005 | 0 | } |
2006 | 0 | } |
2007 | 0 | /* UNREACHABLE */; |
2008 | 0 | abort(); |
2009 | 0 | } |
2010 | 0 | case s_n_llhttp__internal__n_invoke_update_content_length_1: |
2011 | 0 | s_n_llhttp__internal__n_invoke_update_content_length_1: { |
2012 | 0 | switch (llhttp__internal__c_update_content_length(state, p, endp)) { |
2013 | 0 | default: |
2014 | 0 | goto s_n_llhttp__internal__n_chunk_size_digit; |
2015 | 0 | } |
2016 | 0 | /* UNREACHABLE */; |
2017 | 0 | abort(); |
2018 | 0 | } |
2019 | 0 | case s_n_llhttp__internal__n_consume_content_length_1: |
2020 | 0 | s_n_llhttp__internal__n_consume_content_length_1: { |
2021 | 0 | size_t avail; |
2022 | 0 | uint64_t need; |
2023 | | |
2024 | 0 | avail = endp - p; |
2025 | 0 | need = state->content_length; |
2026 | 0 | if (avail >= need) { |
2027 | 0 | p += need; |
2028 | 0 | state->content_length = 0; |
2029 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_body_1; |
2030 | 0 | } |
2031 | | |
2032 | 0 | state->content_length -= avail; |
2033 | 0 | return s_n_llhttp__internal__n_consume_content_length_1; |
2034 | 0 | /* UNREACHABLE */; |
2035 | 0 | abort(); |
2036 | 0 | } |
2037 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_body_1: |
2038 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_body_1: { |
2039 | 0 | if (p == endp) { |
2040 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_body_1; |
2041 | 0 | } |
2042 | 0 | state->_span_pos0 = (void*) p; |
2043 | 0 | state->_span_cb0 = llhttp__on_body; |
2044 | 0 | goto s_n_llhttp__internal__n_consume_content_length_1; |
2045 | 0 | /* UNREACHABLE */; |
2046 | 0 | abort(); |
2047 | 0 | } |
2048 | 0 | case s_n_llhttp__internal__n_eof: |
2049 | 0 | s_n_llhttp__internal__n_eof: { |
2050 | 0 | if (p == endp) { |
2051 | 0 | return s_n_llhttp__internal__n_eof; |
2052 | 0 | } |
2053 | 0 | p++; |
2054 | 0 | goto s_n_llhttp__internal__n_eof; |
2055 | 0 | /* UNREACHABLE */; |
2056 | 0 | abort(); |
2057 | 0 | } |
2058 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_body_2: |
2059 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_body_2: { |
2060 | 0 | if (p == endp) { |
2061 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_body_2; |
2062 | 0 | } |
2063 | 0 | state->_span_pos0 = (void*) p; |
2064 | 0 | state->_span_cb0 = llhttp__on_body; |
2065 | 0 | goto s_n_llhttp__internal__n_eof; |
2066 | 0 | /* UNREACHABLE */; |
2067 | 0 | abort(); |
2068 | 0 | } |
2069 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete: |
2070 | 0 | s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete: { |
2071 | 0 | switch (llhttp__after_headers_complete(state, p, endp)) { |
2072 | 0 | case 1: |
2073 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1; |
2074 | 0 | case 2: |
2075 | 0 | goto s_n_llhttp__internal__n_invoke_update_content_length_1; |
2076 | 0 | case 3: |
2077 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_body_1; |
2078 | 0 | case 4: |
2079 | 0 | goto s_n_llhttp__internal__n_invoke_update_finish_3; |
2080 | 0 | case 5: |
2081 | 0 | goto s_n_llhttp__internal__n_error_39; |
2082 | 0 | default: |
2083 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete; |
2084 | 0 | } |
2085 | 0 | /* UNREACHABLE */; |
2086 | 0 | abort(); |
2087 | 0 | } |
2088 | 0 | case s_n_llhttp__internal__n_error_5: |
2089 | 0 | s_n_llhttp__internal__n_error_5: { |
2090 | 0 | state->error = 0xa; |
2091 | 0 | state->reason = "Invalid header field char"; |
2092 | 0 | state->error_pos = (const char*) p; |
2093 | 0 | state->_current = (void*) (intptr_t) s_error; |
2094 | 0 | return s_error; |
2095 | 0 | /* UNREACHABLE */; |
2096 | 0 | abort(); |
2097 | 0 | } |
2098 | 0 | case s_n_llhttp__internal__n_headers_almost_done: |
2099 | 0 | s_n_llhttp__internal__n_headers_almost_done: { |
2100 | 0 | if (p == endp) { |
2101 | 0 | return s_n_llhttp__internal__n_headers_almost_done; |
2102 | 0 | } |
2103 | 0 | switch (*p) { |
2104 | 0 | case 10: { |
2105 | 0 | p++; |
2106 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_1; |
2107 | 0 | } |
2108 | 0 | default: { |
2109 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_12; |
2110 | 0 | } |
2111 | 0 | } |
2112 | 0 | /* UNREACHABLE */; |
2113 | 0 | abort(); |
2114 | 0 | } |
2115 | 0 | case s_n_llhttp__internal__n_header_field_colon_discard_ws: |
2116 | 0 | s_n_llhttp__internal__n_header_field_colon_discard_ws: { |
2117 | 0 | if (p == endp) { |
2118 | 0 | return s_n_llhttp__internal__n_header_field_colon_discard_ws; |
2119 | 0 | } |
2120 | 0 | switch (*p) { |
2121 | 0 | case ' ': { |
2122 | 0 | p++; |
2123 | 0 | goto s_n_llhttp__internal__n_header_field_colon_discard_ws; |
2124 | 0 | } |
2125 | 0 | default: { |
2126 | 0 | goto s_n_llhttp__internal__n_header_field_colon; |
2127 | 0 | } |
2128 | 0 | } |
2129 | 0 | /* UNREACHABLE */; |
2130 | 0 | abort(); |
2131 | 0 | } |
2132 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: |
2133 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: { |
2134 | 0 | switch (llhttp__on_header_value_complete(state, p, endp)) { |
2135 | 0 | case 0: |
2136 | 0 | goto s_n_llhttp__internal__n_header_field_start; |
2137 | 0 | case 21: |
2138 | 0 | goto s_n_llhttp__internal__n_pause_18; |
2139 | 0 | default: |
2140 | 0 | goto s_n_llhttp__internal__n_error_48; |
2141 | 0 | } |
2142 | 0 | /* UNREACHABLE */; |
2143 | 0 | abort(); |
2144 | 0 | } |
2145 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_header_value: |
2146 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_header_value: { |
2147 | 0 | if (p == endp) { |
2148 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_header_value; |
2149 | 0 | } |
2150 | 0 | state->_span_pos0 = (void*) p; |
2151 | 0 | state->_span_cb0 = llhttp__on_header_value; |
2152 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value; |
2153 | 0 | /* UNREACHABLE */; |
2154 | 0 | abort(); |
2155 | 0 | } |
2156 | 0 | case s_n_llhttp__internal__n_header_value_discard_lws: |
2157 | 0 | s_n_llhttp__internal__n_header_value_discard_lws: { |
2158 | 0 | if (p == endp) { |
2159 | 0 | return s_n_llhttp__internal__n_header_value_discard_lws; |
2160 | 0 | } |
2161 | 0 | switch (*p) { |
2162 | 0 | case 9: { |
2163 | 0 | p++; |
2164 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15; |
2165 | 0 | } |
2166 | 0 | case ' ': { |
2167 | 0 | p++; |
2168 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15; |
2169 | 0 | } |
2170 | 0 | default: { |
2171 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_1; |
2172 | 0 | } |
2173 | 0 | } |
2174 | 0 | /* UNREACHABLE */; |
2175 | 0 | abort(); |
2176 | 0 | } |
2177 | 0 | case s_n_llhttp__internal__n_header_value_discard_ws_almost_done: |
2178 | 0 | s_n_llhttp__internal__n_header_value_discard_ws_almost_done: { |
2179 | 0 | if (p == endp) { |
2180 | 0 | return s_n_llhttp__internal__n_header_value_discard_ws_almost_done; |
2181 | 0 | } |
2182 | 0 | switch (*p) { |
2183 | 0 | case 10: { |
2184 | 0 | p++; |
2185 | 0 | goto s_n_llhttp__internal__n_header_value_discard_lws; |
2186 | 0 | } |
2187 | 0 | default: { |
2188 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_16; |
2189 | 0 | } |
2190 | 0 | } |
2191 | 0 | /* UNREACHABLE */; |
2192 | 0 | abort(); |
2193 | 0 | } |
2194 | 0 | case s_n_llhttp__internal__n_header_value_lws: |
2195 | 0 | s_n_llhttp__internal__n_header_value_lws: { |
2196 | 0 | if (p == endp) { |
2197 | 0 | return s_n_llhttp__internal__n_header_value_lws; |
2198 | 0 | } |
2199 | 0 | switch (*p) { |
2200 | 0 | case 9: { |
2201 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_18; |
2202 | 0 | } |
2203 | 0 | case ' ': { |
2204 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_18; |
2205 | 0 | } |
2206 | 0 | default: { |
2207 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_5; |
2208 | 0 | } |
2209 | 0 | } |
2210 | 0 | /* UNREACHABLE */; |
2211 | 0 | abort(); |
2212 | 0 | } |
2213 | 0 | case s_n_llhttp__internal__n_header_value_almost_done: |
2214 | 0 | s_n_llhttp__internal__n_header_value_almost_done: { |
2215 | 0 | if (p == endp) { |
2216 | 0 | return s_n_llhttp__internal__n_header_value_almost_done; |
2217 | 0 | } |
2218 | 0 | switch (*p) { |
2219 | 0 | case 10: { |
2220 | 0 | p++; |
2221 | 0 | goto s_n_llhttp__internal__n_header_value_lws; |
2222 | 0 | } |
2223 | 0 | default: { |
2224 | 0 | goto s_n_llhttp__internal__n_error_53; |
2225 | 0 | } |
2226 | 0 | } |
2227 | 0 | /* UNREACHABLE */; |
2228 | 0 | abort(); |
2229 | 0 | } |
2230 | 0 | case s_n_llhttp__internal__n_invoke_test_lenient_flags_17: |
2231 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_17: { |
2232 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
2233 | 0 | case 1: |
2234 | 0 | goto s_n_llhttp__internal__n_header_value_almost_done; |
2235 | 0 | default: |
2236 | 0 | goto s_n_llhttp__internal__n_error_51; |
2237 | 0 | } |
2238 | 0 | /* UNREACHABLE */; |
2239 | 0 | abort(); |
2240 | 0 | } |
2241 | 0 | case s_n_llhttp__internal__n_header_value_lenient: |
2242 | 0 | s_n_llhttp__internal__n_header_value_lenient: { |
2243 | 0 | if (p == endp) { |
2244 | 0 | return s_n_llhttp__internal__n_header_value_lenient; |
2245 | 0 | } |
2246 | 0 | switch (*p) { |
2247 | 0 | case 10: { |
2248 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4; |
2249 | 0 | } |
2250 | 0 | case 13: { |
2251 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5; |
2252 | 0 | } |
2253 | 0 | default: { |
2254 | 0 | p++; |
2255 | 0 | goto s_n_llhttp__internal__n_header_value_lenient; |
2256 | 0 | } |
2257 | 0 | } |
2258 | 0 | /* UNREACHABLE */; |
2259 | 0 | abort(); |
2260 | 0 | } |
2261 | 0 | case s_n_llhttp__internal__n_error_54: |
2262 | 0 | s_n_llhttp__internal__n_error_54: { |
2263 | 0 | state->error = 0xa; |
2264 | 0 | state->reason = "Invalid header value char"; |
2265 | 0 | state->error_pos = (const char*) p; |
2266 | 0 | state->_current = (void*) (intptr_t) s_error; |
2267 | 0 | return s_error; |
2268 | 0 | /* UNREACHABLE */; |
2269 | 0 | abort(); |
2270 | 0 | } |
2271 | 0 | case s_n_llhttp__internal__n_header_value_otherwise: |
2272 | 0 | s_n_llhttp__internal__n_header_value_otherwise: { |
2273 | 0 | if (p == endp) { |
2274 | 0 | return s_n_llhttp__internal__n_header_value_otherwise; |
2275 | 0 | } |
2276 | 0 | switch (*p) { |
2277 | 0 | case 10: { |
2278 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1; |
2279 | 0 | } |
2280 | 0 | case 13: { |
2281 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; |
2282 | 0 | } |
2283 | 0 | default: { |
2284 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_19; |
2285 | 0 | } |
2286 | 0 | } |
2287 | 0 | /* UNREACHABLE */; |
2288 | 0 | abort(); |
2289 | 0 | } |
2290 | 0 | case s_n_llhttp__internal__n_header_value_connection_token: |
2291 | 0 | s_n_llhttp__internal__n_header_value_connection_token: { |
2292 | 0 | static uint8_t lookup_table[] = { |
2293 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
2294 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2295 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, |
2296 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2297 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2298 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2299 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2300 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
2301 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2302 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2303 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2304 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2305 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2306 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2307 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2308 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
2309 | 0 | }; |
2310 | 0 | if (p == endp) { |
2311 | 0 | return s_n_llhttp__internal__n_header_value_connection_token; |
2312 | 0 | } |
2313 | 0 | switch (lookup_table[(uint8_t) *p]) { |
2314 | 0 | case 1: { |
2315 | 0 | p++; |
2316 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
2317 | 0 | } |
2318 | 0 | case 2: { |
2319 | 0 | p++; |
2320 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
2321 | 0 | } |
2322 | 0 | default: { |
2323 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
2324 | 0 | } |
2325 | 0 | } |
2326 | 0 | /* UNREACHABLE */; |
2327 | 0 | abort(); |
2328 | 0 | } |
2329 | 0 | case s_n_llhttp__internal__n_header_value_connection_ws: |
2330 | 0 | s_n_llhttp__internal__n_header_value_connection_ws: { |
2331 | 0 | if (p == endp) { |
2332 | 0 | return s_n_llhttp__internal__n_header_value_connection_ws; |
2333 | 0 | } |
2334 | 0 | switch (*p) { |
2335 | 0 | case 10: { |
2336 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
2337 | 0 | } |
2338 | 0 | case 13: { |
2339 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
2340 | 0 | } |
2341 | 0 | case ' ': { |
2342 | 0 | p++; |
2343 | 0 | goto s_n_llhttp__internal__n_header_value_connection_ws; |
2344 | 0 | } |
2345 | 0 | case ',': { |
2346 | 0 | p++; |
2347 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_6; |
2348 | 0 | } |
2349 | 0 | default: { |
2350 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_5; |
2351 | 0 | } |
2352 | 0 | } |
2353 | 0 | /* UNREACHABLE */; |
2354 | 0 | abort(); |
2355 | 0 | } |
2356 | 0 | case s_n_llhttp__internal__n_header_value_connection_1: |
2357 | 0 | s_n_llhttp__internal__n_header_value_connection_1: { |
2358 | 0 | llparse_match_t match_seq; |
2359 | | |
2360 | 0 | if (p == endp) { |
2361 | 0 | return s_n_llhttp__internal__n_header_value_connection_1; |
2362 | 0 | } |
2363 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 4); |
2364 | 0 | p = match_seq.current; |
2365 | 0 | switch (match_seq.status) { |
2366 | 0 | case kMatchComplete: { |
2367 | 0 | p++; |
2368 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_3; |
2369 | 0 | } |
2370 | 0 | case kMatchPause: { |
2371 | 0 | return s_n_llhttp__internal__n_header_value_connection_1; |
2372 | 0 | } |
2373 | 0 | case kMatchMismatch: { |
2374 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
2375 | 0 | } |
2376 | 0 | } |
2377 | 0 | /* UNREACHABLE */; |
2378 | 0 | abort(); |
2379 | 0 | } |
2380 | 0 | case s_n_llhttp__internal__n_header_value_connection_2: |
2381 | 0 | s_n_llhttp__internal__n_header_value_connection_2: { |
2382 | 0 | llparse_match_t match_seq; |
2383 | | |
2384 | 0 | if (p == endp) { |
2385 | 0 | return s_n_llhttp__internal__n_header_value_connection_2; |
2386 | 0 | } |
2387 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 9); |
2388 | 0 | p = match_seq.current; |
2389 | 0 | switch (match_seq.status) { |
2390 | 0 | case kMatchComplete: { |
2391 | 0 | p++; |
2392 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_6; |
2393 | 0 | } |
2394 | 0 | case kMatchPause: { |
2395 | 0 | return s_n_llhttp__internal__n_header_value_connection_2; |
2396 | 0 | } |
2397 | 0 | case kMatchMismatch: { |
2398 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
2399 | 0 | } |
2400 | 0 | } |
2401 | 0 | /* UNREACHABLE */; |
2402 | 0 | abort(); |
2403 | 0 | } |
2404 | 0 | case s_n_llhttp__internal__n_header_value_connection_3: |
2405 | 0 | s_n_llhttp__internal__n_header_value_connection_3: { |
2406 | 0 | llparse_match_t match_seq; |
2407 | | |
2408 | 0 | if (p == endp) { |
2409 | 0 | return s_n_llhttp__internal__n_header_value_connection_3; |
2410 | 0 | } |
2411 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 6); |
2412 | 0 | p = match_seq.current; |
2413 | 0 | switch (match_seq.status) { |
2414 | 0 | case kMatchComplete: { |
2415 | 0 | p++; |
2416 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_7; |
2417 | 0 | } |
2418 | 0 | case kMatchPause: { |
2419 | 0 | return s_n_llhttp__internal__n_header_value_connection_3; |
2420 | 0 | } |
2421 | 0 | case kMatchMismatch: { |
2422 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
2423 | 0 | } |
2424 | 0 | } |
2425 | 0 | /* UNREACHABLE */; |
2426 | 0 | abort(); |
2427 | 0 | } |
2428 | 0 | case s_n_llhttp__internal__n_header_value_connection: |
2429 | 0 | s_n_llhttp__internal__n_header_value_connection: { |
2430 | 0 | if (p == endp) { |
2431 | 0 | return s_n_llhttp__internal__n_header_value_connection; |
2432 | 0 | } |
2433 | 0 | switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) { |
2434 | 0 | case 9: { |
2435 | 0 | p++; |
2436 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
2437 | 0 | } |
2438 | 0 | case ' ': { |
2439 | 0 | p++; |
2440 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
2441 | 0 | } |
2442 | 0 | case 'c': { |
2443 | 0 | p++; |
2444 | 0 | goto s_n_llhttp__internal__n_header_value_connection_1; |
2445 | 0 | } |
2446 | 0 | case 'k': { |
2447 | 0 | p++; |
2448 | 0 | goto s_n_llhttp__internal__n_header_value_connection_2; |
2449 | 0 | } |
2450 | 0 | case 'u': { |
2451 | 0 | p++; |
2452 | 0 | goto s_n_llhttp__internal__n_header_value_connection_3; |
2453 | 0 | } |
2454 | 0 | default: { |
2455 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
2456 | 0 | } |
2457 | 0 | } |
2458 | 0 | /* UNREACHABLE */; |
2459 | 0 | abort(); |
2460 | 0 | } |
2461 | 0 | case s_n_llhttp__internal__n_error_56: |
2462 | 0 | s_n_llhttp__internal__n_error_56: { |
2463 | 0 | state->error = 0xb; |
2464 | 0 | state->reason = "Content-Length overflow"; |
2465 | 0 | state->error_pos = (const char*) p; |
2466 | 0 | state->_current = (void*) (intptr_t) s_error; |
2467 | 0 | return s_error; |
2468 | 0 | /* UNREACHABLE */; |
2469 | 0 | abort(); |
2470 | 0 | } |
2471 | 0 | case s_n_llhttp__internal__n_error_57: |
2472 | 0 | s_n_llhttp__internal__n_error_57: { |
2473 | 0 | state->error = 0xb; |
2474 | 0 | state->reason = "Invalid character in Content-Length"; |
2475 | 0 | state->error_pos = (const char*) p; |
2476 | 0 | state->_current = (void*) (intptr_t) s_error; |
2477 | 0 | return s_error; |
2478 | 0 | /* UNREACHABLE */; |
2479 | 0 | abort(); |
2480 | 0 | } |
2481 | 0 | case s_n_llhttp__internal__n_header_value_content_length_ws: |
2482 | 0 | s_n_llhttp__internal__n_header_value_content_length_ws: { |
2483 | 0 | if (p == endp) { |
2484 | 0 | return s_n_llhttp__internal__n_header_value_content_length_ws; |
2485 | 0 | } |
2486 | 0 | switch (*p) { |
2487 | 0 | case 10: { |
2488 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_17; |
2489 | 0 | } |
2490 | 0 | case 13: { |
2491 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_17; |
2492 | 0 | } |
2493 | 0 | case ' ': { |
2494 | 0 | p++; |
2495 | 0 | goto s_n_llhttp__internal__n_header_value_content_length_ws; |
2496 | 0 | } |
2497 | 0 | default: { |
2498 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7; |
2499 | 0 | } |
2500 | 0 | } |
2501 | 0 | /* UNREACHABLE */; |
2502 | 0 | abort(); |
2503 | 0 | } |
2504 | 0 | case s_n_llhttp__internal__n_header_value_content_length: |
2505 | 0 | s_n_llhttp__internal__n_header_value_content_length: { |
2506 | 0 | if (p == endp) { |
2507 | 0 | return s_n_llhttp__internal__n_header_value_content_length; |
2508 | 0 | } |
2509 | 0 | switch (*p) { |
2510 | 0 | case '0': { |
2511 | 0 | p++; |
2512 | 0 | match = 0; |
2513 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2514 | 0 | } |
2515 | 0 | case '1': { |
2516 | 0 | p++; |
2517 | 0 | match = 1; |
2518 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2519 | 0 | } |
2520 | 0 | case '2': { |
2521 | 0 | p++; |
2522 | 0 | match = 2; |
2523 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2524 | 0 | } |
2525 | 0 | case '3': { |
2526 | 0 | p++; |
2527 | 0 | match = 3; |
2528 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2529 | 0 | } |
2530 | 0 | case '4': { |
2531 | 0 | p++; |
2532 | 0 | match = 4; |
2533 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2534 | 0 | } |
2535 | 0 | case '5': { |
2536 | 0 | p++; |
2537 | 0 | match = 5; |
2538 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2539 | 0 | } |
2540 | 0 | case '6': { |
2541 | 0 | p++; |
2542 | 0 | match = 6; |
2543 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2544 | 0 | } |
2545 | 0 | case '7': { |
2546 | 0 | p++; |
2547 | 0 | match = 7; |
2548 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2549 | 0 | } |
2550 | 0 | case '8': { |
2551 | 0 | p++; |
2552 | 0 | match = 8; |
2553 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2554 | 0 | } |
2555 | 0 | case '9': { |
2556 | 0 | p++; |
2557 | 0 | match = 9; |
2558 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1; |
2559 | 0 | } |
2560 | 0 | default: { |
2561 | 0 | goto s_n_llhttp__internal__n_header_value_content_length_ws; |
2562 | 0 | } |
2563 | 0 | } |
2564 | 0 | /* UNREACHABLE */; |
2565 | 0 | abort(); |
2566 | 0 | } |
2567 | 0 | case s_n_llhttp__internal__n_error_59: |
2568 | 0 | s_n_llhttp__internal__n_error_59: { |
2569 | 0 | state->error = 0xf; |
2570 | 0 | state->reason = "Invalid `Transfer-Encoding` header value"; |
2571 | 0 | state->error_pos = (const char*) p; |
2572 | 0 | state->_current = (void*) (intptr_t) s_error; |
2573 | 0 | return s_error; |
2574 | 0 | /* UNREACHABLE */; |
2575 | 0 | abort(); |
2576 | 0 | } |
2577 | 0 | case s_n_llhttp__internal__n_error_58: |
2578 | 0 | s_n_llhttp__internal__n_error_58: { |
2579 | 0 | state->error = 0xf; |
2580 | 0 | state->reason = "Invalid `Transfer-Encoding` header value"; |
2581 | 0 | state->error_pos = (const char*) p; |
2582 | 0 | state->_current = (void*) (intptr_t) s_error; |
2583 | 0 | return s_error; |
2584 | 0 | /* UNREACHABLE */; |
2585 | 0 | abort(); |
2586 | 0 | } |
2587 | 0 | case s_n_llhttp__internal__n_header_value_te_token_ows: |
2588 | 0 | s_n_llhttp__internal__n_header_value_te_token_ows: { |
2589 | 0 | if (p == endp) { |
2590 | 0 | return s_n_llhttp__internal__n_header_value_te_token_ows; |
2591 | 0 | } |
2592 | 0 | switch (*p) { |
2593 | 0 | case 9: { |
2594 | 0 | p++; |
2595 | 0 | goto s_n_llhttp__internal__n_header_value_te_token_ows; |
2596 | 0 | } |
2597 | 0 | case ' ': { |
2598 | 0 | p++; |
2599 | 0 | goto s_n_llhttp__internal__n_header_value_te_token_ows; |
2600 | 0 | } |
2601 | 0 | default: { |
2602 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked; |
2603 | 0 | } |
2604 | 0 | } |
2605 | 0 | /* UNREACHABLE */; |
2606 | 0 | abort(); |
2607 | 0 | } |
2608 | 0 | case s_n_llhttp__internal__n_header_value: |
2609 | 0 | s_n_llhttp__internal__n_header_value: { |
2610 | 0 | static uint8_t lookup_table[] = { |
2611 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
2612 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2613 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2614 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2615 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2616 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2617 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2618 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
2619 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2620 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2621 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2622 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2623 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2624 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2625 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2626 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
2627 | 0 | }; |
2628 | 0 | if (p == endp) { |
2629 | 0 | return s_n_llhttp__internal__n_header_value; |
2630 | 0 | } |
2631 | | #ifdef __SSE4_2__ |
2632 | | if (endp - p >= 16) { |
2633 | | __m128i ranges; |
2634 | | __m128i input; |
2635 | | int avail; |
2636 | | int match_len; |
2637 | | |
2638 | | /* Load input */ |
2639 | | input = _mm_loadu_si128((__m128i const*) p); |
2640 | | ranges = _mm_loadu_si128((__m128i const*) llparse_blob6); |
2641 | | |
2642 | | /* Find first character that does not match `ranges` */ |
2643 | | match_len = _mm_cmpestri(ranges, 6, |
2644 | | input, 16, |
2645 | | _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES | |
2646 | | _SIDD_NEGATIVE_POLARITY); |
2647 | | |
2648 | | if (match_len != 0) { |
2649 | | p += match_len; |
2650 | | goto s_n_llhttp__internal__n_header_value; |
2651 | | } |
2652 | | goto s_n_llhttp__internal__n_header_value_otherwise; |
2653 | | } |
2654 | | #endif /* __SSE4_2__ */ |
2655 | 0 | switch (lookup_table[(uint8_t) *p]) { |
2656 | 0 | case 1: { |
2657 | 0 | p++; |
2658 | 0 | goto s_n_llhttp__internal__n_header_value; |
2659 | 0 | } |
2660 | 0 | default: { |
2661 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
2662 | 0 | } |
2663 | 0 | } |
2664 | 0 | /* UNREACHABLE */; |
2665 | 0 | abort(); |
2666 | 0 | } |
2667 | 0 | case s_n_llhttp__internal__n_header_value_te_token: |
2668 | 0 | s_n_llhttp__internal__n_header_value_te_token: { |
2669 | 0 | static uint8_t lookup_table[] = { |
2670 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, |
2671 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2672 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, |
2673 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2674 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2675 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2676 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2677 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
2678 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2679 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2680 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2681 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2682 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2683 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2684 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2685 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
2686 | 0 | }; |
2687 | 0 | if (p == endp) { |
2688 | 0 | return s_n_llhttp__internal__n_header_value_te_token; |
2689 | 0 | } |
2690 | 0 | switch (lookup_table[(uint8_t) *p]) { |
2691 | 0 | case 1: { |
2692 | 0 | p++; |
2693 | 0 | goto s_n_llhttp__internal__n_header_value_te_token; |
2694 | 0 | } |
2695 | 0 | case 2: { |
2696 | 0 | p++; |
2697 | 0 | goto s_n_llhttp__internal__n_header_value_te_token_ows; |
2698 | 0 | } |
2699 | 0 | default: { |
2700 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_9; |
2701 | 0 | } |
2702 | 0 | } |
2703 | 0 | /* UNREACHABLE */; |
2704 | 0 | abort(); |
2705 | 0 | } |
2706 | 0 | case s_n_llhttp__internal__n_header_value_te_chunked_last: |
2707 | 0 | s_n_llhttp__internal__n_header_value_te_chunked_last: { |
2708 | 0 | if (p == endp) { |
2709 | 0 | return s_n_llhttp__internal__n_header_value_te_chunked_last; |
2710 | 0 | } |
2711 | 0 | switch (*p) { |
2712 | 0 | case 10: { |
2713 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_8; |
2714 | 0 | } |
2715 | 0 | case 13: { |
2716 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_8; |
2717 | 0 | } |
2718 | 0 | case ' ': { |
2719 | 0 | p++; |
2720 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked_last; |
2721 | 0 | } |
2722 | 0 | case ',': { |
2723 | 0 | goto s_n_llhttp__internal__n_invoke_load_type_1; |
2724 | 0 | } |
2725 | 0 | default: { |
2726 | 0 | goto s_n_llhttp__internal__n_header_value_te_token; |
2727 | 0 | } |
2728 | 0 | } |
2729 | 0 | /* UNREACHABLE */; |
2730 | 0 | abort(); |
2731 | 0 | } |
2732 | 0 | case s_n_llhttp__internal__n_header_value_te_chunked: |
2733 | 0 | s_n_llhttp__internal__n_header_value_te_chunked: { |
2734 | 0 | llparse_match_t match_seq; |
2735 | | |
2736 | 0 | if (p == endp) { |
2737 | 0 | return s_n_llhttp__internal__n_header_value_te_chunked; |
2738 | 0 | } |
2739 | 0 | match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob5, 7); |
2740 | 0 | p = match_seq.current; |
2741 | 0 | switch (match_seq.status) { |
2742 | 0 | case kMatchComplete: { |
2743 | 0 | p++; |
2744 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked_last; |
2745 | 0 | } |
2746 | 0 | case kMatchPause: { |
2747 | 0 | return s_n_llhttp__internal__n_header_value_te_chunked; |
2748 | 0 | } |
2749 | 0 | case kMatchMismatch: { |
2750 | 0 | goto s_n_llhttp__internal__n_header_value_te_token; |
2751 | 0 | } |
2752 | 0 | } |
2753 | 0 | /* UNREACHABLE */; |
2754 | 0 | abort(); |
2755 | 0 | } |
2756 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1: |
2757 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1: { |
2758 | 0 | if (p == endp) { |
2759 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1; |
2760 | 0 | } |
2761 | 0 | state->_span_pos0 = (void*) p; |
2762 | 0 | state->_span_cb0 = llhttp__on_header_value; |
2763 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_3; |
2764 | 0 | /* UNREACHABLE */; |
2765 | 0 | abort(); |
2766 | 0 | } |
2767 | 0 | case s_n_llhttp__internal__n_header_value_discard_ws: |
2768 | 0 | s_n_llhttp__internal__n_header_value_discard_ws: { |
2769 | 0 | if (p == endp) { |
2770 | 0 | return s_n_llhttp__internal__n_header_value_discard_ws; |
2771 | 0 | } |
2772 | 0 | switch (*p) { |
2773 | 0 | case 9: { |
2774 | 0 | p++; |
2775 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
2776 | 0 | } |
2777 | 0 | case 10: { |
2778 | 0 | p++; |
2779 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_14; |
2780 | 0 | } |
2781 | 0 | case 13: { |
2782 | 0 | p++; |
2783 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws_almost_done; |
2784 | 0 | } |
2785 | 0 | case ' ': { |
2786 | 0 | p++; |
2787 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
2788 | 0 | } |
2789 | 0 | default: { |
2790 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1; |
2791 | 0 | } |
2792 | 0 | } |
2793 | 0 | /* UNREACHABLE */; |
2794 | 0 | abort(); |
2795 | 0 | } |
2796 | 0 | case s_n_llhttp__internal__n_invoke_load_header_state: |
2797 | 0 | s_n_llhttp__internal__n_invoke_load_header_state: { |
2798 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
2799 | 0 | case 2: |
2800 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_4; |
2801 | 0 | case 3: |
2802 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_5; |
2803 | 0 | default: |
2804 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
2805 | 0 | } |
2806 | 0 | /* UNREACHABLE */; |
2807 | 0 | abort(); |
2808 | 0 | } |
2809 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete: |
2810 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete: { |
2811 | 0 | switch (llhttp__on_header_field_complete(state, p, endp)) { |
2812 | 0 | case 0: |
2813 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state; |
2814 | 0 | case 21: |
2815 | 0 | goto s_n_llhttp__internal__n_pause_19; |
2816 | 0 | default: |
2817 | 0 | goto s_n_llhttp__internal__n_error_45; |
2818 | 0 | } |
2819 | 0 | /* UNREACHABLE */; |
2820 | 0 | abort(); |
2821 | 0 | } |
2822 | 0 | case s_n_llhttp__internal__n_header_field_general_otherwise: |
2823 | 0 | s_n_llhttp__internal__n_header_field_general_otherwise: { |
2824 | 0 | if (p == endp) { |
2825 | 0 | return s_n_llhttp__internal__n_header_field_general_otherwise; |
2826 | 0 | } |
2827 | 0 | switch (*p) { |
2828 | 0 | case ':': { |
2829 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2; |
2830 | 0 | } |
2831 | 0 | default: { |
2832 | 0 | goto s_n_llhttp__internal__n_error_62; |
2833 | 0 | } |
2834 | 0 | } |
2835 | 0 | /* UNREACHABLE */; |
2836 | 0 | abort(); |
2837 | 0 | } |
2838 | 0 | case s_n_llhttp__internal__n_header_field_general: |
2839 | 0 | s_n_llhttp__internal__n_header_field_general: { |
2840 | 0 | static uint8_t lookup_table[] = { |
2841 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2842 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2843 | 0 | 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, |
2844 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, |
2845 | 0 | 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2846 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, |
2847 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2848 | 0 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, |
2849 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2850 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2851 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2852 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2853 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2854 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2855 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2856 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
2857 | 0 | }; |
2858 | 0 | if (p == endp) { |
2859 | 0 | return s_n_llhttp__internal__n_header_field_general; |
2860 | 0 | } |
2861 | | #ifdef __SSE4_2__ |
2862 | | if (endp - p >= 16) { |
2863 | | __m128i ranges; |
2864 | | __m128i input; |
2865 | | int avail; |
2866 | | int match_len; |
2867 | | |
2868 | | /* Load input */ |
2869 | | input = _mm_loadu_si128((__m128i const*) p); |
2870 | | ranges = _mm_loadu_si128((__m128i const*) llparse_blob7); |
2871 | | |
2872 | | /* Find first character that does not match `ranges` */ |
2873 | | match_len = _mm_cmpestri(ranges, 16, |
2874 | | input, 16, |
2875 | | _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES | |
2876 | | _SIDD_NEGATIVE_POLARITY); |
2877 | | |
2878 | | if (match_len != 0) { |
2879 | | p += match_len; |
2880 | | goto s_n_llhttp__internal__n_header_field_general; |
2881 | | } |
2882 | | ranges = _mm_loadu_si128((__m128i const*) llparse_blob8); |
2883 | | |
2884 | | /* Find first character that does not match `ranges` */ |
2885 | | match_len = _mm_cmpestri(ranges, 2, |
2886 | | input, 16, |
2887 | | _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES | |
2888 | | _SIDD_NEGATIVE_POLARITY); |
2889 | | |
2890 | | if (match_len != 0) { |
2891 | | p += match_len; |
2892 | | goto s_n_llhttp__internal__n_header_field_general; |
2893 | | } |
2894 | | goto s_n_llhttp__internal__n_header_field_general_otherwise; |
2895 | | } |
2896 | | #endif /* __SSE4_2__ */ |
2897 | 0 | switch (lookup_table[(uint8_t) *p]) { |
2898 | 0 | case 1: { |
2899 | 0 | p++; |
2900 | 0 | goto s_n_llhttp__internal__n_header_field_general; |
2901 | 0 | } |
2902 | 0 | default: { |
2903 | 0 | goto s_n_llhttp__internal__n_header_field_general_otherwise; |
2904 | 0 | } |
2905 | 0 | } |
2906 | 0 | /* UNREACHABLE */; |
2907 | 0 | abort(); |
2908 | 0 | } |
2909 | 0 | case s_n_llhttp__internal__n_header_field_colon: |
2910 | 0 | s_n_llhttp__internal__n_header_field_colon: { |
2911 | 0 | if (p == endp) { |
2912 | 0 | return s_n_llhttp__internal__n_header_field_colon; |
2913 | 0 | } |
2914 | 0 | switch (*p) { |
2915 | 0 | case ' ': { |
2916 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_13; |
2917 | 0 | } |
2918 | 0 | case ':': { |
2919 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; |
2920 | 0 | } |
2921 | 0 | default: { |
2922 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_10; |
2923 | 0 | } |
2924 | 0 | } |
2925 | 0 | /* UNREACHABLE */; |
2926 | 0 | abort(); |
2927 | 0 | } |
2928 | 0 | case s_n_llhttp__internal__n_header_field_3: |
2929 | 0 | s_n_llhttp__internal__n_header_field_3: { |
2930 | 0 | llparse_match_t match_seq; |
2931 | | |
2932 | 0 | if (p == endp) { |
2933 | 0 | return s_n_llhttp__internal__n_header_field_3; |
2934 | 0 | } |
2935 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 6); |
2936 | 0 | p = match_seq.current; |
2937 | 0 | switch (match_seq.status) { |
2938 | 0 | case kMatchComplete: { |
2939 | 0 | p++; |
2940 | 0 | match = 1; |
2941 | 0 | goto s_n_llhttp__internal__n_invoke_store_header_state; |
2942 | 0 | } |
2943 | 0 | case kMatchPause: { |
2944 | 0 | return s_n_llhttp__internal__n_header_field_3; |
2945 | 0 | } |
2946 | 0 | case kMatchMismatch: { |
2947 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
2948 | 0 | } |
2949 | 0 | } |
2950 | 0 | /* UNREACHABLE */; |
2951 | 0 | abort(); |
2952 | 0 | } |
2953 | 0 | case s_n_llhttp__internal__n_header_field_4: |
2954 | 0 | s_n_llhttp__internal__n_header_field_4: { |
2955 | 0 | llparse_match_t match_seq; |
2956 | | |
2957 | 0 | if (p == endp) { |
2958 | 0 | return s_n_llhttp__internal__n_header_field_4; |
2959 | 0 | } |
2960 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob9, 10); |
2961 | 0 | p = match_seq.current; |
2962 | 0 | switch (match_seq.status) { |
2963 | 0 | case kMatchComplete: { |
2964 | 0 | p++; |
2965 | 0 | match = 2; |
2966 | 0 | goto s_n_llhttp__internal__n_invoke_store_header_state; |
2967 | 0 | } |
2968 | 0 | case kMatchPause: { |
2969 | 0 | return s_n_llhttp__internal__n_header_field_4; |
2970 | 0 | } |
2971 | 0 | case kMatchMismatch: { |
2972 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
2973 | 0 | } |
2974 | 0 | } |
2975 | 0 | /* UNREACHABLE */; |
2976 | 0 | abort(); |
2977 | 0 | } |
2978 | 0 | case s_n_llhttp__internal__n_header_field_2: |
2979 | 0 | s_n_llhttp__internal__n_header_field_2: { |
2980 | 0 | if (p == endp) { |
2981 | 0 | return s_n_llhttp__internal__n_header_field_2; |
2982 | 0 | } |
2983 | 0 | switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) { |
2984 | 0 | case 'n': { |
2985 | 0 | p++; |
2986 | 0 | goto s_n_llhttp__internal__n_header_field_3; |
2987 | 0 | } |
2988 | 0 | case 't': { |
2989 | 0 | p++; |
2990 | 0 | goto s_n_llhttp__internal__n_header_field_4; |
2991 | 0 | } |
2992 | 0 | default: { |
2993 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
2994 | 0 | } |
2995 | 0 | } |
2996 | 0 | /* UNREACHABLE */; |
2997 | 0 | abort(); |
2998 | 0 | } |
2999 | 0 | case s_n_llhttp__internal__n_header_field_1: |
3000 | 0 | s_n_llhttp__internal__n_header_field_1: { |
3001 | 0 | llparse_match_t match_seq; |
3002 | | |
3003 | 0 | if (p == endp) { |
3004 | 0 | return s_n_llhttp__internal__n_header_field_1; |
3005 | 0 | } |
3006 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob0, 2); |
3007 | 0 | p = match_seq.current; |
3008 | 0 | switch (match_seq.status) { |
3009 | 0 | case kMatchComplete: { |
3010 | 0 | p++; |
3011 | 0 | goto s_n_llhttp__internal__n_header_field_2; |
3012 | 0 | } |
3013 | 0 | case kMatchPause: { |
3014 | 0 | return s_n_llhttp__internal__n_header_field_1; |
3015 | 0 | } |
3016 | 0 | case kMatchMismatch: { |
3017 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
3018 | 0 | } |
3019 | 0 | } |
3020 | 0 | /* UNREACHABLE */; |
3021 | 0 | abort(); |
3022 | 0 | } |
3023 | 0 | case s_n_llhttp__internal__n_header_field_5: |
3024 | 0 | s_n_llhttp__internal__n_header_field_5: { |
3025 | 0 | llparse_match_t match_seq; |
3026 | | |
3027 | 0 | if (p == endp) { |
3028 | 0 | return s_n_llhttp__internal__n_header_field_5; |
3029 | 0 | } |
3030 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 15); |
3031 | 0 | p = match_seq.current; |
3032 | 0 | switch (match_seq.status) { |
3033 | 0 | case kMatchComplete: { |
3034 | 0 | p++; |
3035 | 0 | match = 1; |
3036 | 0 | goto s_n_llhttp__internal__n_invoke_store_header_state; |
3037 | 0 | } |
3038 | 0 | case kMatchPause: { |
3039 | 0 | return s_n_llhttp__internal__n_header_field_5; |
3040 | 0 | } |
3041 | 0 | case kMatchMismatch: { |
3042 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
3043 | 0 | } |
3044 | 0 | } |
3045 | 0 | /* UNREACHABLE */; |
3046 | 0 | abort(); |
3047 | 0 | } |
3048 | 0 | case s_n_llhttp__internal__n_header_field_6: |
3049 | 0 | s_n_llhttp__internal__n_header_field_6: { |
3050 | 0 | llparse_match_t match_seq; |
3051 | | |
3052 | 0 | if (p == endp) { |
3053 | 0 | return s_n_llhttp__internal__n_header_field_6; |
3054 | 0 | } |
3055 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 16); |
3056 | 0 | p = match_seq.current; |
3057 | 0 | switch (match_seq.status) { |
3058 | 0 | case kMatchComplete: { |
3059 | 0 | p++; |
3060 | 0 | match = 3; |
3061 | 0 | goto s_n_llhttp__internal__n_invoke_store_header_state; |
3062 | 0 | } |
3063 | 0 | case kMatchPause: { |
3064 | 0 | return s_n_llhttp__internal__n_header_field_6; |
3065 | 0 | } |
3066 | 0 | case kMatchMismatch: { |
3067 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
3068 | 0 | } |
3069 | 0 | } |
3070 | 0 | /* UNREACHABLE */; |
3071 | 0 | abort(); |
3072 | 0 | } |
3073 | 0 | case s_n_llhttp__internal__n_header_field_7: |
3074 | 0 | s_n_llhttp__internal__n_header_field_7: { |
3075 | 0 | llparse_match_t match_seq; |
3076 | | |
3077 | 0 | if (p == endp) { |
3078 | 0 | return s_n_llhttp__internal__n_header_field_7; |
3079 | 0 | } |
3080 | 0 | match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 6); |
3081 | 0 | p = match_seq.current; |
3082 | 0 | switch (match_seq.status) { |
3083 | 0 | case kMatchComplete: { |
3084 | 0 | p++; |
3085 | 0 | match = 4; |
3086 | 0 | goto s_n_llhttp__internal__n_invoke_store_header_state; |
3087 | 0 | } |
3088 | 0 | case kMatchPause: { |
3089 | 0 | return s_n_llhttp__internal__n_header_field_7; |
3090 | 0 | } |
3091 | 0 | case kMatchMismatch: { |
3092 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
3093 | 0 | } |
3094 | 0 | } |
3095 | 0 | /* UNREACHABLE */; |
3096 | 0 | abort(); |
3097 | 0 | } |
3098 | 0 | case s_n_llhttp__internal__n_header_field: |
3099 | 0 | s_n_llhttp__internal__n_header_field: { |
3100 | 0 | if (p == endp) { |
3101 | 0 | return s_n_llhttp__internal__n_header_field; |
3102 | 0 | } |
3103 | 0 | switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) { |
3104 | 0 | case 'c': { |
3105 | 0 | p++; |
3106 | 0 | goto s_n_llhttp__internal__n_header_field_1; |
3107 | 0 | } |
3108 | 0 | case 'p': { |
3109 | 0 | p++; |
3110 | 0 | goto s_n_llhttp__internal__n_header_field_5; |
3111 | 0 | } |
3112 | 0 | case 't': { |
3113 | 0 | p++; |
3114 | 0 | goto s_n_llhttp__internal__n_header_field_6; |
3115 | 0 | } |
3116 | 0 | case 'u': { |
3117 | 0 | p++; |
3118 | 0 | goto s_n_llhttp__internal__n_header_field_7; |
3119 | 0 | } |
3120 | 0 | default: { |
3121 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_11; |
3122 | 0 | } |
3123 | 0 | } |
3124 | 0 | /* UNREACHABLE */; |
3125 | 0 | abort(); |
3126 | 0 | } |
3127 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_header_field: |
3128 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_header_field: { |
3129 | 0 | if (p == endp) { |
3130 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_header_field; |
3131 | 0 | } |
3132 | 0 | state->_span_pos0 = (void*) p; |
3133 | 0 | state->_span_cb0 = llhttp__on_header_field; |
3134 | 0 | goto s_n_llhttp__internal__n_header_field; |
3135 | 0 | /* UNREACHABLE */; |
3136 | 0 | abort(); |
3137 | 0 | } |
3138 | 0 | case s_n_llhttp__internal__n_header_field_start: |
3139 | 0 | s_n_llhttp__internal__n_header_field_start: { |
3140 | 0 | if (p == endp) { |
3141 | 0 | return s_n_llhttp__internal__n_header_field_start; |
3142 | 0 | } |
3143 | 0 | switch (*p) { |
3144 | 0 | case 10: { |
3145 | 0 | p++; |
3146 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_1; |
3147 | 0 | } |
3148 | 0 | case 13: { |
3149 | 0 | p++; |
3150 | 0 | goto s_n_llhttp__internal__n_headers_almost_done; |
3151 | 0 | } |
3152 | 0 | case ':': { |
3153 | 0 | goto s_n_llhttp__internal__n_error_44; |
3154 | 0 | } |
3155 | 0 | default: { |
3156 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_field; |
3157 | 0 | } |
3158 | 0 | } |
3159 | 0 | /* UNREACHABLE */; |
3160 | 0 | abort(); |
3161 | 0 | } |
3162 | 0 | case s_n_llhttp__internal__n_headers_start: |
3163 | 0 | s_n_llhttp__internal__n_headers_start: { |
3164 | 0 | if (p == endp) { |
3165 | 0 | return s_n_llhttp__internal__n_headers_start; |
3166 | 0 | } |
3167 | 0 | switch (*p) { |
3168 | 0 | case ' ': { |
3169 | 0 | p++; |
3170 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags; |
3171 | 0 | } |
3172 | 0 | default: { |
3173 | 0 | goto s_n_llhttp__internal__n_header_field_start; |
3174 | 0 | } |
3175 | 0 | } |
3176 | 0 | /* UNREACHABLE */; |
3177 | 0 | abort(); |
3178 | 0 | } |
3179 | 0 | case s_n_llhttp__internal__n_url_to_http_09: |
3180 | 0 | s_n_llhttp__internal__n_url_to_http_09: { |
3181 | 0 | if (p == endp) { |
3182 | 0 | return s_n_llhttp__internal__n_url_to_http_09; |
3183 | 0 | } |
3184 | 0 | switch (*p) { |
3185 | 0 | case 9: { |
3186 | 0 | p++; |
3187 | 0 | goto s_n_llhttp__internal__n_error_2; |
3188 | 0 | } |
3189 | 0 | case 12: { |
3190 | 0 | p++; |
3191 | 0 | goto s_n_llhttp__internal__n_error_2; |
3192 | 0 | } |
3193 | 0 | default: { |
3194 | 0 | goto s_n_llhttp__internal__n_invoke_update_http_major; |
3195 | 0 | } |
3196 | 0 | } |
3197 | 0 | /* UNREACHABLE */; |
3198 | 0 | abort(); |
3199 | 0 | } |
3200 | 0 | case s_n_llhttp__internal__n_url_skip_to_http09: |
3201 | 0 | s_n_llhttp__internal__n_url_skip_to_http09: { |
3202 | 0 | if (p == endp) { |
3203 | 0 | return s_n_llhttp__internal__n_url_skip_to_http09; |
3204 | 0 | } |
3205 | 0 | switch (*p) { |
3206 | 0 | case 9: { |
3207 | 0 | p++; |
3208 | 0 | goto s_n_llhttp__internal__n_error_2; |
3209 | 0 | } |
3210 | 0 | case 12: { |
3211 | 0 | p++; |
3212 | 0 | goto s_n_llhttp__internal__n_error_2; |
3213 | 0 | } |
3214 | 0 | default: { |
3215 | 0 | p++; |
3216 | 0 | goto s_n_llhttp__internal__n_url_to_http_09; |
3217 | 0 | } |
3218 | 0 | } |
3219 | 0 | /* UNREACHABLE */; |
3220 | 0 | abort(); |
3221 | 0 | } |
3222 | 0 | case s_n_llhttp__internal__n_url_skip_lf_to_http09_1: |
3223 | 0 | s_n_llhttp__internal__n_url_skip_lf_to_http09_1: { |
3224 | 0 | if (p == endp) { |
3225 | 0 | return s_n_llhttp__internal__n_url_skip_lf_to_http09_1; |
3226 | 0 | } |
3227 | 0 | switch (*p) { |
3228 | 0 | case 10: { |
3229 | 0 | p++; |
3230 | 0 | goto s_n_llhttp__internal__n_url_to_http_09; |
3231 | 0 | } |
3232 | 0 | default: { |
3233 | 0 | goto s_n_llhttp__internal__n_error_63; |
3234 | 0 | } |
3235 | 0 | } |
3236 | 0 | /* UNREACHABLE */; |
3237 | 0 | abort(); |
3238 | 0 | } |
3239 | 0 | case s_n_llhttp__internal__n_url_skip_lf_to_http09: |
3240 | 0 | s_n_llhttp__internal__n_url_skip_lf_to_http09: { |
3241 | 0 | if (p == endp) { |
3242 | 0 | return s_n_llhttp__internal__n_url_skip_lf_to_http09; |
3243 | 0 | } |
3244 | 0 | switch (*p) { |
3245 | 0 | case 9: { |
3246 | 0 | p++; |
3247 | 0 | goto s_n_llhttp__internal__n_error_2; |
3248 | 0 | } |
3249 | 0 | case 12: { |
3250 | 0 | p++; |
3251 | 0 | goto s_n_llhttp__internal__n_error_2; |
3252 | 0 | } |
3253 | 0 | case 13: { |
3254 | 0 | p++; |
3255 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09_1; |
3256 | 0 | } |
3257 | 0 | default: { |
3258 | 0 | goto s_n_llhttp__internal__n_error_63; |
3259 | 0 | } |
3260 | 0 | } |
3261 | 0 | /* UNREACHABLE */; |
3262 | 0 | abort(); |
3263 | 0 | } |
3264 | 0 | case s_n_llhttp__internal__n_req_pri_upgrade: |
3265 | 0 | s_n_llhttp__internal__n_req_pri_upgrade: { |
3266 | 0 | llparse_match_t match_seq; |
3267 | | |
3268 | 0 | if (p == endp) { |
3269 | 0 | return s_n_llhttp__internal__n_req_pri_upgrade; |
3270 | 0 | } |
3271 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 10); |
3272 | 0 | p = match_seq.current; |
3273 | 0 | switch (match_seq.status) { |
3274 | 0 | case kMatchComplete: { |
3275 | 0 | p++; |
3276 | 0 | goto s_n_llhttp__internal__n_error_71; |
3277 | 0 | } |
3278 | 0 | case kMatchPause: { |
3279 | 0 | return s_n_llhttp__internal__n_req_pri_upgrade; |
3280 | 0 | } |
3281 | 0 | case kMatchMismatch: { |
3282 | 0 | goto s_n_llhttp__internal__n_error_72; |
3283 | 0 | } |
3284 | 0 | } |
3285 | 0 | /* UNREACHABLE */; |
3286 | 0 | abort(); |
3287 | 0 | } |
3288 | 0 | case s_n_llhttp__internal__n_req_http_complete_crlf: |
3289 | 0 | s_n_llhttp__internal__n_req_http_complete_crlf: { |
3290 | 0 | if (p == endp) { |
3291 | 0 | return s_n_llhttp__internal__n_req_http_complete_crlf; |
3292 | 0 | } |
3293 | 0 | switch (*p) { |
3294 | 0 | case 10: { |
3295 | 0 | p++; |
3296 | 0 | goto s_n_llhttp__internal__n_headers_start; |
3297 | 0 | } |
3298 | 0 | default: { |
3299 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_26; |
3300 | 0 | } |
3301 | 0 | } |
3302 | 0 | /* UNREACHABLE */; |
3303 | 0 | abort(); |
3304 | 0 | } |
3305 | 0 | case s_n_llhttp__internal__n_req_http_complete: |
3306 | 0 | s_n_llhttp__internal__n_req_http_complete: { |
3307 | 0 | if (p == endp) { |
3308 | 0 | return s_n_llhttp__internal__n_req_http_complete; |
3309 | 0 | } |
3310 | 0 | switch (*p) { |
3311 | 0 | case 10: { |
3312 | 0 | p++; |
3313 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_25; |
3314 | 0 | } |
3315 | 0 | case 13: { |
3316 | 0 | p++; |
3317 | 0 | goto s_n_llhttp__internal__n_req_http_complete_crlf; |
3318 | 0 | } |
3319 | 0 | default: { |
3320 | 0 | goto s_n_llhttp__internal__n_error_70; |
3321 | 0 | } |
3322 | 0 | } |
3323 | 0 | /* UNREACHABLE */; |
3324 | 0 | abort(); |
3325 | 0 | } |
3326 | 0 | case s_n_llhttp__internal__n_invoke_load_method_1: |
3327 | 0 | s_n_llhttp__internal__n_invoke_load_method_1: { |
3328 | 0 | switch (llhttp__internal__c_load_method(state, p, endp)) { |
3329 | 0 | case 34: |
3330 | 0 | goto s_n_llhttp__internal__n_req_pri_upgrade; |
3331 | 0 | default: |
3332 | 0 | goto s_n_llhttp__internal__n_req_http_complete; |
3333 | 0 | } |
3334 | 0 | /* UNREACHABLE */; |
3335 | 0 | abort(); |
3336 | 0 | } |
3337 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_version_complete: |
3338 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_version_complete: { |
3339 | 0 | switch (llhttp__on_version_complete(state, p, endp)) { |
3340 | 0 | case 0: |
3341 | 0 | goto s_n_llhttp__internal__n_invoke_load_method_1; |
3342 | 0 | case 21: |
3343 | 0 | goto s_n_llhttp__internal__n_pause_21; |
3344 | 0 | default: |
3345 | 0 | goto s_n_llhttp__internal__n_error_67; |
3346 | 0 | } |
3347 | 0 | /* UNREACHABLE */; |
3348 | 0 | abort(); |
3349 | 0 | } |
3350 | 0 | case s_n_llhttp__internal__n_error_66: |
3351 | 0 | s_n_llhttp__internal__n_error_66: { |
3352 | 0 | state->error = 0x9; |
3353 | 0 | state->reason = "Invalid HTTP version"; |
3354 | 0 | state->error_pos = (const char*) p; |
3355 | 0 | state->_current = (void*) (intptr_t) s_error; |
3356 | 0 | return s_error; |
3357 | 0 | /* UNREACHABLE */; |
3358 | 0 | abort(); |
3359 | 0 | } |
3360 | 0 | case s_n_llhttp__internal__n_error_73: |
3361 | 0 | s_n_llhttp__internal__n_error_73: { |
3362 | 0 | state->error = 0x9; |
3363 | 0 | state->reason = "Invalid minor version"; |
3364 | 0 | state->error_pos = (const char*) p; |
3365 | 0 | state->_current = (void*) (intptr_t) s_error; |
3366 | 0 | return s_error; |
3367 | 0 | /* UNREACHABLE */; |
3368 | 0 | abort(); |
3369 | 0 | } |
3370 | 0 | case s_n_llhttp__internal__n_req_http_minor: |
3371 | 0 | s_n_llhttp__internal__n_req_http_minor: { |
3372 | 0 | if (p == endp) { |
3373 | 0 | return s_n_llhttp__internal__n_req_http_minor; |
3374 | 0 | } |
3375 | 0 | switch (*p) { |
3376 | 0 | case '0': { |
3377 | 0 | p++; |
3378 | 0 | match = 0; |
3379 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3380 | 0 | } |
3381 | 0 | case '1': { |
3382 | 0 | p++; |
3383 | 0 | match = 1; |
3384 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3385 | 0 | } |
3386 | 0 | case '2': { |
3387 | 0 | p++; |
3388 | 0 | match = 2; |
3389 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3390 | 0 | } |
3391 | 0 | case '3': { |
3392 | 0 | p++; |
3393 | 0 | match = 3; |
3394 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3395 | 0 | } |
3396 | 0 | case '4': { |
3397 | 0 | p++; |
3398 | 0 | match = 4; |
3399 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3400 | 0 | } |
3401 | 0 | case '5': { |
3402 | 0 | p++; |
3403 | 0 | match = 5; |
3404 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3405 | 0 | } |
3406 | 0 | case '6': { |
3407 | 0 | p++; |
3408 | 0 | match = 6; |
3409 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3410 | 0 | } |
3411 | 0 | case '7': { |
3412 | 0 | p++; |
3413 | 0 | match = 7; |
3414 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3415 | 0 | } |
3416 | 0 | case '8': { |
3417 | 0 | p++; |
3418 | 0 | match = 8; |
3419 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3420 | 0 | } |
3421 | 0 | case '9': { |
3422 | 0 | p++; |
3423 | 0 | match = 9; |
3424 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor; |
3425 | 0 | } |
3426 | 0 | default: { |
3427 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_2; |
3428 | 0 | } |
3429 | 0 | } |
3430 | 0 | /* UNREACHABLE */; |
3431 | 0 | abort(); |
3432 | 0 | } |
3433 | 0 | case s_n_llhttp__internal__n_error_74: |
3434 | 0 | s_n_llhttp__internal__n_error_74: { |
3435 | 0 | state->error = 0x9; |
3436 | 0 | state->reason = "Expected dot"; |
3437 | 0 | state->error_pos = (const char*) p; |
3438 | 0 | state->_current = (void*) (intptr_t) s_error; |
3439 | 0 | return s_error; |
3440 | 0 | /* UNREACHABLE */; |
3441 | 0 | abort(); |
3442 | 0 | } |
3443 | 0 | case s_n_llhttp__internal__n_req_http_dot: |
3444 | 0 | s_n_llhttp__internal__n_req_http_dot: { |
3445 | 0 | if (p == endp) { |
3446 | 0 | return s_n_llhttp__internal__n_req_http_dot; |
3447 | 0 | } |
3448 | 0 | switch (*p) { |
3449 | 0 | case '.': { |
3450 | 0 | p++; |
3451 | 0 | goto s_n_llhttp__internal__n_req_http_minor; |
3452 | 0 | } |
3453 | 0 | default: { |
3454 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_3; |
3455 | 0 | } |
3456 | 0 | } |
3457 | 0 | /* UNREACHABLE */; |
3458 | 0 | abort(); |
3459 | 0 | } |
3460 | 0 | case s_n_llhttp__internal__n_error_75: |
3461 | 0 | s_n_llhttp__internal__n_error_75: { |
3462 | 0 | state->error = 0x9; |
3463 | 0 | state->reason = "Invalid major version"; |
3464 | 0 | state->error_pos = (const char*) p; |
3465 | 0 | state->_current = (void*) (intptr_t) s_error; |
3466 | 0 | return s_error; |
3467 | 0 | /* UNREACHABLE */; |
3468 | 0 | abort(); |
3469 | 0 | } |
3470 | 0 | case s_n_llhttp__internal__n_req_http_major: |
3471 | 0 | s_n_llhttp__internal__n_req_http_major: { |
3472 | 0 | if (p == endp) { |
3473 | 0 | return s_n_llhttp__internal__n_req_http_major; |
3474 | 0 | } |
3475 | 0 | switch (*p) { |
3476 | 0 | case '0': { |
3477 | 0 | p++; |
3478 | 0 | match = 0; |
3479 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3480 | 0 | } |
3481 | 0 | case '1': { |
3482 | 0 | p++; |
3483 | 0 | match = 1; |
3484 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3485 | 0 | } |
3486 | 0 | case '2': { |
3487 | 0 | p++; |
3488 | 0 | match = 2; |
3489 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3490 | 0 | } |
3491 | 0 | case '3': { |
3492 | 0 | p++; |
3493 | 0 | match = 3; |
3494 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3495 | 0 | } |
3496 | 0 | case '4': { |
3497 | 0 | p++; |
3498 | 0 | match = 4; |
3499 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3500 | 0 | } |
3501 | 0 | case '5': { |
3502 | 0 | p++; |
3503 | 0 | match = 5; |
3504 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3505 | 0 | } |
3506 | 0 | case '6': { |
3507 | 0 | p++; |
3508 | 0 | match = 6; |
3509 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3510 | 0 | } |
3511 | 0 | case '7': { |
3512 | 0 | p++; |
3513 | 0 | match = 7; |
3514 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3515 | 0 | } |
3516 | 0 | case '8': { |
3517 | 0 | p++; |
3518 | 0 | match = 8; |
3519 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3520 | 0 | } |
3521 | 0 | case '9': { |
3522 | 0 | p++; |
3523 | 0 | match = 9; |
3524 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major; |
3525 | 0 | } |
3526 | 0 | default: { |
3527 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_4; |
3528 | 0 | } |
3529 | 0 | } |
3530 | 0 | /* UNREACHABLE */; |
3531 | 0 | abort(); |
3532 | 0 | } |
3533 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_version: |
3534 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_version: { |
3535 | 0 | if (p == endp) { |
3536 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_version; |
3537 | 0 | } |
3538 | 0 | state->_span_pos0 = (void*) p; |
3539 | 0 | state->_span_cb0 = llhttp__on_version; |
3540 | 0 | goto s_n_llhttp__internal__n_req_http_major; |
3541 | 0 | /* UNREACHABLE */; |
3542 | 0 | abort(); |
3543 | 0 | } |
3544 | 0 | case s_n_llhttp__internal__n_req_http_start_1: |
3545 | 0 | s_n_llhttp__internal__n_req_http_start_1: { |
3546 | 0 | llparse_match_t match_seq; |
3547 | | |
3548 | 0 | if (p == endp) { |
3549 | 0 | return s_n_llhttp__internal__n_req_http_start_1; |
3550 | 0 | } |
3551 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob13, 4); |
3552 | 0 | p = match_seq.current; |
3553 | 0 | switch (match_seq.status) { |
3554 | 0 | case kMatchComplete: { |
3555 | 0 | p++; |
3556 | 0 | goto s_n_llhttp__internal__n_invoke_load_method; |
3557 | 0 | } |
3558 | 0 | case kMatchPause: { |
3559 | 0 | return s_n_llhttp__internal__n_req_http_start_1; |
3560 | 0 | } |
3561 | 0 | case kMatchMismatch: { |
3562 | 0 | goto s_n_llhttp__internal__n_error_78; |
3563 | 0 | } |
3564 | 0 | } |
3565 | 0 | /* UNREACHABLE */; |
3566 | 0 | abort(); |
3567 | 0 | } |
3568 | 0 | case s_n_llhttp__internal__n_req_http_start_2: |
3569 | 0 | s_n_llhttp__internal__n_req_http_start_2: { |
3570 | 0 | llparse_match_t match_seq; |
3571 | | |
3572 | 0 | if (p == endp) { |
3573 | 0 | return s_n_llhttp__internal__n_req_http_start_2; |
3574 | 0 | } |
3575 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 3); |
3576 | 0 | p = match_seq.current; |
3577 | 0 | switch (match_seq.status) { |
3578 | 0 | case kMatchComplete: { |
3579 | 0 | p++; |
3580 | 0 | goto s_n_llhttp__internal__n_invoke_load_method_2; |
3581 | 0 | } |
3582 | 0 | case kMatchPause: { |
3583 | 0 | return s_n_llhttp__internal__n_req_http_start_2; |
3584 | 0 | } |
3585 | 0 | case kMatchMismatch: { |
3586 | 0 | goto s_n_llhttp__internal__n_error_78; |
3587 | 0 | } |
3588 | 0 | } |
3589 | 0 | /* UNREACHABLE */; |
3590 | 0 | abort(); |
3591 | 0 | } |
3592 | 0 | case s_n_llhttp__internal__n_req_http_start_3: |
3593 | 0 | s_n_llhttp__internal__n_req_http_start_3: { |
3594 | 0 | llparse_match_t match_seq; |
3595 | | |
3596 | 0 | if (p == endp) { |
3597 | 0 | return s_n_llhttp__internal__n_req_http_start_3; |
3598 | 0 | } |
3599 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 4); |
3600 | 0 | p = match_seq.current; |
3601 | 0 | switch (match_seq.status) { |
3602 | 0 | case kMatchComplete: { |
3603 | 0 | p++; |
3604 | 0 | goto s_n_llhttp__internal__n_invoke_load_method_3; |
3605 | 0 | } |
3606 | 0 | case kMatchPause: { |
3607 | 0 | return s_n_llhttp__internal__n_req_http_start_3; |
3608 | 0 | } |
3609 | 0 | case kMatchMismatch: { |
3610 | 0 | goto s_n_llhttp__internal__n_error_78; |
3611 | 0 | } |
3612 | 0 | } |
3613 | 0 | /* UNREACHABLE */; |
3614 | 0 | abort(); |
3615 | 0 | } |
3616 | 0 | case s_n_llhttp__internal__n_req_http_start: |
3617 | 0 | s_n_llhttp__internal__n_req_http_start: { |
3618 | 0 | if (p == endp) { |
3619 | 0 | return s_n_llhttp__internal__n_req_http_start; |
3620 | 0 | } |
3621 | 0 | switch (*p) { |
3622 | 0 | case ' ': { |
3623 | 0 | p++; |
3624 | 0 | goto s_n_llhttp__internal__n_req_http_start; |
3625 | 0 | } |
3626 | 0 | case 'H': { |
3627 | 0 | p++; |
3628 | 0 | goto s_n_llhttp__internal__n_req_http_start_1; |
3629 | 0 | } |
3630 | 0 | case 'I': { |
3631 | 0 | p++; |
3632 | 0 | goto s_n_llhttp__internal__n_req_http_start_2; |
3633 | 0 | } |
3634 | 0 | case 'R': { |
3635 | 0 | p++; |
3636 | 0 | goto s_n_llhttp__internal__n_req_http_start_3; |
3637 | 0 | } |
3638 | 0 | default: { |
3639 | 0 | goto s_n_llhttp__internal__n_error_78; |
3640 | 0 | } |
3641 | 0 | } |
3642 | 0 | /* UNREACHABLE */; |
3643 | 0 | abort(); |
3644 | 0 | } |
3645 | 0 | case s_n_llhttp__internal__n_url_to_http: |
3646 | 0 | s_n_llhttp__internal__n_url_to_http: { |
3647 | 0 | if (p == endp) { |
3648 | 0 | return s_n_llhttp__internal__n_url_to_http; |
3649 | 0 | } |
3650 | 0 | switch (*p) { |
3651 | 0 | case 9: { |
3652 | 0 | p++; |
3653 | 0 | goto s_n_llhttp__internal__n_error_2; |
3654 | 0 | } |
3655 | 0 | case 12: { |
3656 | 0 | p++; |
3657 | 0 | goto s_n_llhttp__internal__n_error_2; |
3658 | 0 | } |
3659 | 0 | default: { |
3660 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1; |
3661 | 0 | } |
3662 | 0 | } |
3663 | 0 | /* UNREACHABLE */; |
3664 | 0 | abort(); |
3665 | 0 | } |
3666 | 0 | case s_n_llhttp__internal__n_url_skip_to_http: |
3667 | 0 | s_n_llhttp__internal__n_url_skip_to_http: { |
3668 | 0 | if (p == endp) { |
3669 | 0 | return s_n_llhttp__internal__n_url_skip_to_http; |
3670 | 0 | } |
3671 | 0 | switch (*p) { |
3672 | 0 | case 9: { |
3673 | 0 | p++; |
3674 | 0 | goto s_n_llhttp__internal__n_error_2; |
3675 | 0 | } |
3676 | 0 | case 12: { |
3677 | 0 | p++; |
3678 | 0 | goto s_n_llhttp__internal__n_error_2; |
3679 | 0 | } |
3680 | 0 | default: { |
3681 | 0 | p++; |
3682 | 0 | goto s_n_llhttp__internal__n_url_to_http; |
3683 | 0 | } |
3684 | 0 | } |
3685 | 0 | /* UNREACHABLE */; |
3686 | 0 | abort(); |
3687 | 0 | } |
3688 | 0 | case s_n_llhttp__internal__n_url_fragment: |
3689 | 0 | s_n_llhttp__internal__n_url_fragment: { |
3690 | 0 | static uint8_t lookup_table[] = { |
3691 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0, |
3692 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3693 | 0 | 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3694 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3695 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3696 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3697 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3698 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, |
3699 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3700 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3701 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3702 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3703 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3704 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3705 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3706 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
3707 | 0 | }; |
3708 | 0 | if (p == endp) { |
3709 | 0 | return s_n_llhttp__internal__n_url_fragment; |
3710 | 0 | } |
3711 | 0 | switch (lookup_table[(uint8_t) *p]) { |
3712 | 0 | case 1: { |
3713 | 0 | p++; |
3714 | 0 | goto s_n_llhttp__internal__n_error_2; |
3715 | 0 | } |
3716 | 0 | case 2: { |
3717 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_6; |
3718 | 0 | } |
3719 | 0 | case 3: { |
3720 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_7; |
3721 | 0 | } |
3722 | 0 | case 4: { |
3723 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8; |
3724 | 0 | } |
3725 | 0 | case 5: { |
3726 | 0 | p++; |
3727 | 0 | goto s_n_llhttp__internal__n_url_fragment; |
3728 | 0 | } |
3729 | 0 | default: { |
3730 | 0 | goto s_n_llhttp__internal__n_error_79; |
3731 | 0 | } |
3732 | 0 | } |
3733 | 0 | /* UNREACHABLE */; |
3734 | 0 | abort(); |
3735 | 0 | } |
3736 | 0 | case s_n_llhttp__internal__n_span_end_stub_query_3: |
3737 | 0 | s_n_llhttp__internal__n_span_end_stub_query_3: { |
3738 | 0 | if (p == endp) { |
3739 | 0 | return s_n_llhttp__internal__n_span_end_stub_query_3; |
3740 | 0 | } |
3741 | 0 | p++; |
3742 | 0 | goto s_n_llhttp__internal__n_url_fragment; |
3743 | 0 | /* UNREACHABLE */; |
3744 | 0 | abort(); |
3745 | 0 | } |
3746 | 0 | case s_n_llhttp__internal__n_url_query: |
3747 | 0 | s_n_llhttp__internal__n_url_query: { |
3748 | 0 | static uint8_t lookup_table[] = { |
3749 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0, |
3750 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3751 | 0 | 4, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3752 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3753 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3754 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3755 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3756 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, |
3757 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3758 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3759 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3760 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3761 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3762 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3763 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3764 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
3765 | 0 | }; |
3766 | 0 | if (p == endp) { |
3767 | 0 | return s_n_llhttp__internal__n_url_query; |
3768 | 0 | } |
3769 | 0 | switch (lookup_table[(uint8_t) *p]) { |
3770 | 0 | case 1: { |
3771 | 0 | p++; |
3772 | 0 | goto s_n_llhttp__internal__n_error_2; |
3773 | 0 | } |
3774 | 0 | case 2: { |
3775 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_9; |
3776 | 0 | } |
3777 | 0 | case 3: { |
3778 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_10; |
3779 | 0 | } |
3780 | 0 | case 4: { |
3781 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_11; |
3782 | 0 | } |
3783 | 0 | case 5: { |
3784 | 0 | p++; |
3785 | 0 | goto s_n_llhttp__internal__n_url_query; |
3786 | 0 | } |
3787 | 0 | case 6: { |
3788 | 0 | goto s_n_llhttp__internal__n_span_end_stub_query_3; |
3789 | 0 | } |
3790 | 0 | default: { |
3791 | 0 | goto s_n_llhttp__internal__n_error_80; |
3792 | 0 | } |
3793 | 0 | } |
3794 | 0 | /* UNREACHABLE */; |
3795 | 0 | abort(); |
3796 | 0 | } |
3797 | 0 | case s_n_llhttp__internal__n_url_query_or_fragment: |
3798 | 0 | s_n_llhttp__internal__n_url_query_or_fragment: { |
3799 | 0 | if (p == endp) { |
3800 | 0 | return s_n_llhttp__internal__n_url_query_or_fragment; |
3801 | 0 | } |
3802 | 0 | switch (*p) { |
3803 | 0 | case 9: { |
3804 | 0 | p++; |
3805 | 0 | goto s_n_llhttp__internal__n_error_2; |
3806 | 0 | } |
3807 | 0 | case 10: { |
3808 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_3; |
3809 | 0 | } |
3810 | 0 | case 12: { |
3811 | 0 | p++; |
3812 | 0 | goto s_n_llhttp__internal__n_error_2; |
3813 | 0 | } |
3814 | 0 | case 13: { |
3815 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_4; |
3816 | 0 | } |
3817 | 0 | case ' ': { |
3818 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_5; |
3819 | 0 | } |
3820 | 0 | case '#': { |
3821 | 0 | p++; |
3822 | 0 | goto s_n_llhttp__internal__n_url_fragment; |
3823 | 0 | } |
3824 | 0 | case '?': { |
3825 | 0 | p++; |
3826 | 0 | goto s_n_llhttp__internal__n_url_query; |
3827 | 0 | } |
3828 | 0 | default: { |
3829 | 0 | goto s_n_llhttp__internal__n_error_81; |
3830 | 0 | } |
3831 | 0 | } |
3832 | 0 | /* UNREACHABLE */; |
3833 | 0 | abort(); |
3834 | 0 | } |
3835 | 0 | case s_n_llhttp__internal__n_url_path: |
3836 | 0 | s_n_llhttp__internal__n_url_path: { |
3837 | 0 | static uint8_t lookup_table[] = { |
3838 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, |
3839 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3840 | 0 | 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
3841 | 0 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, |
3842 | 0 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
3843 | 0 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
3844 | 0 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
3845 | 0 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, |
3846 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3847 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3848 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3849 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3850 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3851 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3852 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3853 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
3854 | 0 | }; |
3855 | 0 | if (p == endp) { |
3856 | 0 | return s_n_llhttp__internal__n_url_path; |
3857 | 0 | } |
3858 | 0 | switch (lookup_table[(uint8_t) *p]) { |
3859 | 0 | case 1: { |
3860 | 0 | p++; |
3861 | 0 | goto s_n_llhttp__internal__n_error_2; |
3862 | 0 | } |
3863 | 0 | case 2: { |
3864 | 0 | p++; |
3865 | 0 | goto s_n_llhttp__internal__n_url_path; |
3866 | 0 | } |
3867 | 0 | default: { |
3868 | 0 | goto s_n_llhttp__internal__n_url_query_or_fragment; |
3869 | 0 | } |
3870 | 0 | } |
3871 | 0 | /* UNREACHABLE */; |
3872 | 0 | abort(); |
3873 | 0 | } |
3874 | 0 | case s_n_llhttp__internal__n_span_start_stub_path_2: |
3875 | 0 | s_n_llhttp__internal__n_span_start_stub_path_2: { |
3876 | 0 | if (p == endp) { |
3877 | 0 | return s_n_llhttp__internal__n_span_start_stub_path_2; |
3878 | 0 | } |
3879 | 0 | p++; |
3880 | 0 | goto s_n_llhttp__internal__n_url_path; |
3881 | 0 | /* UNREACHABLE */; |
3882 | 0 | abort(); |
3883 | 0 | } |
3884 | 0 | case s_n_llhttp__internal__n_span_start_stub_path: |
3885 | 0 | s_n_llhttp__internal__n_span_start_stub_path: { |
3886 | 0 | if (p == endp) { |
3887 | 0 | return s_n_llhttp__internal__n_span_start_stub_path; |
3888 | 0 | } |
3889 | 0 | p++; |
3890 | 0 | goto s_n_llhttp__internal__n_url_path; |
3891 | 0 | /* UNREACHABLE */; |
3892 | 0 | abort(); |
3893 | 0 | } |
3894 | 0 | case s_n_llhttp__internal__n_span_start_stub_path_1: |
3895 | 0 | s_n_llhttp__internal__n_span_start_stub_path_1: { |
3896 | 0 | if (p == endp) { |
3897 | 0 | return s_n_llhttp__internal__n_span_start_stub_path_1; |
3898 | 0 | } |
3899 | 0 | p++; |
3900 | 0 | goto s_n_llhttp__internal__n_url_path; |
3901 | 0 | /* UNREACHABLE */; |
3902 | 0 | abort(); |
3903 | 0 | } |
3904 | 0 | case s_n_llhttp__internal__n_url_server_with_at: |
3905 | 0 | s_n_llhttp__internal__n_url_server_with_at: { |
3906 | 0 | static uint8_t lookup_table[] = { |
3907 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0, |
3908 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3909 | 0 | 4, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, |
3910 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 7, |
3911 | 0 | 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3912 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5, |
3913 | 0 | 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3914 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 0, |
3915 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3916 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3917 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3918 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3919 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3920 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3921 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3922 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
3923 | 0 | }; |
3924 | 0 | if (p == endp) { |
3925 | 0 | return s_n_llhttp__internal__n_url_server_with_at; |
3926 | 0 | } |
3927 | 0 | switch (lookup_table[(uint8_t) *p]) { |
3928 | 0 | case 1: { |
3929 | 0 | p++; |
3930 | 0 | goto s_n_llhttp__internal__n_error_2; |
3931 | 0 | } |
3932 | 0 | case 2: { |
3933 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_12; |
3934 | 0 | } |
3935 | 0 | case 3: { |
3936 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_13; |
3937 | 0 | } |
3938 | 0 | case 4: { |
3939 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_14; |
3940 | 0 | } |
3941 | 0 | case 5: { |
3942 | 0 | p++; |
3943 | 0 | goto s_n_llhttp__internal__n_url_server; |
3944 | 0 | } |
3945 | 0 | case 6: { |
3946 | 0 | goto s_n_llhttp__internal__n_span_start_stub_path_1; |
3947 | 0 | } |
3948 | 0 | case 7: { |
3949 | 0 | p++; |
3950 | 0 | goto s_n_llhttp__internal__n_url_query; |
3951 | 0 | } |
3952 | 0 | case 8: { |
3953 | 0 | p++; |
3954 | 0 | goto s_n_llhttp__internal__n_error_82; |
3955 | 0 | } |
3956 | 0 | default: { |
3957 | 0 | goto s_n_llhttp__internal__n_error_83; |
3958 | 0 | } |
3959 | 0 | } |
3960 | 0 | /* UNREACHABLE */; |
3961 | 0 | abort(); |
3962 | 0 | } |
3963 | 0 | case s_n_llhttp__internal__n_url_server: |
3964 | 0 | s_n_llhttp__internal__n_url_server: { |
3965 | 0 | static uint8_t lookup_table[] = { |
3966 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0, |
3967 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3968 | 0 | 4, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, |
3969 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 7, |
3970 | 0 | 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3971 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5, |
3972 | 0 | 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
3973 | 0 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 0, |
3974 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3975 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3976 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3977 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3978 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3979 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3980 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3981 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
3982 | 0 | }; |
3983 | 0 | if (p == endp) { |
3984 | 0 | return s_n_llhttp__internal__n_url_server; |
3985 | 0 | } |
3986 | 0 | switch (lookup_table[(uint8_t) *p]) { |
3987 | 0 | case 1: { |
3988 | 0 | p++; |
3989 | 0 | goto s_n_llhttp__internal__n_error_2; |
3990 | 0 | } |
3991 | 0 | case 2: { |
3992 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url; |
3993 | 0 | } |
3994 | 0 | case 3: { |
3995 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_1; |
3996 | 0 | } |
3997 | 0 | case 4: { |
3998 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_url_2; |
3999 | 0 | } |
4000 | 0 | case 5: { |
4001 | 0 | p++; |
4002 | 0 | goto s_n_llhttp__internal__n_url_server; |
4003 | 0 | } |
4004 | 0 | case 6: { |
4005 | 0 | goto s_n_llhttp__internal__n_span_start_stub_path; |
4006 | 0 | } |
4007 | 0 | case 7: { |
4008 | 0 | p++; |
4009 | 0 | goto s_n_llhttp__internal__n_url_query; |
4010 | 0 | } |
4011 | 0 | case 8: { |
4012 | 0 | p++; |
4013 | 0 | goto s_n_llhttp__internal__n_url_server_with_at; |
4014 | 0 | } |
4015 | 0 | default: { |
4016 | 0 | goto s_n_llhttp__internal__n_error_84; |
4017 | 0 | } |
4018 | 0 | } |
4019 | 0 | /* UNREACHABLE */; |
4020 | 0 | abort(); |
4021 | 0 | } |
4022 | 0 | case s_n_llhttp__internal__n_url_schema_delim_1: |
4023 | 0 | s_n_llhttp__internal__n_url_schema_delim_1: { |
4024 | 0 | if (p == endp) { |
4025 | 0 | return s_n_llhttp__internal__n_url_schema_delim_1; |
4026 | 0 | } |
4027 | 0 | switch (*p) { |
4028 | 0 | case '/': { |
4029 | 0 | p++; |
4030 | 0 | goto s_n_llhttp__internal__n_url_server; |
4031 | 0 | } |
4032 | 0 | default: { |
4033 | 0 | goto s_n_llhttp__internal__n_error_85; |
4034 | 0 | } |
4035 | 0 | } |
4036 | 0 | /* UNREACHABLE */; |
4037 | 0 | abort(); |
4038 | 0 | } |
4039 | 0 | case s_n_llhttp__internal__n_url_schema_delim: |
4040 | 0 | s_n_llhttp__internal__n_url_schema_delim: { |
4041 | 0 | if (p == endp) { |
4042 | 0 | return s_n_llhttp__internal__n_url_schema_delim; |
4043 | 0 | } |
4044 | 0 | switch (*p) { |
4045 | 0 | case 9: { |
4046 | 0 | p++; |
4047 | 0 | goto s_n_llhttp__internal__n_error_2; |
4048 | 0 | } |
4049 | 0 | case 10: { |
4050 | 0 | p++; |
4051 | 0 | goto s_n_llhttp__internal__n_error_2; |
4052 | 0 | } |
4053 | 0 | case 12: { |
4054 | 0 | p++; |
4055 | 0 | goto s_n_llhttp__internal__n_error_2; |
4056 | 0 | } |
4057 | 0 | case 13: { |
4058 | 0 | p++; |
4059 | 0 | goto s_n_llhttp__internal__n_error_2; |
4060 | 0 | } |
4061 | 0 | case ' ': { |
4062 | 0 | p++; |
4063 | 0 | goto s_n_llhttp__internal__n_error_2; |
4064 | 0 | } |
4065 | 0 | case '/': { |
4066 | 0 | p++; |
4067 | 0 | goto s_n_llhttp__internal__n_url_schema_delim_1; |
4068 | 0 | } |
4069 | 0 | default: { |
4070 | 0 | goto s_n_llhttp__internal__n_error_85; |
4071 | 0 | } |
4072 | 0 | } |
4073 | 0 | /* UNREACHABLE */; |
4074 | 0 | abort(); |
4075 | 0 | } |
4076 | 0 | case s_n_llhttp__internal__n_span_end_stub_schema: |
4077 | 0 | s_n_llhttp__internal__n_span_end_stub_schema: { |
4078 | 0 | if (p == endp) { |
4079 | 0 | return s_n_llhttp__internal__n_span_end_stub_schema; |
4080 | 0 | } |
4081 | 0 | p++; |
4082 | 0 | goto s_n_llhttp__internal__n_url_schema_delim; |
4083 | 0 | /* UNREACHABLE */; |
4084 | 0 | abort(); |
4085 | 0 | } |
4086 | 0 | case s_n_llhttp__internal__n_url_schema: |
4087 | 0 | s_n_llhttp__internal__n_url_schema: { |
4088 | 0 | static uint8_t lookup_table[] = { |
4089 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, |
4090 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4091 | 0 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4092 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, |
4093 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
4094 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, |
4095 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
4096 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, |
4097 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4098 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4099 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4100 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4101 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4102 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4103 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4104 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
4105 | 0 | }; |
4106 | 0 | if (p == endp) { |
4107 | 0 | return s_n_llhttp__internal__n_url_schema; |
4108 | 0 | } |
4109 | 0 | switch (lookup_table[(uint8_t) *p]) { |
4110 | 0 | case 1: { |
4111 | 0 | p++; |
4112 | 0 | goto s_n_llhttp__internal__n_error_2; |
4113 | 0 | } |
4114 | 0 | case 2: { |
4115 | 0 | goto s_n_llhttp__internal__n_span_end_stub_schema; |
4116 | 0 | } |
4117 | 0 | case 3: { |
4118 | 0 | p++; |
4119 | 0 | goto s_n_llhttp__internal__n_url_schema; |
4120 | 0 | } |
4121 | 0 | default: { |
4122 | 0 | goto s_n_llhttp__internal__n_error_86; |
4123 | 0 | } |
4124 | 0 | } |
4125 | 0 | /* UNREACHABLE */; |
4126 | 0 | abort(); |
4127 | 0 | } |
4128 | 0 | case s_n_llhttp__internal__n_url_start: |
4129 | 0 | s_n_llhttp__internal__n_url_start: { |
4130 | 0 | static uint8_t lookup_table[] = { |
4131 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, |
4132 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4133 | 0 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, |
4134 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4135 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
4136 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, |
4137 | 0 | 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
4138 | 0 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, |
4139 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4140 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4141 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4142 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4143 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4144 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4145 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4146 | 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
4147 | 0 | }; |
4148 | 0 | if (p == endp) { |
4149 | 0 | return s_n_llhttp__internal__n_url_start; |
4150 | 0 | } |
4151 | 0 | switch (lookup_table[(uint8_t) *p]) { |
4152 | 0 | case 1: { |
4153 | 0 | p++; |
4154 | 0 | goto s_n_llhttp__internal__n_error_2; |
4155 | 0 | } |
4156 | 0 | case 2: { |
4157 | 0 | goto s_n_llhttp__internal__n_span_start_stub_path_2; |
4158 | 0 | } |
4159 | 0 | case 3: { |
4160 | 0 | goto s_n_llhttp__internal__n_url_schema; |
4161 | 0 | } |
4162 | 0 | default: { |
4163 | 0 | goto s_n_llhttp__internal__n_error_87; |
4164 | 0 | } |
4165 | 0 | } |
4166 | 0 | /* UNREACHABLE */; |
4167 | 0 | abort(); |
4168 | 0 | } |
4169 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_url_1: |
4170 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_url_1: { |
4171 | 0 | if (p == endp) { |
4172 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_url_1; |
4173 | 0 | } |
4174 | 0 | state->_span_pos0 = (void*) p; |
4175 | 0 | state->_span_cb0 = llhttp__on_url; |
4176 | 0 | goto s_n_llhttp__internal__n_url_start; |
4177 | 0 | /* UNREACHABLE */; |
4178 | 0 | abort(); |
4179 | 0 | } |
4180 | 0 | case s_n_llhttp__internal__n_url_entry_normal: |
4181 | 0 | s_n_llhttp__internal__n_url_entry_normal: { |
4182 | 0 | if (p == endp) { |
4183 | 0 | return s_n_llhttp__internal__n_url_entry_normal; |
4184 | 0 | } |
4185 | 0 | switch (*p) { |
4186 | 0 | case 9: { |
4187 | 0 | p++; |
4188 | 0 | goto s_n_llhttp__internal__n_error_2; |
4189 | 0 | } |
4190 | 0 | case 12: { |
4191 | 0 | p++; |
4192 | 0 | goto s_n_llhttp__internal__n_error_2; |
4193 | 0 | } |
4194 | 0 | default: { |
4195 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_url_1; |
4196 | 0 | } |
4197 | 0 | } |
4198 | 0 | /* UNREACHABLE */; |
4199 | 0 | abort(); |
4200 | 0 | } |
4201 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_url: |
4202 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_url: { |
4203 | 0 | if (p == endp) { |
4204 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_url; |
4205 | 0 | } |
4206 | 0 | state->_span_pos0 = (void*) p; |
4207 | 0 | state->_span_cb0 = llhttp__on_url; |
4208 | 0 | goto s_n_llhttp__internal__n_url_server; |
4209 | 0 | /* UNREACHABLE */; |
4210 | 0 | abort(); |
4211 | 0 | } |
4212 | 0 | case s_n_llhttp__internal__n_url_entry_connect: |
4213 | 0 | s_n_llhttp__internal__n_url_entry_connect: { |
4214 | 0 | if (p == endp) { |
4215 | 0 | return s_n_llhttp__internal__n_url_entry_connect; |
4216 | 0 | } |
4217 | 0 | switch (*p) { |
4218 | 0 | case 9: { |
4219 | 0 | p++; |
4220 | 0 | goto s_n_llhttp__internal__n_error_2; |
4221 | 0 | } |
4222 | 0 | case 12: { |
4223 | 0 | p++; |
4224 | 0 | goto s_n_llhttp__internal__n_error_2; |
4225 | 0 | } |
4226 | 0 | default: { |
4227 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_url; |
4228 | 0 | } |
4229 | 0 | } |
4230 | 0 | /* UNREACHABLE */; |
4231 | 0 | abort(); |
4232 | 0 | } |
4233 | 0 | case s_n_llhttp__internal__n_req_spaces_before_url: |
4234 | 0 | s_n_llhttp__internal__n_req_spaces_before_url: { |
4235 | 0 | if (p == endp) { |
4236 | 0 | return s_n_llhttp__internal__n_req_spaces_before_url; |
4237 | 0 | } |
4238 | 0 | switch (*p) { |
4239 | 0 | case ' ': { |
4240 | 0 | p++; |
4241 | 0 | goto s_n_llhttp__internal__n_req_spaces_before_url; |
4242 | 0 | } |
4243 | 0 | default: { |
4244 | 0 | goto s_n_llhttp__internal__n_invoke_is_equal_method; |
4245 | 0 | } |
4246 | 0 | } |
4247 | 0 | /* UNREACHABLE */; |
4248 | 0 | abort(); |
4249 | 0 | } |
4250 | 0 | case s_n_llhttp__internal__n_req_first_space_before_url: |
4251 | 0 | s_n_llhttp__internal__n_req_first_space_before_url: { |
4252 | 0 | if (p == endp) { |
4253 | 0 | return s_n_llhttp__internal__n_req_first_space_before_url; |
4254 | 0 | } |
4255 | 0 | switch (*p) { |
4256 | 0 | case ' ': { |
4257 | 0 | p++; |
4258 | 0 | goto s_n_llhttp__internal__n_req_spaces_before_url; |
4259 | 0 | } |
4260 | 0 | default: { |
4261 | 0 | goto s_n_llhttp__internal__n_error_88; |
4262 | 0 | } |
4263 | 0 | } |
4264 | 0 | /* UNREACHABLE */; |
4265 | 0 | abort(); |
4266 | 0 | } |
4267 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1: |
4268 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1: { |
4269 | 0 | switch (llhttp__on_method_complete(state, p, endp)) { |
4270 | 0 | case 0: |
4271 | 0 | goto s_n_llhttp__internal__n_req_first_space_before_url; |
4272 | 0 | case 21: |
4273 | 0 | goto s_n_llhttp__internal__n_pause_26; |
4274 | 0 | default: |
4275 | 0 | goto s_n_llhttp__internal__n_error_107; |
4276 | 0 | } |
4277 | 0 | /* UNREACHABLE */; |
4278 | 0 | abort(); |
4279 | 0 | } |
4280 | 0 | case s_n_llhttp__internal__n_after_start_req_2: |
4281 | 0 | s_n_llhttp__internal__n_after_start_req_2: { |
4282 | 0 | if (p == endp) { |
4283 | 0 | return s_n_llhttp__internal__n_after_start_req_2; |
4284 | 0 | } |
4285 | 0 | switch (*p) { |
4286 | 0 | case 'L': { |
4287 | 0 | p++; |
4288 | 0 | match = 19; |
4289 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4290 | 0 | } |
4291 | 0 | default: { |
4292 | 0 | goto s_n_llhttp__internal__n_error_108; |
4293 | 0 | } |
4294 | 0 | } |
4295 | 0 | /* UNREACHABLE */; |
4296 | 0 | abort(); |
4297 | 0 | } |
4298 | 0 | case s_n_llhttp__internal__n_after_start_req_3: |
4299 | 0 | s_n_llhttp__internal__n_after_start_req_3: { |
4300 | 0 | llparse_match_t match_seq; |
4301 | | |
4302 | 0 | if (p == endp) { |
4303 | 0 | return s_n_llhttp__internal__n_after_start_req_3; |
4304 | 0 | } |
4305 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 6); |
4306 | 0 | p = match_seq.current; |
4307 | 0 | switch (match_seq.status) { |
4308 | 0 | case kMatchComplete: { |
4309 | 0 | p++; |
4310 | 0 | match = 36; |
4311 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4312 | 0 | } |
4313 | 0 | case kMatchPause: { |
4314 | 0 | return s_n_llhttp__internal__n_after_start_req_3; |
4315 | 0 | } |
4316 | 0 | case kMatchMismatch: { |
4317 | 0 | goto s_n_llhttp__internal__n_error_108; |
4318 | 0 | } |
4319 | 0 | } |
4320 | 0 | /* UNREACHABLE */; |
4321 | 0 | abort(); |
4322 | 0 | } |
4323 | 0 | case s_n_llhttp__internal__n_after_start_req_1: |
4324 | 0 | s_n_llhttp__internal__n_after_start_req_1: { |
4325 | 0 | if (p == endp) { |
4326 | 0 | return s_n_llhttp__internal__n_after_start_req_1; |
4327 | 0 | } |
4328 | 0 | switch (*p) { |
4329 | 0 | case 'C': { |
4330 | 0 | p++; |
4331 | 0 | goto s_n_llhttp__internal__n_after_start_req_2; |
4332 | 0 | } |
4333 | 0 | case 'N': { |
4334 | 0 | p++; |
4335 | 0 | goto s_n_llhttp__internal__n_after_start_req_3; |
4336 | 0 | } |
4337 | 0 | default: { |
4338 | 0 | goto s_n_llhttp__internal__n_error_108; |
4339 | 0 | } |
4340 | 0 | } |
4341 | 0 | /* UNREACHABLE */; |
4342 | 0 | abort(); |
4343 | 0 | } |
4344 | 0 | case s_n_llhttp__internal__n_after_start_req_4: |
4345 | 0 | s_n_llhttp__internal__n_after_start_req_4: { |
4346 | 0 | llparse_match_t match_seq; |
4347 | | |
4348 | 0 | if (p == endp) { |
4349 | 0 | return s_n_llhttp__internal__n_after_start_req_4; |
4350 | 0 | } |
4351 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 3); |
4352 | 0 | p = match_seq.current; |
4353 | 0 | switch (match_seq.status) { |
4354 | 0 | case kMatchComplete: { |
4355 | 0 | p++; |
4356 | 0 | match = 16; |
4357 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4358 | 0 | } |
4359 | 0 | case kMatchPause: { |
4360 | 0 | return s_n_llhttp__internal__n_after_start_req_4; |
4361 | 0 | } |
4362 | 0 | case kMatchMismatch: { |
4363 | 0 | goto s_n_llhttp__internal__n_error_108; |
4364 | 0 | } |
4365 | 0 | } |
4366 | 0 | /* UNREACHABLE */; |
4367 | 0 | abort(); |
4368 | 0 | } |
4369 | 0 | case s_n_llhttp__internal__n_after_start_req_6: |
4370 | 0 | s_n_llhttp__internal__n_after_start_req_6: { |
4371 | 0 | llparse_match_t match_seq; |
4372 | | |
4373 | 0 | if (p == endp) { |
4374 | 0 | return s_n_llhttp__internal__n_after_start_req_6; |
4375 | 0 | } |
4376 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6); |
4377 | 0 | p = match_seq.current; |
4378 | 0 | switch (match_seq.status) { |
4379 | 0 | case kMatchComplete: { |
4380 | 0 | p++; |
4381 | 0 | match = 22; |
4382 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4383 | 0 | } |
4384 | 0 | case kMatchPause: { |
4385 | 0 | return s_n_llhttp__internal__n_after_start_req_6; |
4386 | 0 | } |
4387 | 0 | case kMatchMismatch: { |
4388 | 0 | goto s_n_llhttp__internal__n_error_108; |
4389 | 0 | } |
4390 | 0 | } |
4391 | 0 | /* UNREACHABLE */; |
4392 | 0 | abort(); |
4393 | 0 | } |
4394 | 0 | case s_n_llhttp__internal__n_after_start_req_8: |
4395 | 0 | s_n_llhttp__internal__n_after_start_req_8: { |
4396 | 0 | llparse_match_t match_seq; |
4397 | | |
4398 | 0 | if (p == endp) { |
4399 | 0 | return s_n_llhttp__internal__n_after_start_req_8; |
4400 | 0 | } |
4401 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 4); |
4402 | 0 | p = match_seq.current; |
4403 | 0 | switch (match_seq.status) { |
4404 | 0 | case kMatchComplete: { |
4405 | 0 | p++; |
4406 | 0 | match = 5; |
4407 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4408 | 0 | } |
4409 | 0 | case kMatchPause: { |
4410 | 0 | return s_n_llhttp__internal__n_after_start_req_8; |
4411 | 0 | } |
4412 | 0 | case kMatchMismatch: { |
4413 | 0 | goto s_n_llhttp__internal__n_error_108; |
4414 | 0 | } |
4415 | 0 | } |
4416 | 0 | /* UNREACHABLE */; |
4417 | 0 | abort(); |
4418 | 0 | } |
4419 | 0 | case s_n_llhttp__internal__n_after_start_req_9: |
4420 | 0 | s_n_llhttp__internal__n_after_start_req_9: { |
4421 | 0 | if (p == endp) { |
4422 | 0 | return s_n_llhttp__internal__n_after_start_req_9; |
4423 | 0 | } |
4424 | 0 | switch (*p) { |
4425 | 0 | case 'Y': { |
4426 | 0 | p++; |
4427 | 0 | match = 8; |
4428 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4429 | 0 | } |
4430 | 0 | default: { |
4431 | 0 | goto s_n_llhttp__internal__n_error_108; |
4432 | 0 | } |
4433 | 0 | } |
4434 | 0 | /* UNREACHABLE */; |
4435 | 0 | abort(); |
4436 | 0 | } |
4437 | 0 | case s_n_llhttp__internal__n_after_start_req_7: |
4438 | 0 | s_n_llhttp__internal__n_after_start_req_7: { |
4439 | 0 | if (p == endp) { |
4440 | 0 | return s_n_llhttp__internal__n_after_start_req_7; |
4441 | 0 | } |
4442 | 0 | switch (*p) { |
4443 | 0 | case 'N': { |
4444 | 0 | p++; |
4445 | 0 | goto s_n_llhttp__internal__n_after_start_req_8; |
4446 | 0 | } |
4447 | 0 | case 'P': { |
4448 | 0 | p++; |
4449 | 0 | goto s_n_llhttp__internal__n_after_start_req_9; |
4450 | 0 | } |
4451 | 0 | default: { |
4452 | 0 | goto s_n_llhttp__internal__n_error_108; |
4453 | 0 | } |
4454 | 0 | } |
4455 | 0 | /* UNREACHABLE */; |
4456 | 0 | abort(); |
4457 | 0 | } |
4458 | 0 | case s_n_llhttp__internal__n_after_start_req_5: |
4459 | 0 | s_n_llhttp__internal__n_after_start_req_5: { |
4460 | 0 | if (p == endp) { |
4461 | 0 | return s_n_llhttp__internal__n_after_start_req_5; |
4462 | 0 | } |
4463 | 0 | switch (*p) { |
4464 | 0 | case 'H': { |
4465 | 0 | p++; |
4466 | 0 | goto s_n_llhttp__internal__n_after_start_req_6; |
4467 | 0 | } |
4468 | 0 | case 'O': { |
4469 | 0 | p++; |
4470 | 0 | goto s_n_llhttp__internal__n_after_start_req_7; |
4471 | 0 | } |
4472 | 0 | default: { |
4473 | 0 | goto s_n_llhttp__internal__n_error_108; |
4474 | 0 | } |
4475 | 0 | } |
4476 | 0 | /* UNREACHABLE */; |
4477 | 0 | abort(); |
4478 | 0 | } |
4479 | 0 | case s_n_llhttp__internal__n_after_start_req_12: |
4480 | 0 | s_n_llhttp__internal__n_after_start_req_12: { |
4481 | 0 | llparse_match_t match_seq; |
4482 | | |
4483 | 0 | if (p == endp) { |
4484 | 0 | return s_n_llhttp__internal__n_after_start_req_12; |
4485 | 0 | } |
4486 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 3); |
4487 | 0 | p = match_seq.current; |
4488 | 0 | switch (match_seq.status) { |
4489 | 0 | case kMatchComplete: { |
4490 | 0 | p++; |
4491 | 0 | match = 0; |
4492 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4493 | 0 | } |
4494 | 0 | case kMatchPause: { |
4495 | 0 | return s_n_llhttp__internal__n_after_start_req_12; |
4496 | 0 | } |
4497 | 0 | case kMatchMismatch: { |
4498 | 0 | goto s_n_llhttp__internal__n_error_108; |
4499 | 0 | } |
4500 | 0 | } |
4501 | 0 | /* UNREACHABLE */; |
4502 | 0 | abort(); |
4503 | 0 | } |
4504 | 0 | case s_n_llhttp__internal__n_after_start_req_13: |
4505 | 0 | s_n_llhttp__internal__n_after_start_req_13: { |
4506 | 0 | llparse_match_t match_seq; |
4507 | | |
4508 | 0 | if (p == endp) { |
4509 | 0 | return s_n_llhttp__internal__n_after_start_req_13; |
4510 | 0 | } |
4511 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 5); |
4512 | 0 | p = match_seq.current; |
4513 | 0 | switch (match_seq.status) { |
4514 | 0 | case kMatchComplete: { |
4515 | 0 | p++; |
4516 | 0 | match = 35; |
4517 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4518 | 0 | } |
4519 | 0 | case kMatchPause: { |
4520 | 0 | return s_n_llhttp__internal__n_after_start_req_13; |
4521 | 0 | } |
4522 | 0 | case kMatchMismatch: { |
4523 | 0 | goto s_n_llhttp__internal__n_error_108; |
4524 | 0 | } |
4525 | 0 | } |
4526 | 0 | /* UNREACHABLE */; |
4527 | 0 | abort(); |
4528 | 0 | } |
4529 | 0 | case s_n_llhttp__internal__n_after_start_req_11: |
4530 | 0 | s_n_llhttp__internal__n_after_start_req_11: { |
4531 | 0 | if (p == endp) { |
4532 | 0 | return s_n_llhttp__internal__n_after_start_req_11; |
4533 | 0 | } |
4534 | 0 | switch (*p) { |
4535 | 0 | case 'L': { |
4536 | 0 | p++; |
4537 | 0 | goto s_n_llhttp__internal__n_after_start_req_12; |
4538 | 0 | } |
4539 | 0 | case 'S': { |
4540 | 0 | p++; |
4541 | 0 | goto s_n_llhttp__internal__n_after_start_req_13; |
4542 | 0 | } |
4543 | 0 | default: { |
4544 | 0 | goto s_n_llhttp__internal__n_error_108; |
4545 | 0 | } |
4546 | 0 | } |
4547 | 0 | /* UNREACHABLE */; |
4548 | 0 | abort(); |
4549 | 0 | } |
4550 | 0 | case s_n_llhttp__internal__n_after_start_req_10: |
4551 | 0 | s_n_llhttp__internal__n_after_start_req_10: { |
4552 | 0 | if (p == endp) { |
4553 | 0 | return s_n_llhttp__internal__n_after_start_req_10; |
4554 | 0 | } |
4555 | 0 | switch (*p) { |
4556 | 0 | case 'E': { |
4557 | 0 | p++; |
4558 | 0 | goto s_n_llhttp__internal__n_after_start_req_11; |
4559 | 0 | } |
4560 | 0 | default: { |
4561 | 0 | goto s_n_llhttp__internal__n_error_108; |
4562 | 0 | } |
4563 | 0 | } |
4564 | 0 | /* UNREACHABLE */; |
4565 | 0 | abort(); |
4566 | 0 | } |
4567 | 0 | case s_n_llhttp__internal__n_after_start_req_14: |
4568 | 0 | s_n_llhttp__internal__n_after_start_req_14: { |
4569 | 0 | llparse_match_t match_seq; |
4570 | | |
4571 | 0 | if (p == endp) { |
4572 | 0 | return s_n_llhttp__internal__n_after_start_req_14; |
4573 | 0 | } |
4574 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 4); |
4575 | 0 | p = match_seq.current; |
4576 | 0 | switch (match_seq.status) { |
4577 | 0 | case kMatchComplete: { |
4578 | 0 | p++; |
4579 | 0 | match = 45; |
4580 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4581 | 0 | } |
4582 | 0 | case kMatchPause: { |
4583 | 0 | return s_n_llhttp__internal__n_after_start_req_14; |
4584 | 0 | } |
4585 | 0 | case kMatchMismatch: { |
4586 | 0 | goto s_n_llhttp__internal__n_error_108; |
4587 | 0 | } |
4588 | 0 | } |
4589 | 0 | /* UNREACHABLE */; |
4590 | 0 | abort(); |
4591 | 0 | } |
4592 | 0 | case s_n_llhttp__internal__n_after_start_req_17: |
4593 | 0 | s_n_llhttp__internal__n_after_start_req_17: { |
4594 | 0 | llparse_match_t match_seq; |
4595 | | |
4596 | 0 | if (p == endp) { |
4597 | 0 | return s_n_llhttp__internal__n_after_start_req_17; |
4598 | 0 | } |
4599 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 9); |
4600 | 0 | p = match_seq.current; |
4601 | 0 | switch (match_seq.status) { |
4602 | 0 | case kMatchComplete: { |
4603 | 0 | p++; |
4604 | 0 | match = 41; |
4605 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4606 | 0 | } |
4607 | 0 | case kMatchPause: { |
4608 | 0 | return s_n_llhttp__internal__n_after_start_req_17; |
4609 | 0 | } |
4610 | 0 | case kMatchMismatch: { |
4611 | 0 | goto s_n_llhttp__internal__n_error_108; |
4612 | 0 | } |
4613 | 0 | } |
4614 | 0 | /* UNREACHABLE */; |
4615 | 0 | abort(); |
4616 | 0 | } |
4617 | 0 | case s_n_llhttp__internal__n_after_start_req_16: |
4618 | 0 | s_n_llhttp__internal__n_after_start_req_16: { |
4619 | 0 | if (p == endp) { |
4620 | 0 | return s_n_llhttp__internal__n_after_start_req_16; |
4621 | 0 | } |
4622 | 0 | switch (*p) { |
4623 | 0 | case '_': { |
4624 | 0 | p++; |
4625 | 0 | goto s_n_llhttp__internal__n_after_start_req_17; |
4626 | 0 | } |
4627 | 0 | default: { |
4628 | 0 | match = 1; |
4629 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4630 | 0 | } |
4631 | 0 | } |
4632 | 0 | /* UNREACHABLE */; |
4633 | 0 | abort(); |
4634 | 0 | } |
4635 | 0 | case s_n_llhttp__internal__n_after_start_req_15: |
4636 | 0 | s_n_llhttp__internal__n_after_start_req_15: { |
4637 | 0 | llparse_match_t match_seq; |
4638 | | |
4639 | 0 | if (p == endp) { |
4640 | 0 | return s_n_llhttp__internal__n_after_start_req_15; |
4641 | 0 | } |
4642 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2); |
4643 | 0 | p = match_seq.current; |
4644 | 0 | switch (match_seq.status) { |
4645 | 0 | case kMatchComplete: { |
4646 | 0 | p++; |
4647 | 0 | goto s_n_llhttp__internal__n_after_start_req_16; |
4648 | 0 | } |
4649 | 0 | case kMatchPause: { |
4650 | 0 | return s_n_llhttp__internal__n_after_start_req_15; |
4651 | 0 | } |
4652 | 0 | case kMatchMismatch: { |
4653 | 0 | goto s_n_llhttp__internal__n_error_108; |
4654 | 0 | } |
4655 | 0 | } |
4656 | 0 | /* UNREACHABLE */; |
4657 | 0 | abort(); |
4658 | 0 | } |
4659 | 0 | case s_n_llhttp__internal__n_after_start_req_18: |
4660 | 0 | s_n_llhttp__internal__n_after_start_req_18: { |
4661 | 0 | llparse_match_t match_seq; |
4662 | | |
4663 | 0 | if (p == endp) { |
4664 | 0 | return s_n_llhttp__internal__n_after_start_req_18; |
4665 | 0 | } |
4666 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 3); |
4667 | 0 | p = match_seq.current; |
4668 | 0 | switch (match_seq.status) { |
4669 | 0 | case kMatchComplete: { |
4670 | 0 | p++; |
4671 | 0 | match = 2; |
4672 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4673 | 0 | } |
4674 | 0 | case kMatchPause: { |
4675 | 0 | return s_n_llhttp__internal__n_after_start_req_18; |
4676 | 0 | } |
4677 | 0 | case kMatchMismatch: { |
4678 | 0 | goto s_n_llhttp__internal__n_error_108; |
4679 | 0 | } |
4680 | 0 | } |
4681 | 0 | /* UNREACHABLE */; |
4682 | 0 | abort(); |
4683 | 0 | } |
4684 | 0 | case s_n_llhttp__internal__n_after_start_req_20: |
4685 | 0 | s_n_llhttp__internal__n_after_start_req_20: { |
4686 | 0 | llparse_match_t match_seq; |
4687 | | |
4688 | 0 | if (p == endp) { |
4689 | 0 | return s_n_llhttp__internal__n_after_start_req_20; |
4690 | 0 | } |
4691 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 2); |
4692 | 0 | p = match_seq.current; |
4693 | 0 | switch (match_seq.status) { |
4694 | 0 | case kMatchComplete: { |
4695 | 0 | p++; |
4696 | 0 | match = 31; |
4697 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4698 | 0 | } |
4699 | 0 | case kMatchPause: { |
4700 | 0 | return s_n_llhttp__internal__n_after_start_req_20; |
4701 | 0 | } |
4702 | 0 | case kMatchMismatch: { |
4703 | 0 | goto s_n_llhttp__internal__n_error_108; |
4704 | 0 | } |
4705 | 0 | } |
4706 | 0 | /* UNREACHABLE */; |
4707 | 0 | abort(); |
4708 | 0 | } |
4709 | 0 | case s_n_llhttp__internal__n_after_start_req_21: |
4710 | 0 | s_n_llhttp__internal__n_after_start_req_21: { |
4711 | 0 | llparse_match_t match_seq; |
4712 | | |
4713 | 0 | if (p == endp) { |
4714 | 0 | return s_n_llhttp__internal__n_after_start_req_21; |
4715 | 0 | } |
4716 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 2); |
4717 | 0 | p = match_seq.current; |
4718 | 0 | switch (match_seq.status) { |
4719 | 0 | case kMatchComplete: { |
4720 | 0 | p++; |
4721 | 0 | match = 9; |
4722 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4723 | 0 | } |
4724 | 0 | case kMatchPause: { |
4725 | 0 | return s_n_llhttp__internal__n_after_start_req_21; |
4726 | 0 | } |
4727 | 0 | case kMatchMismatch: { |
4728 | 0 | goto s_n_llhttp__internal__n_error_108; |
4729 | 0 | } |
4730 | 0 | } |
4731 | 0 | /* UNREACHABLE */; |
4732 | 0 | abort(); |
4733 | 0 | } |
4734 | 0 | case s_n_llhttp__internal__n_after_start_req_19: |
4735 | 0 | s_n_llhttp__internal__n_after_start_req_19: { |
4736 | 0 | if (p == endp) { |
4737 | 0 | return s_n_llhttp__internal__n_after_start_req_19; |
4738 | 0 | } |
4739 | 0 | switch (*p) { |
4740 | 0 | case 'I': { |
4741 | 0 | p++; |
4742 | 0 | goto s_n_llhttp__internal__n_after_start_req_20; |
4743 | 0 | } |
4744 | 0 | case 'O': { |
4745 | 0 | p++; |
4746 | 0 | goto s_n_llhttp__internal__n_after_start_req_21; |
4747 | 0 | } |
4748 | 0 | default: { |
4749 | 0 | goto s_n_llhttp__internal__n_error_108; |
4750 | 0 | } |
4751 | 0 | } |
4752 | 0 | /* UNREACHABLE */; |
4753 | 0 | abort(); |
4754 | 0 | } |
4755 | 0 | case s_n_llhttp__internal__n_after_start_req_23: |
4756 | 0 | s_n_llhttp__internal__n_after_start_req_23: { |
4757 | 0 | llparse_match_t match_seq; |
4758 | | |
4759 | 0 | if (p == endp) { |
4760 | 0 | return s_n_llhttp__internal__n_after_start_req_23; |
4761 | 0 | } |
4762 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 6); |
4763 | 0 | p = match_seq.current; |
4764 | 0 | switch (match_seq.status) { |
4765 | 0 | case kMatchComplete: { |
4766 | 0 | p++; |
4767 | 0 | match = 24; |
4768 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4769 | 0 | } |
4770 | 0 | case kMatchPause: { |
4771 | 0 | return s_n_llhttp__internal__n_after_start_req_23; |
4772 | 0 | } |
4773 | 0 | case kMatchMismatch: { |
4774 | 0 | goto s_n_llhttp__internal__n_error_108; |
4775 | 0 | } |
4776 | 0 | } |
4777 | 0 | /* UNREACHABLE */; |
4778 | 0 | abort(); |
4779 | 0 | } |
4780 | 0 | case s_n_llhttp__internal__n_after_start_req_24: |
4781 | 0 | s_n_llhttp__internal__n_after_start_req_24: { |
4782 | 0 | llparse_match_t match_seq; |
4783 | | |
4784 | 0 | if (p == endp) { |
4785 | 0 | return s_n_llhttp__internal__n_after_start_req_24; |
4786 | 0 | } |
4787 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 3); |
4788 | 0 | p = match_seq.current; |
4789 | 0 | switch (match_seq.status) { |
4790 | 0 | case kMatchComplete: { |
4791 | 0 | p++; |
4792 | 0 | match = 23; |
4793 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4794 | 0 | } |
4795 | 0 | case kMatchPause: { |
4796 | 0 | return s_n_llhttp__internal__n_after_start_req_24; |
4797 | 0 | } |
4798 | 0 | case kMatchMismatch: { |
4799 | 0 | goto s_n_llhttp__internal__n_error_108; |
4800 | 0 | } |
4801 | 0 | } |
4802 | 0 | /* UNREACHABLE */; |
4803 | 0 | abort(); |
4804 | 0 | } |
4805 | 0 | case s_n_llhttp__internal__n_after_start_req_26: |
4806 | 0 | s_n_llhttp__internal__n_after_start_req_26: { |
4807 | 0 | llparse_match_t match_seq; |
4808 | | |
4809 | 0 | if (p == endp) { |
4810 | 0 | return s_n_llhttp__internal__n_after_start_req_26; |
4811 | 0 | } |
4812 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 7); |
4813 | 0 | p = match_seq.current; |
4814 | 0 | switch (match_seq.status) { |
4815 | 0 | case kMatchComplete: { |
4816 | 0 | p++; |
4817 | 0 | match = 21; |
4818 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4819 | 0 | } |
4820 | 0 | case kMatchPause: { |
4821 | 0 | return s_n_llhttp__internal__n_after_start_req_26; |
4822 | 0 | } |
4823 | 0 | case kMatchMismatch: { |
4824 | 0 | goto s_n_llhttp__internal__n_error_108; |
4825 | 0 | } |
4826 | 0 | } |
4827 | 0 | /* UNREACHABLE */; |
4828 | 0 | abort(); |
4829 | 0 | } |
4830 | 0 | case s_n_llhttp__internal__n_after_start_req_28: |
4831 | 0 | s_n_llhttp__internal__n_after_start_req_28: { |
4832 | 0 | llparse_match_t match_seq; |
4833 | | |
4834 | 0 | if (p == endp) { |
4835 | 0 | return s_n_llhttp__internal__n_after_start_req_28; |
4836 | 0 | } |
4837 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 6); |
4838 | 0 | p = match_seq.current; |
4839 | 0 | switch (match_seq.status) { |
4840 | 0 | case kMatchComplete: { |
4841 | 0 | p++; |
4842 | 0 | match = 30; |
4843 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4844 | 0 | } |
4845 | 0 | case kMatchPause: { |
4846 | 0 | return s_n_llhttp__internal__n_after_start_req_28; |
4847 | 0 | } |
4848 | 0 | case kMatchMismatch: { |
4849 | 0 | goto s_n_llhttp__internal__n_error_108; |
4850 | 0 | } |
4851 | 0 | } |
4852 | 0 | /* UNREACHABLE */; |
4853 | 0 | abort(); |
4854 | 0 | } |
4855 | 0 | case s_n_llhttp__internal__n_after_start_req_29: |
4856 | 0 | s_n_llhttp__internal__n_after_start_req_29: { |
4857 | 0 | if (p == endp) { |
4858 | 0 | return s_n_llhttp__internal__n_after_start_req_29; |
4859 | 0 | } |
4860 | 0 | switch (*p) { |
4861 | 0 | case 'L': { |
4862 | 0 | p++; |
4863 | 0 | match = 10; |
4864 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4865 | 0 | } |
4866 | 0 | default: { |
4867 | 0 | goto s_n_llhttp__internal__n_error_108; |
4868 | 0 | } |
4869 | 0 | } |
4870 | 0 | /* UNREACHABLE */; |
4871 | 0 | abort(); |
4872 | 0 | } |
4873 | 0 | case s_n_llhttp__internal__n_after_start_req_27: |
4874 | 0 | s_n_llhttp__internal__n_after_start_req_27: { |
4875 | 0 | if (p == endp) { |
4876 | 0 | return s_n_llhttp__internal__n_after_start_req_27; |
4877 | 0 | } |
4878 | 0 | switch (*p) { |
4879 | 0 | case 'A': { |
4880 | 0 | p++; |
4881 | 0 | goto s_n_llhttp__internal__n_after_start_req_28; |
4882 | 0 | } |
4883 | 0 | case 'O': { |
4884 | 0 | p++; |
4885 | 0 | goto s_n_llhttp__internal__n_after_start_req_29; |
4886 | 0 | } |
4887 | 0 | default: { |
4888 | 0 | goto s_n_llhttp__internal__n_error_108; |
4889 | 0 | } |
4890 | 0 | } |
4891 | 0 | /* UNREACHABLE */; |
4892 | 0 | abort(); |
4893 | 0 | } |
4894 | 0 | case s_n_llhttp__internal__n_after_start_req_25: |
4895 | 0 | s_n_llhttp__internal__n_after_start_req_25: { |
4896 | 0 | if (p == endp) { |
4897 | 0 | return s_n_llhttp__internal__n_after_start_req_25; |
4898 | 0 | } |
4899 | 0 | switch (*p) { |
4900 | 0 | case 'A': { |
4901 | 0 | p++; |
4902 | 0 | goto s_n_llhttp__internal__n_after_start_req_26; |
4903 | 0 | } |
4904 | 0 | case 'C': { |
4905 | 0 | p++; |
4906 | 0 | goto s_n_llhttp__internal__n_after_start_req_27; |
4907 | 0 | } |
4908 | 0 | default: { |
4909 | 0 | goto s_n_llhttp__internal__n_error_108; |
4910 | 0 | } |
4911 | 0 | } |
4912 | 0 | /* UNREACHABLE */; |
4913 | 0 | abort(); |
4914 | 0 | } |
4915 | 0 | case s_n_llhttp__internal__n_after_start_req_30: |
4916 | 0 | s_n_llhttp__internal__n_after_start_req_30: { |
4917 | 0 | llparse_match_t match_seq; |
4918 | | |
4919 | 0 | if (p == endp) { |
4920 | 0 | return s_n_llhttp__internal__n_after_start_req_30; |
4921 | 0 | } |
4922 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 2); |
4923 | 0 | p = match_seq.current; |
4924 | 0 | switch (match_seq.status) { |
4925 | 0 | case kMatchComplete: { |
4926 | 0 | p++; |
4927 | 0 | match = 11; |
4928 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4929 | 0 | } |
4930 | 0 | case kMatchPause: { |
4931 | 0 | return s_n_llhttp__internal__n_after_start_req_30; |
4932 | 0 | } |
4933 | 0 | case kMatchMismatch: { |
4934 | 0 | goto s_n_llhttp__internal__n_error_108; |
4935 | 0 | } |
4936 | 0 | } |
4937 | 0 | /* UNREACHABLE */; |
4938 | 0 | abort(); |
4939 | 0 | } |
4940 | 0 | case s_n_llhttp__internal__n_after_start_req_22: |
4941 | 0 | s_n_llhttp__internal__n_after_start_req_22: { |
4942 | 0 | if (p == endp) { |
4943 | 0 | return s_n_llhttp__internal__n_after_start_req_22; |
4944 | 0 | } |
4945 | 0 | switch (*p) { |
4946 | 0 | case '-': { |
4947 | 0 | p++; |
4948 | 0 | goto s_n_llhttp__internal__n_after_start_req_23; |
4949 | 0 | } |
4950 | 0 | case 'E': { |
4951 | 0 | p++; |
4952 | 0 | goto s_n_llhttp__internal__n_after_start_req_24; |
4953 | 0 | } |
4954 | 0 | case 'K': { |
4955 | 0 | p++; |
4956 | 0 | goto s_n_llhttp__internal__n_after_start_req_25; |
4957 | 0 | } |
4958 | 0 | case 'O': { |
4959 | 0 | p++; |
4960 | 0 | goto s_n_llhttp__internal__n_after_start_req_30; |
4961 | 0 | } |
4962 | 0 | default: { |
4963 | 0 | goto s_n_llhttp__internal__n_error_108; |
4964 | 0 | } |
4965 | 0 | } |
4966 | 0 | /* UNREACHABLE */; |
4967 | 0 | abort(); |
4968 | 0 | } |
4969 | 0 | case s_n_llhttp__internal__n_after_start_req_31: |
4970 | 0 | s_n_llhttp__internal__n_after_start_req_31: { |
4971 | 0 | llparse_match_t match_seq; |
4972 | | |
4973 | 0 | if (p == endp) { |
4974 | 0 | return s_n_llhttp__internal__n_after_start_req_31; |
4975 | 0 | } |
4976 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 5); |
4977 | 0 | p = match_seq.current; |
4978 | 0 | switch (match_seq.status) { |
4979 | 0 | case kMatchComplete: { |
4980 | 0 | p++; |
4981 | 0 | match = 25; |
4982 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
4983 | 0 | } |
4984 | 0 | case kMatchPause: { |
4985 | 0 | return s_n_llhttp__internal__n_after_start_req_31; |
4986 | 0 | } |
4987 | 0 | case kMatchMismatch: { |
4988 | 0 | goto s_n_llhttp__internal__n_error_108; |
4989 | 0 | } |
4990 | 0 | } |
4991 | 0 | /* UNREACHABLE */; |
4992 | 0 | abort(); |
4993 | 0 | } |
4994 | 0 | case s_n_llhttp__internal__n_after_start_req_32: |
4995 | 0 | s_n_llhttp__internal__n_after_start_req_32: { |
4996 | 0 | llparse_match_t match_seq; |
4997 | | |
4998 | 0 | if (p == endp) { |
4999 | 0 | return s_n_llhttp__internal__n_after_start_req_32; |
5000 | 0 | } |
5001 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 6); |
5002 | 0 | p = match_seq.current; |
5003 | 0 | switch (match_seq.status) { |
5004 | 0 | case kMatchComplete: { |
5005 | 0 | p++; |
5006 | 0 | match = 6; |
5007 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5008 | 0 | } |
5009 | 0 | case kMatchPause: { |
5010 | 0 | return s_n_llhttp__internal__n_after_start_req_32; |
5011 | 0 | } |
5012 | 0 | case kMatchMismatch: { |
5013 | 0 | goto s_n_llhttp__internal__n_error_108; |
5014 | 0 | } |
5015 | 0 | } |
5016 | 0 | /* UNREACHABLE */; |
5017 | 0 | abort(); |
5018 | 0 | } |
5019 | 0 | case s_n_llhttp__internal__n_after_start_req_35: |
5020 | 0 | s_n_llhttp__internal__n_after_start_req_35: { |
5021 | 0 | llparse_match_t match_seq; |
5022 | | |
5023 | 0 | if (p == endp) { |
5024 | 0 | return s_n_llhttp__internal__n_after_start_req_35; |
5025 | 0 | } |
5026 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 2); |
5027 | 0 | p = match_seq.current; |
5028 | 0 | switch (match_seq.status) { |
5029 | 0 | case kMatchComplete: { |
5030 | 0 | p++; |
5031 | 0 | match = 28; |
5032 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5033 | 0 | } |
5034 | 0 | case kMatchPause: { |
5035 | 0 | return s_n_llhttp__internal__n_after_start_req_35; |
5036 | 0 | } |
5037 | 0 | case kMatchMismatch: { |
5038 | 0 | goto s_n_llhttp__internal__n_error_108; |
5039 | 0 | } |
5040 | 0 | } |
5041 | 0 | /* UNREACHABLE */; |
5042 | 0 | abort(); |
5043 | 0 | } |
5044 | 0 | case s_n_llhttp__internal__n_after_start_req_36: |
5045 | 0 | s_n_llhttp__internal__n_after_start_req_36: { |
5046 | 0 | llparse_match_t match_seq; |
5047 | | |
5048 | 0 | if (p == endp) { |
5049 | 0 | return s_n_llhttp__internal__n_after_start_req_36; |
5050 | 0 | } |
5051 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2); |
5052 | 0 | p = match_seq.current; |
5053 | 0 | switch (match_seq.status) { |
5054 | 0 | case kMatchComplete: { |
5055 | 0 | p++; |
5056 | 0 | match = 39; |
5057 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5058 | 0 | } |
5059 | 0 | case kMatchPause: { |
5060 | 0 | return s_n_llhttp__internal__n_after_start_req_36; |
5061 | 0 | } |
5062 | 0 | case kMatchMismatch: { |
5063 | 0 | goto s_n_llhttp__internal__n_error_108; |
5064 | 0 | } |
5065 | 0 | } |
5066 | 0 | /* UNREACHABLE */; |
5067 | 0 | abort(); |
5068 | 0 | } |
5069 | 0 | case s_n_llhttp__internal__n_after_start_req_34: |
5070 | 0 | s_n_llhttp__internal__n_after_start_req_34: { |
5071 | 0 | if (p == endp) { |
5072 | 0 | return s_n_llhttp__internal__n_after_start_req_34; |
5073 | 0 | } |
5074 | 0 | switch (*p) { |
5075 | 0 | case 'T': { |
5076 | 0 | p++; |
5077 | 0 | goto s_n_llhttp__internal__n_after_start_req_35; |
5078 | 0 | } |
5079 | 0 | case 'U': { |
5080 | 0 | p++; |
5081 | 0 | goto s_n_llhttp__internal__n_after_start_req_36; |
5082 | 0 | } |
5083 | 0 | default: { |
5084 | 0 | goto s_n_llhttp__internal__n_error_108; |
5085 | 0 | } |
5086 | 0 | } |
5087 | 0 | /* UNREACHABLE */; |
5088 | 0 | abort(); |
5089 | 0 | } |
5090 | 0 | case s_n_llhttp__internal__n_after_start_req_37: |
5091 | 0 | s_n_llhttp__internal__n_after_start_req_37: { |
5092 | 0 | llparse_match_t match_seq; |
5093 | | |
5094 | 0 | if (p == endp) { |
5095 | 0 | return s_n_llhttp__internal__n_after_start_req_37; |
5096 | 0 | } |
5097 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2); |
5098 | 0 | p = match_seq.current; |
5099 | 0 | switch (match_seq.status) { |
5100 | 0 | case kMatchComplete: { |
5101 | 0 | p++; |
5102 | 0 | match = 38; |
5103 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5104 | 0 | } |
5105 | 0 | case kMatchPause: { |
5106 | 0 | return s_n_llhttp__internal__n_after_start_req_37; |
5107 | 0 | } |
5108 | 0 | case kMatchMismatch: { |
5109 | 0 | goto s_n_llhttp__internal__n_error_108; |
5110 | 0 | } |
5111 | 0 | } |
5112 | 0 | /* UNREACHABLE */; |
5113 | 0 | abort(); |
5114 | 0 | } |
5115 | 0 | case s_n_llhttp__internal__n_after_start_req_38: |
5116 | 0 | s_n_llhttp__internal__n_after_start_req_38: { |
5117 | 0 | llparse_match_t match_seq; |
5118 | | |
5119 | 0 | if (p == endp) { |
5120 | 0 | return s_n_llhttp__internal__n_after_start_req_38; |
5121 | 0 | } |
5122 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2); |
5123 | 0 | p = match_seq.current; |
5124 | 0 | switch (match_seq.status) { |
5125 | 0 | case kMatchComplete: { |
5126 | 0 | p++; |
5127 | 0 | match = 3; |
5128 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5129 | 0 | } |
5130 | 0 | case kMatchPause: { |
5131 | 0 | return s_n_llhttp__internal__n_after_start_req_38; |
5132 | 0 | } |
5133 | 0 | case kMatchMismatch: { |
5134 | 0 | goto s_n_llhttp__internal__n_error_108; |
5135 | 0 | } |
5136 | 0 | } |
5137 | 0 | /* UNREACHABLE */; |
5138 | 0 | abort(); |
5139 | 0 | } |
5140 | 0 | case s_n_llhttp__internal__n_after_start_req_42: |
5141 | 0 | s_n_llhttp__internal__n_after_start_req_42: { |
5142 | 0 | llparse_match_t match_seq; |
5143 | | |
5144 | 0 | if (p == endp) { |
5145 | 0 | return s_n_llhttp__internal__n_after_start_req_42; |
5146 | 0 | } |
5147 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 3); |
5148 | 0 | p = match_seq.current; |
5149 | 0 | switch (match_seq.status) { |
5150 | 0 | case kMatchComplete: { |
5151 | 0 | p++; |
5152 | 0 | match = 12; |
5153 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5154 | 0 | } |
5155 | 0 | case kMatchPause: { |
5156 | 0 | return s_n_llhttp__internal__n_after_start_req_42; |
5157 | 0 | } |
5158 | 0 | case kMatchMismatch: { |
5159 | 0 | goto s_n_llhttp__internal__n_error_108; |
5160 | 0 | } |
5161 | 0 | } |
5162 | 0 | /* UNREACHABLE */; |
5163 | 0 | abort(); |
5164 | 0 | } |
5165 | 0 | case s_n_llhttp__internal__n_after_start_req_43: |
5166 | 0 | s_n_llhttp__internal__n_after_start_req_43: { |
5167 | 0 | llparse_match_t match_seq; |
5168 | | |
5169 | 0 | if (p == endp) { |
5170 | 0 | return s_n_llhttp__internal__n_after_start_req_43; |
5171 | 0 | } |
5172 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 4); |
5173 | 0 | p = match_seq.current; |
5174 | 0 | switch (match_seq.status) { |
5175 | 0 | case kMatchComplete: { |
5176 | 0 | p++; |
5177 | 0 | match = 13; |
5178 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5179 | 0 | } |
5180 | 0 | case kMatchPause: { |
5181 | 0 | return s_n_llhttp__internal__n_after_start_req_43; |
5182 | 0 | } |
5183 | 0 | case kMatchMismatch: { |
5184 | 0 | goto s_n_llhttp__internal__n_error_108; |
5185 | 0 | } |
5186 | 0 | } |
5187 | 0 | /* UNREACHABLE */; |
5188 | 0 | abort(); |
5189 | 0 | } |
5190 | 0 | case s_n_llhttp__internal__n_after_start_req_41: |
5191 | 0 | s_n_llhttp__internal__n_after_start_req_41: { |
5192 | 0 | if (p == endp) { |
5193 | 0 | return s_n_llhttp__internal__n_after_start_req_41; |
5194 | 0 | } |
5195 | 0 | switch (*p) { |
5196 | 0 | case 'F': { |
5197 | 0 | p++; |
5198 | 0 | goto s_n_llhttp__internal__n_after_start_req_42; |
5199 | 0 | } |
5200 | 0 | case 'P': { |
5201 | 0 | p++; |
5202 | 0 | goto s_n_llhttp__internal__n_after_start_req_43; |
5203 | 0 | } |
5204 | 0 | default: { |
5205 | 0 | goto s_n_llhttp__internal__n_error_108; |
5206 | 0 | } |
5207 | 0 | } |
5208 | 0 | /* UNREACHABLE */; |
5209 | 0 | abort(); |
5210 | 0 | } |
5211 | 0 | case s_n_llhttp__internal__n_after_start_req_40: |
5212 | 0 | s_n_llhttp__internal__n_after_start_req_40: { |
5213 | 0 | if (p == endp) { |
5214 | 0 | return s_n_llhttp__internal__n_after_start_req_40; |
5215 | 0 | } |
5216 | 0 | switch (*p) { |
5217 | 0 | case 'P': { |
5218 | 0 | p++; |
5219 | 0 | goto s_n_llhttp__internal__n_after_start_req_41; |
5220 | 0 | } |
5221 | 0 | default: { |
5222 | 0 | goto s_n_llhttp__internal__n_error_108; |
5223 | 0 | } |
5224 | 0 | } |
5225 | 0 | /* UNREACHABLE */; |
5226 | 0 | abort(); |
5227 | 0 | } |
5228 | 0 | case s_n_llhttp__internal__n_after_start_req_39: |
5229 | 0 | s_n_llhttp__internal__n_after_start_req_39: { |
5230 | 0 | if (p == endp) { |
5231 | 0 | return s_n_llhttp__internal__n_after_start_req_39; |
5232 | 0 | } |
5233 | 0 | switch (*p) { |
5234 | 0 | case 'I': { |
5235 | 0 | p++; |
5236 | 0 | match = 34; |
5237 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5238 | 0 | } |
5239 | 0 | case 'O': { |
5240 | 0 | p++; |
5241 | 0 | goto s_n_llhttp__internal__n_after_start_req_40; |
5242 | 0 | } |
5243 | 0 | default: { |
5244 | 0 | goto s_n_llhttp__internal__n_error_108; |
5245 | 0 | } |
5246 | 0 | } |
5247 | 0 | /* UNREACHABLE */; |
5248 | 0 | abort(); |
5249 | 0 | } |
5250 | 0 | case s_n_llhttp__internal__n_after_start_req_45: |
5251 | 0 | s_n_llhttp__internal__n_after_start_req_45: { |
5252 | 0 | llparse_match_t match_seq; |
5253 | | |
5254 | 0 | if (p == endp) { |
5255 | 0 | return s_n_llhttp__internal__n_after_start_req_45; |
5256 | 0 | } |
5257 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 2); |
5258 | 0 | p = match_seq.current; |
5259 | 0 | switch (match_seq.status) { |
5260 | 0 | case kMatchComplete: { |
5261 | 0 | p++; |
5262 | 0 | match = 29; |
5263 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5264 | 0 | } |
5265 | 0 | case kMatchPause: { |
5266 | 0 | return s_n_llhttp__internal__n_after_start_req_45; |
5267 | 0 | } |
5268 | 0 | case kMatchMismatch: { |
5269 | 0 | goto s_n_llhttp__internal__n_error_108; |
5270 | 0 | } |
5271 | 0 | } |
5272 | 0 | /* UNREACHABLE */; |
5273 | 0 | abort(); |
5274 | 0 | } |
5275 | 0 | case s_n_llhttp__internal__n_after_start_req_44: |
5276 | 0 | s_n_llhttp__internal__n_after_start_req_44: { |
5277 | 0 | if (p == endp) { |
5278 | 0 | return s_n_llhttp__internal__n_after_start_req_44; |
5279 | 0 | } |
5280 | 0 | switch (*p) { |
5281 | 0 | case 'R': { |
5282 | 0 | p++; |
5283 | 0 | goto s_n_llhttp__internal__n_after_start_req_45; |
5284 | 0 | } |
5285 | 0 | case 'T': { |
5286 | 0 | p++; |
5287 | 0 | match = 4; |
5288 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5289 | 0 | } |
5290 | 0 | default: { |
5291 | 0 | goto s_n_llhttp__internal__n_error_108; |
5292 | 0 | } |
5293 | 0 | } |
5294 | 0 | /* UNREACHABLE */; |
5295 | 0 | abort(); |
5296 | 0 | } |
5297 | 0 | case s_n_llhttp__internal__n_after_start_req_33: |
5298 | 0 | s_n_llhttp__internal__n_after_start_req_33: { |
5299 | 0 | if (p == endp) { |
5300 | 0 | return s_n_llhttp__internal__n_after_start_req_33; |
5301 | 0 | } |
5302 | 0 | switch (*p) { |
5303 | 0 | case 'A': { |
5304 | 0 | p++; |
5305 | 0 | goto s_n_llhttp__internal__n_after_start_req_34; |
5306 | 0 | } |
5307 | 0 | case 'L': { |
5308 | 0 | p++; |
5309 | 0 | goto s_n_llhttp__internal__n_after_start_req_37; |
5310 | 0 | } |
5311 | 0 | case 'O': { |
5312 | 0 | p++; |
5313 | 0 | goto s_n_llhttp__internal__n_after_start_req_38; |
5314 | 0 | } |
5315 | 0 | case 'R': { |
5316 | 0 | p++; |
5317 | 0 | goto s_n_llhttp__internal__n_after_start_req_39; |
5318 | 0 | } |
5319 | 0 | case 'U': { |
5320 | 0 | p++; |
5321 | 0 | goto s_n_llhttp__internal__n_after_start_req_44; |
5322 | 0 | } |
5323 | 0 | default: { |
5324 | 0 | goto s_n_llhttp__internal__n_error_108; |
5325 | 0 | } |
5326 | 0 | } |
5327 | 0 | /* UNREACHABLE */; |
5328 | 0 | abort(); |
5329 | 0 | } |
5330 | 0 | case s_n_llhttp__internal__n_after_start_req_46: |
5331 | 0 | s_n_llhttp__internal__n_after_start_req_46: { |
5332 | 0 | llparse_match_t match_seq; |
5333 | | |
5334 | 0 | if (p == endp) { |
5335 | 0 | return s_n_llhttp__internal__n_after_start_req_46; |
5336 | 0 | } |
5337 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 4); |
5338 | 0 | p = match_seq.current; |
5339 | 0 | switch (match_seq.status) { |
5340 | 0 | case kMatchComplete: { |
5341 | 0 | p++; |
5342 | 0 | match = 46; |
5343 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5344 | 0 | } |
5345 | 0 | case kMatchPause: { |
5346 | 0 | return s_n_llhttp__internal__n_after_start_req_46; |
5347 | 0 | } |
5348 | 0 | case kMatchMismatch: { |
5349 | 0 | goto s_n_llhttp__internal__n_error_108; |
5350 | 0 | } |
5351 | 0 | } |
5352 | 0 | /* UNREACHABLE */; |
5353 | 0 | abort(); |
5354 | 0 | } |
5355 | 0 | case s_n_llhttp__internal__n_after_start_req_49: |
5356 | 0 | s_n_llhttp__internal__n_after_start_req_49: { |
5357 | 0 | llparse_match_t match_seq; |
5358 | | |
5359 | 0 | if (p == endp) { |
5360 | 0 | return s_n_llhttp__internal__n_after_start_req_49; |
5361 | 0 | } |
5362 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3); |
5363 | 0 | p = match_seq.current; |
5364 | 0 | switch (match_seq.status) { |
5365 | 0 | case kMatchComplete: { |
5366 | 0 | p++; |
5367 | 0 | match = 17; |
5368 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5369 | 0 | } |
5370 | 0 | case kMatchPause: { |
5371 | 0 | return s_n_llhttp__internal__n_after_start_req_49; |
5372 | 0 | } |
5373 | 0 | case kMatchMismatch: { |
5374 | 0 | goto s_n_llhttp__internal__n_error_108; |
5375 | 0 | } |
5376 | 0 | } |
5377 | 0 | /* UNREACHABLE */; |
5378 | 0 | abort(); |
5379 | 0 | } |
5380 | 0 | case s_n_llhttp__internal__n_after_start_req_50: |
5381 | 0 | s_n_llhttp__internal__n_after_start_req_50: { |
5382 | 0 | llparse_match_t match_seq; |
5383 | | |
5384 | 0 | if (p == endp) { |
5385 | 0 | return s_n_llhttp__internal__n_after_start_req_50; |
5386 | 0 | } |
5387 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3); |
5388 | 0 | p = match_seq.current; |
5389 | 0 | switch (match_seq.status) { |
5390 | 0 | case kMatchComplete: { |
5391 | 0 | p++; |
5392 | 0 | match = 44; |
5393 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5394 | 0 | } |
5395 | 0 | case kMatchPause: { |
5396 | 0 | return s_n_llhttp__internal__n_after_start_req_50; |
5397 | 0 | } |
5398 | 0 | case kMatchMismatch: { |
5399 | 0 | goto s_n_llhttp__internal__n_error_108; |
5400 | 0 | } |
5401 | 0 | } |
5402 | 0 | /* UNREACHABLE */; |
5403 | 0 | abort(); |
5404 | 0 | } |
5405 | 0 | case s_n_llhttp__internal__n_after_start_req_51: |
5406 | 0 | s_n_llhttp__internal__n_after_start_req_51: { |
5407 | 0 | llparse_match_t match_seq; |
5408 | | |
5409 | 0 | if (p == endp) { |
5410 | 0 | return s_n_llhttp__internal__n_after_start_req_51; |
5411 | 0 | } |
5412 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 5); |
5413 | 0 | p = match_seq.current; |
5414 | 0 | switch (match_seq.status) { |
5415 | 0 | case kMatchComplete: { |
5416 | 0 | p++; |
5417 | 0 | match = 43; |
5418 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5419 | 0 | } |
5420 | 0 | case kMatchPause: { |
5421 | 0 | return s_n_llhttp__internal__n_after_start_req_51; |
5422 | 0 | } |
5423 | 0 | case kMatchMismatch: { |
5424 | 0 | goto s_n_llhttp__internal__n_error_108; |
5425 | 0 | } |
5426 | 0 | } |
5427 | 0 | /* UNREACHABLE */; |
5428 | 0 | abort(); |
5429 | 0 | } |
5430 | 0 | case s_n_llhttp__internal__n_after_start_req_52: |
5431 | 0 | s_n_llhttp__internal__n_after_start_req_52: { |
5432 | 0 | llparse_match_t match_seq; |
5433 | | |
5434 | 0 | if (p == endp) { |
5435 | 0 | return s_n_llhttp__internal__n_after_start_req_52; |
5436 | 0 | } |
5437 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 3); |
5438 | 0 | p = match_seq.current; |
5439 | 0 | switch (match_seq.status) { |
5440 | 0 | case kMatchComplete: { |
5441 | 0 | p++; |
5442 | 0 | match = 20; |
5443 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5444 | 0 | } |
5445 | 0 | case kMatchPause: { |
5446 | 0 | return s_n_llhttp__internal__n_after_start_req_52; |
5447 | 0 | } |
5448 | 0 | case kMatchMismatch: { |
5449 | 0 | goto s_n_llhttp__internal__n_error_108; |
5450 | 0 | } |
5451 | 0 | } |
5452 | 0 | /* UNREACHABLE */; |
5453 | 0 | abort(); |
5454 | 0 | } |
5455 | 0 | case s_n_llhttp__internal__n_after_start_req_48: |
5456 | 0 | s_n_llhttp__internal__n_after_start_req_48: { |
5457 | 0 | if (p == endp) { |
5458 | 0 | return s_n_llhttp__internal__n_after_start_req_48; |
5459 | 0 | } |
5460 | 0 | switch (*p) { |
5461 | 0 | case 'B': { |
5462 | 0 | p++; |
5463 | 0 | goto s_n_llhttp__internal__n_after_start_req_49; |
5464 | 0 | } |
5465 | 0 | case 'C': { |
5466 | 0 | p++; |
5467 | 0 | goto s_n_llhttp__internal__n_after_start_req_50; |
5468 | 0 | } |
5469 | 0 | case 'D': { |
5470 | 0 | p++; |
5471 | 0 | goto s_n_llhttp__internal__n_after_start_req_51; |
5472 | 0 | } |
5473 | 0 | case 'P': { |
5474 | 0 | p++; |
5475 | 0 | goto s_n_llhttp__internal__n_after_start_req_52; |
5476 | 0 | } |
5477 | 0 | default: { |
5478 | 0 | goto s_n_llhttp__internal__n_error_108; |
5479 | 0 | } |
5480 | 0 | } |
5481 | 0 | /* UNREACHABLE */; |
5482 | 0 | abort(); |
5483 | 0 | } |
5484 | 0 | case s_n_llhttp__internal__n_after_start_req_47: |
5485 | 0 | s_n_llhttp__internal__n_after_start_req_47: { |
5486 | 0 | if (p == endp) { |
5487 | 0 | return s_n_llhttp__internal__n_after_start_req_47; |
5488 | 0 | } |
5489 | 0 | switch (*p) { |
5490 | 0 | case 'E': { |
5491 | 0 | p++; |
5492 | 0 | goto s_n_llhttp__internal__n_after_start_req_48; |
5493 | 0 | } |
5494 | 0 | default: { |
5495 | 0 | goto s_n_llhttp__internal__n_error_108; |
5496 | 0 | } |
5497 | 0 | } |
5498 | 0 | /* UNREACHABLE */; |
5499 | 0 | abort(); |
5500 | 0 | } |
5501 | 0 | case s_n_llhttp__internal__n_after_start_req_55: |
5502 | 0 | s_n_llhttp__internal__n_after_start_req_55: { |
5503 | 0 | llparse_match_t match_seq; |
5504 | | |
5505 | 0 | if (p == endp) { |
5506 | 0 | return s_n_llhttp__internal__n_after_start_req_55; |
5507 | 0 | } |
5508 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 3); |
5509 | 0 | p = match_seq.current; |
5510 | 0 | switch (match_seq.status) { |
5511 | 0 | case kMatchComplete: { |
5512 | 0 | p++; |
5513 | 0 | match = 14; |
5514 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5515 | 0 | } |
5516 | 0 | case kMatchPause: { |
5517 | 0 | return s_n_llhttp__internal__n_after_start_req_55; |
5518 | 0 | } |
5519 | 0 | case kMatchMismatch: { |
5520 | 0 | goto s_n_llhttp__internal__n_error_108; |
5521 | 0 | } |
5522 | 0 | } |
5523 | 0 | /* UNREACHABLE */; |
5524 | 0 | abort(); |
5525 | 0 | } |
5526 | 0 | case s_n_llhttp__internal__n_after_start_req_57: |
5527 | 0 | s_n_llhttp__internal__n_after_start_req_57: { |
5528 | 0 | if (p == endp) { |
5529 | 0 | return s_n_llhttp__internal__n_after_start_req_57; |
5530 | 0 | } |
5531 | 0 | switch (*p) { |
5532 | 0 | case 'P': { |
5533 | 0 | p++; |
5534 | 0 | match = 37; |
5535 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5536 | 0 | } |
5537 | 0 | default: { |
5538 | 0 | goto s_n_llhttp__internal__n_error_108; |
5539 | 0 | } |
5540 | 0 | } |
5541 | 0 | /* UNREACHABLE */; |
5542 | 0 | abort(); |
5543 | 0 | } |
5544 | 0 | case s_n_llhttp__internal__n_after_start_req_58: |
5545 | 0 | s_n_llhttp__internal__n_after_start_req_58: { |
5546 | 0 | llparse_match_t match_seq; |
5547 | | |
5548 | 0 | if (p == endp) { |
5549 | 0 | return s_n_llhttp__internal__n_after_start_req_58; |
5550 | 0 | } |
5551 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 9); |
5552 | 0 | p = match_seq.current; |
5553 | 0 | switch (match_seq.status) { |
5554 | 0 | case kMatchComplete: { |
5555 | 0 | p++; |
5556 | 0 | match = 42; |
5557 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5558 | 0 | } |
5559 | 0 | case kMatchPause: { |
5560 | 0 | return s_n_llhttp__internal__n_after_start_req_58; |
5561 | 0 | } |
5562 | 0 | case kMatchMismatch: { |
5563 | 0 | goto s_n_llhttp__internal__n_error_108; |
5564 | 0 | } |
5565 | 0 | } |
5566 | 0 | /* UNREACHABLE */; |
5567 | 0 | abort(); |
5568 | 0 | } |
5569 | 0 | case s_n_llhttp__internal__n_after_start_req_56: |
5570 | 0 | s_n_llhttp__internal__n_after_start_req_56: { |
5571 | 0 | if (p == endp) { |
5572 | 0 | return s_n_llhttp__internal__n_after_start_req_56; |
5573 | 0 | } |
5574 | 0 | switch (*p) { |
5575 | 0 | case 'U': { |
5576 | 0 | p++; |
5577 | 0 | goto s_n_llhttp__internal__n_after_start_req_57; |
5578 | 0 | } |
5579 | 0 | case '_': { |
5580 | 0 | p++; |
5581 | 0 | goto s_n_llhttp__internal__n_after_start_req_58; |
5582 | 0 | } |
5583 | 0 | default: { |
5584 | 0 | goto s_n_llhttp__internal__n_error_108; |
5585 | 0 | } |
5586 | 0 | } |
5587 | 0 | /* UNREACHABLE */; |
5588 | 0 | abort(); |
5589 | 0 | } |
5590 | 0 | case s_n_llhttp__internal__n_after_start_req_54: |
5591 | 0 | s_n_llhttp__internal__n_after_start_req_54: { |
5592 | 0 | if (p == endp) { |
5593 | 0 | return s_n_llhttp__internal__n_after_start_req_54; |
5594 | 0 | } |
5595 | 0 | switch (*p) { |
5596 | 0 | case 'A': { |
5597 | 0 | p++; |
5598 | 0 | goto s_n_llhttp__internal__n_after_start_req_55; |
5599 | 0 | } |
5600 | 0 | case 'T': { |
5601 | 0 | p++; |
5602 | 0 | goto s_n_llhttp__internal__n_after_start_req_56; |
5603 | 0 | } |
5604 | 0 | default: { |
5605 | 0 | goto s_n_llhttp__internal__n_error_108; |
5606 | 0 | } |
5607 | 0 | } |
5608 | 0 | /* UNREACHABLE */; |
5609 | 0 | abort(); |
5610 | 0 | } |
5611 | 0 | case s_n_llhttp__internal__n_after_start_req_59: |
5612 | 0 | s_n_llhttp__internal__n_after_start_req_59: { |
5613 | 0 | llparse_match_t match_seq; |
5614 | | |
5615 | 0 | if (p == endp) { |
5616 | 0 | return s_n_llhttp__internal__n_after_start_req_59; |
5617 | 0 | } |
5618 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 4); |
5619 | 0 | p = match_seq.current; |
5620 | 0 | switch (match_seq.status) { |
5621 | 0 | case kMatchComplete: { |
5622 | 0 | p++; |
5623 | 0 | match = 33; |
5624 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5625 | 0 | } |
5626 | 0 | case kMatchPause: { |
5627 | 0 | return s_n_llhttp__internal__n_after_start_req_59; |
5628 | 0 | } |
5629 | 0 | case kMatchMismatch: { |
5630 | 0 | goto s_n_llhttp__internal__n_error_108; |
5631 | 0 | } |
5632 | 0 | } |
5633 | 0 | /* UNREACHABLE */; |
5634 | 0 | abort(); |
5635 | 0 | } |
5636 | 0 | case s_n_llhttp__internal__n_after_start_req_60: |
5637 | 0 | s_n_llhttp__internal__n_after_start_req_60: { |
5638 | 0 | llparse_match_t match_seq; |
5639 | | |
5640 | 0 | if (p == endp) { |
5641 | 0 | return s_n_llhttp__internal__n_after_start_req_60; |
5642 | 0 | } |
5643 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 7); |
5644 | 0 | p = match_seq.current; |
5645 | 0 | switch (match_seq.status) { |
5646 | 0 | case kMatchComplete: { |
5647 | 0 | p++; |
5648 | 0 | match = 26; |
5649 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5650 | 0 | } |
5651 | 0 | case kMatchPause: { |
5652 | 0 | return s_n_llhttp__internal__n_after_start_req_60; |
5653 | 0 | } |
5654 | 0 | case kMatchMismatch: { |
5655 | 0 | goto s_n_llhttp__internal__n_error_108; |
5656 | 0 | } |
5657 | 0 | } |
5658 | 0 | /* UNREACHABLE */; |
5659 | 0 | abort(); |
5660 | 0 | } |
5661 | 0 | case s_n_llhttp__internal__n_after_start_req_53: |
5662 | 0 | s_n_llhttp__internal__n_after_start_req_53: { |
5663 | 0 | if (p == endp) { |
5664 | 0 | return s_n_llhttp__internal__n_after_start_req_53; |
5665 | 0 | } |
5666 | 0 | switch (*p) { |
5667 | 0 | case 'E': { |
5668 | 0 | p++; |
5669 | 0 | goto s_n_llhttp__internal__n_after_start_req_54; |
5670 | 0 | } |
5671 | 0 | case 'O': { |
5672 | 0 | p++; |
5673 | 0 | goto s_n_llhttp__internal__n_after_start_req_59; |
5674 | 0 | } |
5675 | 0 | case 'U': { |
5676 | 0 | p++; |
5677 | 0 | goto s_n_llhttp__internal__n_after_start_req_60; |
5678 | 0 | } |
5679 | 0 | default: { |
5680 | 0 | goto s_n_llhttp__internal__n_error_108; |
5681 | 0 | } |
5682 | 0 | } |
5683 | 0 | /* UNREACHABLE */; |
5684 | 0 | abort(); |
5685 | 0 | } |
5686 | 0 | case s_n_llhttp__internal__n_after_start_req_62: |
5687 | 0 | s_n_llhttp__internal__n_after_start_req_62: { |
5688 | 0 | llparse_match_t match_seq; |
5689 | | |
5690 | 0 | if (p == endp) { |
5691 | 0 | return s_n_llhttp__internal__n_after_start_req_62; |
5692 | 0 | } |
5693 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob52, 6); |
5694 | 0 | p = match_seq.current; |
5695 | 0 | switch (match_seq.status) { |
5696 | 0 | case kMatchComplete: { |
5697 | 0 | p++; |
5698 | 0 | match = 40; |
5699 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5700 | 0 | } |
5701 | 0 | case kMatchPause: { |
5702 | 0 | return s_n_llhttp__internal__n_after_start_req_62; |
5703 | 0 | } |
5704 | 0 | case kMatchMismatch: { |
5705 | 0 | goto s_n_llhttp__internal__n_error_108; |
5706 | 0 | } |
5707 | 0 | } |
5708 | 0 | /* UNREACHABLE */; |
5709 | 0 | abort(); |
5710 | 0 | } |
5711 | 0 | case s_n_llhttp__internal__n_after_start_req_63: |
5712 | 0 | s_n_llhttp__internal__n_after_start_req_63: { |
5713 | 0 | llparse_match_t match_seq; |
5714 | | |
5715 | 0 | if (p == endp) { |
5716 | 0 | return s_n_llhttp__internal__n_after_start_req_63; |
5717 | 0 | } |
5718 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob53, 3); |
5719 | 0 | p = match_seq.current; |
5720 | 0 | switch (match_seq.status) { |
5721 | 0 | case kMatchComplete: { |
5722 | 0 | p++; |
5723 | 0 | match = 7; |
5724 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5725 | 0 | } |
5726 | 0 | case kMatchPause: { |
5727 | 0 | return s_n_llhttp__internal__n_after_start_req_63; |
5728 | 0 | } |
5729 | 0 | case kMatchMismatch: { |
5730 | 0 | goto s_n_llhttp__internal__n_error_108; |
5731 | 0 | } |
5732 | 0 | } |
5733 | 0 | /* UNREACHABLE */; |
5734 | 0 | abort(); |
5735 | 0 | } |
5736 | 0 | case s_n_llhttp__internal__n_after_start_req_61: |
5737 | 0 | s_n_llhttp__internal__n_after_start_req_61: { |
5738 | 0 | if (p == endp) { |
5739 | 0 | return s_n_llhttp__internal__n_after_start_req_61; |
5740 | 0 | } |
5741 | 0 | switch (*p) { |
5742 | 0 | case 'E': { |
5743 | 0 | p++; |
5744 | 0 | goto s_n_llhttp__internal__n_after_start_req_62; |
5745 | 0 | } |
5746 | 0 | case 'R': { |
5747 | 0 | p++; |
5748 | 0 | goto s_n_llhttp__internal__n_after_start_req_63; |
5749 | 0 | } |
5750 | 0 | default: { |
5751 | 0 | goto s_n_llhttp__internal__n_error_108; |
5752 | 0 | } |
5753 | 0 | } |
5754 | 0 | /* UNREACHABLE */; |
5755 | 0 | abort(); |
5756 | 0 | } |
5757 | 0 | case s_n_llhttp__internal__n_after_start_req_66: |
5758 | 0 | s_n_llhttp__internal__n_after_start_req_66: { |
5759 | 0 | llparse_match_t match_seq; |
5760 | | |
5761 | 0 | if (p == endp) { |
5762 | 0 | return s_n_llhttp__internal__n_after_start_req_66; |
5763 | 0 | } |
5764 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob54, 3); |
5765 | 0 | p = match_seq.current; |
5766 | 0 | switch (match_seq.status) { |
5767 | 0 | case kMatchComplete: { |
5768 | 0 | p++; |
5769 | 0 | match = 18; |
5770 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5771 | 0 | } |
5772 | 0 | case kMatchPause: { |
5773 | 0 | return s_n_llhttp__internal__n_after_start_req_66; |
5774 | 0 | } |
5775 | 0 | case kMatchMismatch: { |
5776 | 0 | goto s_n_llhttp__internal__n_error_108; |
5777 | 0 | } |
5778 | 0 | } |
5779 | 0 | /* UNREACHABLE */; |
5780 | 0 | abort(); |
5781 | 0 | } |
5782 | 0 | case s_n_llhttp__internal__n_after_start_req_68: |
5783 | 0 | s_n_llhttp__internal__n_after_start_req_68: { |
5784 | 0 | llparse_match_t match_seq; |
5785 | | |
5786 | 0 | if (p == endp) { |
5787 | 0 | return s_n_llhttp__internal__n_after_start_req_68; |
5788 | 0 | } |
5789 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob55, 2); |
5790 | 0 | p = match_seq.current; |
5791 | 0 | switch (match_seq.status) { |
5792 | 0 | case kMatchComplete: { |
5793 | 0 | p++; |
5794 | 0 | match = 32; |
5795 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5796 | 0 | } |
5797 | 0 | case kMatchPause: { |
5798 | 0 | return s_n_llhttp__internal__n_after_start_req_68; |
5799 | 0 | } |
5800 | 0 | case kMatchMismatch: { |
5801 | 0 | goto s_n_llhttp__internal__n_error_108; |
5802 | 0 | } |
5803 | 0 | } |
5804 | 0 | /* UNREACHABLE */; |
5805 | 0 | abort(); |
5806 | 0 | } |
5807 | 0 | case s_n_llhttp__internal__n_after_start_req_69: |
5808 | 0 | s_n_llhttp__internal__n_after_start_req_69: { |
5809 | 0 | llparse_match_t match_seq; |
5810 | | |
5811 | 0 | if (p == endp) { |
5812 | 0 | return s_n_llhttp__internal__n_after_start_req_69; |
5813 | 0 | } |
5814 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob56, 2); |
5815 | 0 | p = match_seq.current; |
5816 | 0 | switch (match_seq.status) { |
5817 | 0 | case kMatchComplete: { |
5818 | 0 | p++; |
5819 | 0 | match = 15; |
5820 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5821 | 0 | } |
5822 | 0 | case kMatchPause: { |
5823 | 0 | return s_n_llhttp__internal__n_after_start_req_69; |
5824 | 0 | } |
5825 | 0 | case kMatchMismatch: { |
5826 | 0 | goto s_n_llhttp__internal__n_error_108; |
5827 | 0 | } |
5828 | 0 | } |
5829 | 0 | /* UNREACHABLE */; |
5830 | 0 | abort(); |
5831 | 0 | } |
5832 | 0 | case s_n_llhttp__internal__n_after_start_req_67: |
5833 | 0 | s_n_llhttp__internal__n_after_start_req_67: { |
5834 | 0 | if (p == endp) { |
5835 | 0 | return s_n_llhttp__internal__n_after_start_req_67; |
5836 | 0 | } |
5837 | 0 | switch (*p) { |
5838 | 0 | case 'I': { |
5839 | 0 | p++; |
5840 | 0 | goto s_n_llhttp__internal__n_after_start_req_68; |
5841 | 0 | } |
5842 | 0 | case 'O': { |
5843 | 0 | p++; |
5844 | 0 | goto s_n_llhttp__internal__n_after_start_req_69; |
5845 | 0 | } |
5846 | 0 | default: { |
5847 | 0 | goto s_n_llhttp__internal__n_error_108; |
5848 | 0 | } |
5849 | 0 | } |
5850 | 0 | /* UNREACHABLE */; |
5851 | 0 | abort(); |
5852 | 0 | } |
5853 | 0 | case s_n_llhttp__internal__n_after_start_req_70: |
5854 | 0 | s_n_llhttp__internal__n_after_start_req_70: { |
5855 | 0 | llparse_match_t match_seq; |
5856 | | |
5857 | 0 | if (p == endp) { |
5858 | 0 | return s_n_llhttp__internal__n_after_start_req_70; |
5859 | 0 | } |
5860 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob57, 8); |
5861 | 0 | p = match_seq.current; |
5862 | 0 | switch (match_seq.status) { |
5863 | 0 | case kMatchComplete: { |
5864 | 0 | p++; |
5865 | 0 | match = 27; |
5866 | 0 | goto s_n_llhttp__internal__n_invoke_store_method_1; |
5867 | 0 | } |
5868 | 0 | case kMatchPause: { |
5869 | 0 | return s_n_llhttp__internal__n_after_start_req_70; |
5870 | 0 | } |
5871 | 0 | case kMatchMismatch: { |
5872 | 0 | goto s_n_llhttp__internal__n_error_108; |
5873 | 0 | } |
5874 | 0 | } |
5875 | 0 | /* UNREACHABLE */; |
5876 | 0 | abort(); |
5877 | 0 | } |
5878 | 0 | case s_n_llhttp__internal__n_after_start_req_65: |
5879 | 0 | s_n_llhttp__internal__n_after_start_req_65: { |
5880 | 0 | if (p == endp) { |
5881 | 0 | return s_n_llhttp__internal__n_after_start_req_65; |
5882 | 0 | } |
5883 | 0 | switch (*p) { |
5884 | 0 | case 'B': { |
5885 | 0 | p++; |
5886 | 0 | goto s_n_llhttp__internal__n_after_start_req_66; |
5887 | 0 | } |
5888 | 0 | case 'L': { |
5889 | 0 | p++; |
5890 | 0 | goto s_n_llhttp__internal__n_after_start_req_67; |
5891 | 0 | } |
5892 | 0 | case 'S': { |
5893 | 0 | p++; |
5894 | 0 | goto s_n_llhttp__internal__n_after_start_req_70; |
5895 | 0 | } |
5896 | 0 | default: { |
5897 | 0 | goto s_n_llhttp__internal__n_error_108; |
5898 | 0 | } |
5899 | 0 | } |
5900 | 0 | /* UNREACHABLE */; |
5901 | 0 | abort(); |
5902 | 0 | } |
5903 | 0 | case s_n_llhttp__internal__n_after_start_req_64: |
5904 | 0 | s_n_llhttp__internal__n_after_start_req_64: { |
5905 | 0 | if (p == endp) { |
5906 | 0 | return s_n_llhttp__internal__n_after_start_req_64; |
5907 | 0 | } |
5908 | 0 | switch (*p) { |
5909 | 0 | case 'N': { |
5910 | 0 | p++; |
5911 | 0 | goto s_n_llhttp__internal__n_after_start_req_65; |
5912 | 0 | } |
5913 | 0 | default: { |
5914 | 0 | goto s_n_llhttp__internal__n_error_108; |
5915 | 0 | } |
5916 | 0 | } |
5917 | 0 | /* UNREACHABLE */; |
5918 | 0 | abort(); |
5919 | 0 | } |
5920 | 0 | case s_n_llhttp__internal__n_after_start_req: |
5921 | 0 | s_n_llhttp__internal__n_after_start_req: { |
5922 | 0 | if (p == endp) { |
5923 | 0 | return s_n_llhttp__internal__n_after_start_req; |
5924 | 0 | } |
5925 | 0 | switch (*p) { |
5926 | 0 | case 'A': { |
5927 | 0 | p++; |
5928 | 0 | goto s_n_llhttp__internal__n_after_start_req_1; |
5929 | 0 | } |
5930 | 0 | case 'B': { |
5931 | 0 | p++; |
5932 | 0 | goto s_n_llhttp__internal__n_after_start_req_4; |
5933 | 0 | } |
5934 | 0 | case 'C': { |
5935 | 0 | p++; |
5936 | 0 | goto s_n_llhttp__internal__n_after_start_req_5; |
5937 | 0 | } |
5938 | 0 | case 'D': { |
5939 | 0 | p++; |
5940 | 0 | goto s_n_llhttp__internal__n_after_start_req_10; |
5941 | 0 | } |
5942 | 0 | case 'F': { |
5943 | 0 | p++; |
5944 | 0 | goto s_n_llhttp__internal__n_after_start_req_14; |
5945 | 0 | } |
5946 | 0 | case 'G': { |
5947 | 0 | p++; |
5948 | 0 | goto s_n_llhttp__internal__n_after_start_req_15; |
5949 | 0 | } |
5950 | 0 | case 'H': { |
5951 | 0 | p++; |
5952 | 0 | goto s_n_llhttp__internal__n_after_start_req_18; |
5953 | 0 | } |
5954 | 0 | case 'L': { |
5955 | 0 | p++; |
5956 | 0 | goto s_n_llhttp__internal__n_after_start_req_19; |
5957 | 0 | } |
5958 | 0 | case 'M': { |
5959 | 0 | p++; |
5960 | 0 | goto s_n_llhttp__internal__n_after_start_req_22; |
5961 | 0 | } |
5962 | 0 | case 'N': { |
5963 | 0 | p++; |
5964 | 0 | goto s_n_llhttp__internal__n_after_start_req_31; |
5965 | 0 | } |
5966 | 0 | case 'O': { |
5967 | 0 | p++; |
5968 | 0 | goto s_n_llhttp__internal__n_after_start_req_32; |
5969 | 0 | } |
5970 | 0 | case 'P': { |
5971 | 0 | p++; |
5972 | 0 | goto s_n_llhttp__internal__n_after_start_req_33; |
5973 | 0 | } |
5974 | 0 | case 'Q': { |
5975 | 0 | p++; |
5976 | 0 | goto s_n_llhttp__internal__n_after_start_req_46; |
5977 | 0 | } |
5978 | 0 | case 'R': { |
5979 | 0 | p++; |
5980 | 0 | goto s_n_llhttp__internal__n_after_start_req_47; |
5981 | 0 | } |
5982 | 0 | case 'S': { |
5983 | 0 | p++; |
5984 | 0 | goto s_n_llhttp__internal__n_after_start_req_53; |
5985 | 0 | } |
5986 | 0 | case 'T': { |
5987 | 0 | p++; |
5988 | 0 | goto s_n_llhttp__internal__n_after_start_req_61; |
5989 | 0 | } |
5990 | 0 | case 'U': { |
5991 | 0 | p++; |
5992 | 0 | goto s_n_llhttp__internal__n_after_start_req_64; |
5993 | 0 | } |
5994 | 0 | default: { |
5995 | 0 | goto s_n_llhttp__internal__n_error_108; |
5996 | 0 | } |
5997 | 0 | } |
5998 | 0 | /* UNREACHABLE */; |
5999 | 0 | abort(); |
6000 | 0 | } |
6001 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_method_1: |
6002 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_method_1: { |
6003 | 0 | if (p == endp) { |
6004 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_method_1; |
6005 | 0 | } |
6006 | 0 | state->_span_pos0 = (void*) p; |
6007 | 0 | state->_span_cb0 = llhttp__on_method; |
6008 | 0 | goto s_n_llhttp__internal__n_after_start_req; |
6009 | 0 | /* UNREACHABLE */; |
6010 | 0 | abort(); |
6011 | 0 | } |
6012 | 0 | case s_n_llhttp__internal__n_res_line_almost_done: |
6013 | 0 | s_n_llhttp__internal__n_res_line_almost_done: { |
6014 | 0 | if (p == endp) { |
6015 | 0 | return s_n_llhttp__internal__n_res_line_almost_done; |
6016 | 0 | } |
6017 | 0 | switch (*p) { |
6018 | 0 | case 10: { |
6019 | 0 | p++; |
6020 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; |
6021 | 0 | } |
6022 | 0 | case 13: { |
6023 | 0 | p++; |
6024 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; |
6025 | 0 | } |
6026 | 0 | default: { |
6027 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_29; |
6028 | 0 | } |
6029 | 0 | } |
6030 | 0 | /* UNREACHABLE */; |
6031 | 0 | abort(); |
6032 | 0 | } |
6033 | 0 | case s_n_llhttp__internal__n_invoke_test_lenient_flags_30: |
6034 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_30: { |
6035 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
6036 | 0 | case 1: |
6037 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; |
6038 | 0 | default: |
6039 | 0 | goto s_n_llhttp__internal__n_error_94; |
6040 | 0 | } |
6041 | 0 | /* UNREACHABLE */; |
6042 | 0 | abort(); |
6043 | 0 | } |
6044 | 0 | case s_n_llhttp__internal__n_res_status: |
6045 | 0 | s_n_llhttp__internal__n_res_status: { |
6046 | 0 | if (p == endp) { |
6047 | 0 | return s_n_llhttp__internal__n_res_status; |
6048 | 0 | } |
6049 | 0 | switch (*p) { |
6050 | 0 | case 10: { |
6051 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_status; |
6052 | 0 | } |
6053 | 0 | case 13: { |
6054 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_status_1; |
6055 | 0 | } |
6056 | 0 | default: { |
6057 | 0 | p++; |
6058 | 0 | goto s_n_llhttp__internal__n_res_status; |
6059 | 0 | } |
6060 | 0 | } |
6061 | 0 | /* UNREACHABLE */; |
6062 | 0 | abort(); |
6063 | 0 | } |
6064 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_status: |
6065 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_status: { |
6066 | 0 | if (p == endp) { |
6067 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_status; |
6068 | 0 | } |
6069 | 0 | state->_span_pos0 = (void*) p; |
6070 | 0 | state->_span_cb0 = llhttp__on_status; |
6071 | 0 | goto s_n_llhttp__internal__n_res_status; |
6072 | 0 | /* UNREACHABLE */; |
6073 | 0 | abort(); |
6074 | 0 | } |
6075 | 0 | case s_n_llhttp__internal__n_res_status_code_otherwise: |
6076 | 0 | s_n_llhttp__internal__n_res_status_code_otherwise: { |
6077 | 0 | if (p == endp) { |
6078 | 0 | return s_n_llhttp__internal__n_res_status_code_otherwise; |
6079 | 0 | } |
6080 | 0 | switch (*p) { |
6081 | 0 | case 10: { |
6082 | 0 | p++; |
6083 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_28; |
6084 | 0 | } |
6085 | 0 | case 13: { |
6086 | 0 | p++; |
6087 | 0 | goto s_n_llhttp__internal__n_res_line_almost_done; |
6088 | 0 | } |
6089 | 0 | case ' ': { |
6090 | 0 | p++; |
6091 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_status; |
6092 | 0 | } |
6093 | 0 | default: { |
6094 | 0 | goto s_n_llhttp__internal__n_error_95; |
6095 | 0 | } |
6096 | 0 | } |
6097 | 0 | /* UNREACHABLE */; |
6098 | 0 | abort(); |
6099 | 0 | } |
6100 | 0 | case s_n_llhttp__internal__n_res_status_code_digit_3: |
6101 | 0 | s_n_llhttp__internal__n_res_status_code_digit_3: { |
6102 | 0 | if (p == endp) { |
6103 | 0 | return s_n_llhttp__internal__n_res_status_code_digit_3; |
6104 | 0 | } |
6105 | 0 | switch (*p) { |
6106 | 0 | case '0': { |
6107 | 0 | p++; |
6108 | 0 | match = 0; |
6109 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6110 | 0 | } |
6111 | 0 | case '1': { |
6112 | 0 | p++; |
6113 | 0 | match = 1; |
6114 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6115 | 0 | } |
6116 | 0 | case '2': { |
6117 | 0 | p++; |
6118 | 0 | match = 2; |
6119 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6120 | 0 | } |
6121 | 0 | case '3': { |
6122 | 0 | p++; |
6123 | 0 | match = 3; |
6124 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6125 | 0 | } |
6126 | 0 | case '4': { |
6127 | 0 | p++; |
6128 | 0 | match = 4; |
6129 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6130 | 0 | } |
6131 | 0 | case '5': { |
6132 | 0 | p++; |
6133 | 0 | match = 5; |
6134 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6135 | 0 | } |
6136 | 0 | case '6': { |
6137 | 0 | p++; |
6138 | 0 | match = 6; |
6139 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6140 | 0 | } |
6141 | 0 | case '7': { |
6142 | 0 | p++; |
6143 | 0 | match = 7; |
6144 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6145 | 0 | } |
6146 | 0 | case '8': { |
6147 | 0 | p++; |
6148 | 0 | match = 8; |
6149 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6150 | 0 | } |
6151 | 0 | case '9': { |
6152 | 0 | p++; |
6153 | 0 | match = 9; |
6154 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; |
6155 | 0 | } |
6156 | 0 | default: { |
6157 | 0 | goto s_n_llhttp__internal__n_error_97; |
6158 | 0 | } |
6159 | 0 | } |
6160 | 0 | /* UNREACHABLE */; |
6161 | 0 | abort(); |
6162 | 0 | } |
6163 | 0 | case s_n_llhttp__internal__n_res_status_code_digit_2: |
6164 | 0 | s_n_llhttp__internal__n_res_status_code_digit_2: { |
6165 | 0 | if (p == endp) { |
6166 | 0 | return s_n_llhttp__internal__n_res_status_code_digit_2; |
6167 | 0 | } |
6168 | 0 | switch (*p) { |
6169 | 0 | case '0': { |
6170 | 0 | p++; |
6171 | 0 | match = 0; |
6172 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6173 | 0 | } |
6174 | 0 | case '1': { |
6175 | 0 | p++; |
6176 | 0 | match = 1; |
6177 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6178 | 0 | } |
6179 | 0 | case '2': { |
6180 | 0 | p++; |
6181 | 0 | match = 2; |
6182 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6183 | 0 | } |
6184 | 0 | case '3': { |
6185 | 0 | p++; |
6186 | 0 | match = 3; |
6187 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6188 | 0 | } |
6189 | 0 | case '4': { |
6190 | 0 | p++; |
6191 | 0 | match = 4; |
6192 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6193 | 0 | } |
6194 | 0 | case '5': { |
6195 | 0 | p++; |
6196 | 0 | match = 5; |
6197 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6198 | 0 | } |
6199 | 0 | case '6': { |
6200 | 0 | p++; |
6201 | 0 | match = 6; |
6202 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6203 | 0 | } |
6204 | 0 | case '7': { |
6205 | 0 | p++; |
6206 | 0 | match = 7; |
6207 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6208 | 0 | } |
6209 | 0 | case '8': { |
6210 | 0 | p++; |
6211 | 0 | match = 8; |
6212 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6213 | 0 | } |
6214 | 0 | case '9': { |
6215 | 0 | p++; |
6216 | 0 | match = 9; |
6217 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; |
6218 | 0 | } |
6219 | 0 | default: { |
6220 | 0 | goto s_n_llhttp__internal__n_error_99; |
6221 | 0 | } |
6222 | 0 | } |
6223 | 0 | /* UNREACHABLE */; |
6224 | 0 | abort(); |
6225 | 0 | } |
6226 | 0 | case s_n_llhttp__internal__n_res_status_code_digit_1: |
6227 | 0 | s_n_llhttp__internal__n_res_status_code_digit_1: { |
6228 | 0 | if (p == endp) { |
6229 | 0 | return s_n_llhttp__internal__n_res_status_code_digit_1; |
6230 | 0 | } |
6231 | 0 | switch (*p) { |
6232 | 0 | case '0': { |
6233 | 0 | p++; |
6234 | 0 | match = 0; |
6235 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6236 | 0 | } |
6237 | 0 | case '1': { |
6238 | 0 | p++; |
6239 | 0 | match = 1; |
6240 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6241 | 0 | } |
6242 | 0 | case '2': { |
6243 | 0 | p++; |
6244 | 0 | match = 2; |
6245 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6246 | 0 | } |
6247 | 0 | case '3': { |
6248 | 0 | p++; |
6249 | 0 | match = 3; |
6250 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6251 | 0 | } |
6252 | 0 | case '4': { |
6253 | 0 | p++; |
6254 | 0 | match = 4; |
6255 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6256 | 0 | } |
6257 | 0 | case '5': { |
6258 | 0 | p++; |
6259 | 0 | match = 5; |
6260 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6261 | 0 | } |
6262 | 0 | case '6': { |
6263 | 0 | p++; |
6264 | 0 | match = 6; |
6265 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6266 | 0 | } |
6267 | 0 | case '7': { |
6268 | 0 | p++; |
6269 | 0 | match = 7; |
6270 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6271 | 0 | } |
6272 | 0 | case '8': { |
6273 | 0 | p++; |
6274 | 0 | match = 8; |
6275 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6276 | 0 | } |
6277 | 0 | case '9': { |
6278 | 0 | p++; |
6279 | 0 | match = 9; |
6280 | 0 | goto s_n_llhttp__internal__n_invoke_mul_add_status_code; |
6281 | 0 | } |
6282 | 0 | default: { |
6283 | 0 | goto s_n_llhttp__internal__n_error_101; |
6284 | 0 | } |
6285 | 0 | } |
6286 | 0 | /* UNREACHABLE */; |
6287 | 0 | abort(); |
6288 | 0 | } |
6289 | 0 | case s_n_llhttp__internal__n_res_after_version: |
6290 | 0 | s_n_llhttp__internal__n_res_after_version: { |
6291 | 0 | if (p == endp) { |
6292 | 0 | return s_n_llhttp__internal__n_res_after_version; |
6293 | 0 | } |
6294 | 0 | switch (*p) { |
6295 | 0 | case ' ': { |
6296 | 0 | p++; |
6297 | 0 | goto s_n_llhttp__internal__n_invoke_update_status_code; |
6298 | 0 | } |
6299 | 0 | default: { |
6300 | 0 | goto s_n_llhttp__internal__n_error_102; |
6301 | 0 | } |
6302 | 0 | } |
6303 | 0 | /* UNREACHABLE */; |
6304 | 0 | abort(); |
6305 | 0 | } |
6306 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1: |
6307 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1: { |
6308 | 0 | switch (llhttp__on_version_complete(state, p, endp)) { |
6309 | 0 | case 0: |
6310 | 0 | goto s_n_llhttp__internal__n_res_after_version; |
6311 | 0 | case 21: |
6312 | 0 | goto s_n_llhttp__internal__n_pause_25; |
6313 | 0 | default: |
6314 | 0 | goto s_n_llhttp__internal__n_error_90; |
6315 | 0 | } |
6316 | 0 | /* UNREACHABLE */; |
6317 | 0 | abort(); |
6318 | 0 | } |
6319 | 0 | case s_n_llhttp__internal__n_error_89: |
6320 | 0 | s_n_llhttp__internal__n_error_89: { |
6321 | 0 | state->error = 0x9; |
6322 | 0 | state->reason = "Invalid HTTP version"; |
6323 | 0 | state->error_pos = (const char*) p; |
6324 | 0 | state->_current = (void*) (intptr_t) s_error; |
6325 | 0 | return s_error; |
6326 | 0 | /* UNREACHABLE */; |
6327 | 0 | abort(); |
6328 | 0 | } |
6329 | 0 | case s_n_llhttp__internal__n_error_103: |
6330 | 0 | s_n_llhttp__internal__n_error_103: { |
6331 | 0 | state->error = 0x9; |
6332 | 0 | state->reason = "Invalid minor version"; |
6333 | 0 | state->error_pos = (const char*) p; |
6334 | 0 | state->_current = (void*) (intptr_t) s_error; |
6335 | 0 | return s_error; |
6336 | 0 | /* UNREACHABLE */; |
6337 | 0 | abort(); |
6338 | 0 | } |
6339 | 0 | case s_n_llhttp__internal__n_res_http_minor: |
6340 | 0 | s_n_llhttp__internal__n_res_http_minor: { |
6341 | 0 | if (p == endp) { |
6342 | 0 | return s_n_llhttp__internal__n_res_http_minor; |
6343 | 0 | } |
6344 | 0 | switch (*p) { |
6345 | 0 | case '0': { |
6346 | 0 | p++; |
6347 | 0 | match = 0; |
6348 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6349 | 0 | } |
6350 | 0 | case '1': { |
6351 | 0 | p++; |
6352 | 0 | match = 1; |
6353 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6354 | 0 | } |
6355 | 0 | case '2': { |
6356 | 0 | p++; |
6357 | 0 | match = 2; |
6358 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6359 | 0 | } |
6360 | 0 | case '3': { |
6361 | 0 | p++; |
6362 | 0 | match = 3; |
6363 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6364 | 0 | } |
6365 | 0 | case '4': { |
6366 | 0 | p++; |
6367 | 0 | match = 4; |
6368 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6369 | 0 | } |
6370 | 0 | case '5': { |
6371 | 0 | p++; |
6372 | 0 | match = 5; |
6373 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6374 | 0 | } |
6375 | 0 | case '6': { |
6376 | 0 | p++; |
6377 | 0 | match = 6; |
6378 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6379 | 0 | } |
6380 | 0 | case '7': { |
6381 | 0 | p++; |
6382 | 0 | match = 7; |
6383 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6384 | 0 | } |
6385 | 0 | case '8': { |
6386 | 0 | p++; |
6387 | 0 | match = 8; |
6388 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6389 | 0 | } |
6390 | 0 | case '9': { |
6391 | 0 | p++; |
6392 | 0 | match = 9; |
6393 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_minor_1; |
6394 | 0 | } |
6395 | 0 | default: { |
6396 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_7; |
6397 | 0 | } |
6398 | 0 | } |
6399 | 0 | /* UNREACHABLE */; |
6400 | 0 | abort(); |
6401 | 0 | } |
6402 | 0 | case s_n_llhttp__internal__n_error_104: |
6403 | 0 | s_n_llhttp__internal__n_error_104: { |
6404 | 0 | state->error = 0x9; |
6405 | 0 | state->reason = "Expected dot"; |
6406 | 0 | state->error_pos = (const char*) p; |
6407 | 0 | state->_current = (void*) (intptr_t) s_error; |
6408 | 0 | return s_error; |
6409 | 0 | /* UNREACHABLE */; |
6410 | 0 | abort(); |
6411 | 0 | } |
6412 | 0 | case s_n_llhttp__internal__n_res_http_dot: |
6413 | 0 | s_n_llhttp__internal__n_res_http_dot: { |
6414 | 0 | if (p == endp) { |
6415 | 0 | return s_n_llhttp__internal__n_res_http_dot; |
6416 | 0 | } |
6417 | 0 | switch (*p) { |
6418 | 0 | case '.': { |
6419 | 0 | p++; |
6420 | 0 | goto s_n_llhttp__internal__n_res_http_minor; |
6421 | 0 | } |
6422 | 0 | default: { |
6423 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_8; |
6424 | 0 | } |
6425 | 0 | } |
6426 | 0 | /* UNREACHABLE */; |
6427 | 0 | abort(); |
6428 | 0 | } |
6429 | 0 | case s_n_llhttp__internal__n_error_105: |
6430 | 0 | s_n_llhttp__internal__n_error_105: { |
6431 | 0 | state->error = 0x9; |
6432 | 0 | state->reason = "Invalid major version"; |
6433 | 0 | state->error_pos = (const char*) p; |
6434 | 0 | state->_current = (void*) (intptr_t) s_error; |
6435 | 0 | return s_error; |
6436 | 0 | /* UNREACHABLE */; |
6437 | 0 | abort(); |
6438 | 0 | } |
6439 | 0 | case s_n_llhttp__internal__n_res_http_major: |
6440 | 0 | s_n_llhttp__internal__n_res_http_major: { |
6441 | 0 | if (p == endp) { |
6442 | 0 | return s_n_llhttp__internal__n_res_http_major; |
6443 | 0 | } |
6444 | 0 | switch (*p) { |
6445 | 0 | case '0': { |
6446 | 0 | p++; |
6447 | 0 | match = 0; |
6448 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6449 | 0 | } |
6450 | 0 | case '1': { |
6451 | 0 | p++; |
6452 | 0 | match = 1; |
6453 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6454 | 0 | } |
6455 | 0 | case '2': { |
6456 | 0 | p++; |
6457 | 0 | match = 2; |
6458 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6459 | 0 | } |
6460 | 0 | case '3': { |
6461 | 0 | p++; |
6462 | 0 | match = 3; |
6463 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6464 | 0 | } |
6465 | 0 | case '4': { |
6466 | 0 | p++; |
6467 | 0 | match = 4; |
6468 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6469 | 0 | } |
6470 | 0 | case '5': { |
6471 | 0 | p++; |
6472 | 0 | match = 5; |
6473 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6474 | 0 | } |
6475 | 0 | case '6': { |
6476 | 0 | p++; |
6477 | 0 | match = 6; |
6478 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6479 | 0 | } |
6480 | 0 | case '7': { |
6481 | 0 | p++; |
6482 | 0 | match = 7; |
6483 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6484 | 0 | } |
6485 | 0 | case '8': { |
6486 | 0 | p++; |
6487 | 0 | match = 8; |
6488 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6489 | 0 | } |
6490 | 0 | case '9': { |
6491 | 0 | p++; |
6492 | 0 | match = 9; |
6493 | 0 | goto s_n_llhttp__internal__n_invoke_store_http_major_1; |
6494 | 0 | } |
6495 | 0 | default: { |
6496 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_9; |
6497 | 0 | } |
6498 | 0 | } |
6499 | 0 | /* UNREACHABLE */; |
6500 | 0 | abort(); |
6501 | 0 | } |
6502 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_version_1: |
6503 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_version_1: { |
6504 | 0 | if (p == endp) { |
6505 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_version_1; |
6506 | 0 | } |
6507 | 0 | state->_span_pos0 = (void*) p; |
6508 | 0 | state->_span_cb0 = llhttp__on_version; |
6509 | 0 | goto s_n_llhttp__internal__n_res_http_major; |
6510 | 0 | /* UNREACHABLE */; |
6511 | 0 | abort(); |
6512 | 0 | } |
6513 | 0 | case s_n_llhttp__internal__n_start_res: |
6514 | 0 | s_n_llhttp__internal__n_start_res: { |
6515 | 0 | llparse_match_t match_seq; |
6516 | | |
6517 | 0 | if (p == endp) { |
6518 | 0 | return s_n_llhttp__internal__n_start_res; |
6519 | 0 | } |
6520 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob58, 5); |
6521 | 0 | p = match_seq.current; |
6522 | 0 | switch (match_seq.status) { |
6523 | 0 | case kMatchComplete: { |
6524 | 0 | p++; |
6525 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version_1; |
6526 | 0 | } |
6527 | 0 | case kMatchPause: { |
6528 | 0 | return s_n_llhttp__internal__n_start_res; |
6529 | 0 | } |
6530 | 0 | case kMatchMismatch: { |
6531 | 0 | goto s_n_llhttp__internal__n_error_109; |
6532 | 0 | } |
6533 | 0 | } |
6534 | 0 | /* UNREACHABLE */; |
6535 | 0 | abort(); |
6536 | 0 | } |
6537 | 0 | case s_n_llhttp__internal__n_invoke_llhttp__on_method_complete: |
6538 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_method_complete: { |
6539 | 0 | switch (llhttp__on_method_complete(state, p, endp)) { |
6540 | 0 | case 0: |
6541 | 0 | goto s_n_llhttp__internal__n_req_first_space_before_url; |
6542 | 0 | case 21: |
6543 | 0 | goto s_n_llhttp__internal__n_pause_23; |
6544 | 0 | default: |
6545 | 0 | goto s_n_llhttp__internal__n_error_1; |
6546 | 0 | } |
6547 | 0 | /* UNREACHABLE */; |
6548 | 0 | abort(); |
6549 | 0 | } |
6550 | 0 | case s_n_llhttp__internal__n_req_or_res_method_2: |
6551 | 0 | s_n_llhttp__internal__n_req_or_res_method_2: { |
6552 | 0 | llparse_match_t match_seq; |
6553 | | |
6554 | 0 | if (p == endp) { |
6555 | 0 | return s_n_llhttp__internal__n_req_or_res_method_2; |
6556 | 0 | } |
6557 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob59, 2); |
6558 | 0 | p = match_seq.current; |
6559 | 0 | switch (match_seq.status) { |
6560 | 0 | case kMatchComplete: { |
6561 | 0 | p++; |
6562 | 0 | match = 2; |
6563 | 0 | goto s_n_llhttp__internal__n_invoke_store_method; |
6564 | 0 | } |
6565 | 0 | case kMatchPause: { |
6566 | 0 | return s_n_llhttp__internal__n_req_or_res_method_2; |
6567 | 0 | } |
6568 | 0 | case kMatchMismatch: { |
6569 | 0 | goto s_n_llhttp__internal__n_error_106; |
6570 | 0 | } |
6571 | 0 | } |
6572 | 0 | /* UNREACHABLE */; |
6573 | 0 | abort(); |
6574 | 0 | } |
6575 | 0 | case s_n_llhttp__internal__n_invoke_update_type_1: |
6576 | 0 | s_n_llhttp__internal__n_invoke_update_type_1: { |
6577 | 0 | switch (llhttp__internal__c_update_type_1(state, p, endp)) { |
6578 | 0 | default: |
6579 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version_1; |
6580 | 0 | } |
6581 | 0 | /* UNREACHABLE */; |
6582 | 0 | abort(); |
6583 | 0 | } |
6584 | 0 | case s_n_llhttp__internal__n_req_or_res_method_3: |
6585 | 0 | s_n_llhttp__internal__n_req_or_res_method_3: { |
6586 | 0 | llparse_match_t match_seq; |
6587 | | |
6588 | 0 | if (p == endp) { |
6589 | 0 | return s_n_llhttp__internal__n_req_or_res_method_3; |
6590 | 0 | } |
6591 | 0 | match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob60, 3); |
6592 | 0 | p = match_seq.current; |
6593 | 0 | switch (match_seq.status) { |
6594 | 0 | case kMatchComplete: { |
6595 | 0 | p++; |
6596 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_method_1; |
6597 | 0 | } |
6598 | 0 | case kMatchPause: { |
6599 | 0 | return s_n_llhttp__internal__n_req_or_res_method_3; |
6600 | 0 | } |
6601 | 0 | case kMatchMismatch: { |
6602 | 0 | goto s_n_llhttp__internal__n_error_106; |
6603 | 0 | } |
6604 | 0 | } |
6605 | 0 | /* UNREACHABLE */; |
6606 | 0 | abort(); |
6607 | 0 | } |
6608 | 0 | case s_n_llhttp__internal__n_req_or_res_method_1: |
6609 | 0 | s_n_llhttp__internal__n_req_or_res_method_1: { |
6610 | 0 | if (p == endp) { |
6611 | 0 | return s_n_llhttp__internal__n_req_or_res_method_1; |
6612 | 0 | } |
6613 | 0 | switch (*p) { |
6614 | 0 | case 'E': { |
6615 | 0 | p++; |
6616 | 0 | goto s_n_llhttp__internal__n_req_or_res_method_2; |
6617 | 0 | } |
6618 | 0 | case 'T': { |
6619 | 0 | p++; |
6620 | 0 | goto s_n_llhttp__internal__n_req_or_res_method_3; |
6621 | 0 | } |
6622 | 0 | default: { |
6623 | 0 | goto s_n_llhttp__internal__n_error_106; |
6624 | 0 | } |
6625 | 0 | } |
6626 | 0 | /* UNREACHABLE */; |
6627 | 0 | abort(); |
6628 | 0 | } |
6629 | 0 | case s_n_llhttp__internal__n_req_or_res_method: |
6630 | 0 | s_n_llhttp__internal__n_req_or_res_method: { |
6631 | 0 | if (p == endp) { |
6632 | 0 | return s_n_llhttp__internal__n_req_or_res_method; |
6633 | 0 | } |
6634 | 0 | switch (*p) { |
6635 | 0 | case 'H': { |
6636 | 0 | p++; |
6637 | 0 | goto s_n_llhttp__internal__n_req_or_res_method_1; |
6638 | 0 | } |
6639 | 0 | default: { |
6640 | 0 | goto s_n_llhttp__internal__n_error_106; |
6641 | 0 | } |
6642 | 0 | } |
6643 | 0 | /* UNREACHABLE */; |
6644 | 0 | abort(); |
6645 | 0 | } |
6646 | 0 | case s_n_llhttp__internal__n_span_start_llhttp__on_method: |
6647 | 0 | s_n_llhttp__internal__n_span_start_llhttp__on_method: { |
6648 | 0 | if (p == endp) { |
6649 | 0 | return s_n_llhttp__internal__n_span_start_llhttp__on_method; |
6650 | 0 | } |
6651 | 0 | state->_span_pos0 = (void*) p; |
6652 | 0 | state->_span_cb0 = llhttp__on_method; |
6653 | 0 | goto s_n_llhttp__internal__n_req_or_res_method; |
6654 | 0 | /* UNREACHABLE */; |
6655 | 0 | abort(); |
6656 | 0 | } |
6657 | 0 | case s_n_llhttp__internal__n_start_req_or_res: |
6658 | 0 | s_n_llhttp__internal__n_start_req_or_res: { |
6659 | 0 | if (p == endp) { |
6660 | 0 | return s_n_llhttp__internal__n_start_req_or_res; |
6661 | 0 | } |
6662 | 0 | switch (*p) { |
6663 | 0 | case 'H': { |
6664 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_method; |
6665 | 0 | } |
6666 | 0 | default: { |
6667 | 0 | goto s_n_llhttp__internal__n_invoke_update_type_2; |
6668 | 0 | } |
6669 | 0 | } |
6670 | 0 | /* UNREACHABLE */; |
6671 | 0 | abort(); |
6672 | 0 | } |
6673 | 0 | case s_n_llhttp__internal__n_invoke_load_type: |
6674 | 0 | s_n_llhttp__internal__n_invoke_load_type: { |
6675 | 0 | switch (llhttp__internal__c_load_type(state, p, endp)) { |
6676 | 0 | case 1: |
6677 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_method_1; |
6678 | 0 | case 2: |
6679 | 0 | goto s_n_llhttp__internal__n_start_res; |
6680 | 0 | default: |
6681 | 0 | goto s_n_llhttp__internal__n_start_req_or_res; |
6682 | 0 | } |
6683 | 0 | /* UNREACHABLE */; |
6684 | 0 | abort(); |
6685 | 0 | } |
6686 | 0 | case s_n_llhttp__internal__n_invoke_update_finish: |
6687 | 0 | s_n_llhttp__internal__n_invoke_update_finish: { |
6688 | 0 | switch (llhttp__internal__c_update_finish(state, p, endp)) { |
6689 | 0 | default: |
6690 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_begin; |
6691 | 0 | } |
6692 | 0 | /* UNREACHABLE */; |
6693 | 0 | abort(); |
6694 | 0 | } |
6695 | 0 | case s_n_llhttp__internal__n_start: |
6696 | 0 | s_n_llhttp__internal__n_start: { |
6697 | 0 | if (p == endp) { |
6698 | 0 | return s_n_llhttp__internal__n_start; |
6699 | 0 | } |
6700 | 0 | switch (*p) { |
6701 | 0 | case 10: { |
6702 | 0 | p++; |
6703 | 0 | goto s_n_llhttp__internal__n_start; |
6704 | 0 | } |
6705 | 0 | case 13: { |
6706 | 0 | p++; |
6707 | 0 | goto s_n_llhttp__internal__n_start; |
6708 | 0 | } |
6709 | 0 | default: { |
6710 | 0 | goto s_n_llhttp__internal__n_invoke_load_initial_message_completed; |
6711 | 0 | } |
6712 | 0 | } |
6713 | 0 | /* UNREACHABLE */; |
6714 | 0 | abort(); |
6715 | 0 | } |
6716 | 0 | default: |
6717 | | /* UNREACHABLE */ |
6718 | 0 | abort(); |
6719 | 0 | } |
6720 | 0 | s_n_llhttp__internal__n_error_2: { |
6721 | 0 | state->error = 0x7; |
6722 | 0 | state->reason = "Invalid characters in url"; |
6723 | 0 | state->error_pos = (const char*) p; |
6724 | 0 | state->_current = (void*) (intptr_t) s_error; |
6725 | 0 | return s_error; |
6726 | 0 | /* UNREACHABLE */; |
6727 | 0 | abort(); |
6728 | 0 | } |
6729 | 0 | s_n_llhttp__internal__n_invoke_update_finish_2: { |
6730 | 0 | switch (llhttp__internal__c_update_finish_1(state, p, endp)) { |
6731 | 0 | default: |
6732 | 0 | goto s_n_llhttp__internal__n_start; |
6733 | 0 | } |
6734 | 0 | /* UNREACHABLE */; |
6735 | 0 | abort(); |
6736 | 0 | } |
6737 | 0 | s_n_llhttp__internal__n_invoke_update_initial_message_completed: { |
6738 | 0 | switch (llhttp__internal__c_update_initial_message_completed(state, p, endp)) { |
6739 | 0 | default: |
6740 | 0 | goto s_n_llhttp__internal__n_invoke_update_finish_2; |
6741 | 0 | } |
6742 | 0 | /* UNREACHABLE */; |
6743 | 0 | abort(); |
6744 | 0 | } |
6745 | 0 | s_n_llhttp__internal__n_invoke_update_content_length: { |
6746 | 0 | switch (llhttp__internal__c_update_content_length(state, p, endp)) { |
6747 | 0 | default: |
6748 | 0 | goto s_n_llhttp__internal__n_invoke_update_initial_message_completed; |
6749 | 0 | } |
6750 | 0 | /* UNREACHABLE */; |
6751 | 0 | abort(); |
6752 | 0 | } |
6753 | 0 | s_n_llhttp__internal__n_error_8: { |
6754 | 0 | state->error = 0x5; |
6755 | 0 | state->reason = "Data after `Connection: close`"; |
6756 | 0 | state->error_pos = (const char*) p; |
6757 | 0 | state->_current = (void*) (intptr_t) s_error; |
6758 | 0 | return s_error; |
6759 | 0 | /* UNREACHABLE */; |
6760 | 0 | abort(); |
6761 | 0 | } |
6762 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_3: { |
6763 | 0 | switch (llhttp__internal__c_test_lenient_flags_3(state, p, endp)) { |
6764 | 0 | case 1: |
6765 | 0 | goto s_n_llhttp__internal__n_closed; |
6766 | 0 | default: |
6767 | 0 | goto s_n_llhttp__internal__n_error_8; |
6768 | 0 | } |
6769 | 0 | /* UNREACHABLE */; |
6770 | 0 | abort(); |
6771 | 0 | } |
6772 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_2: { |
6773 | 0 | switch (llhttp__internal__c_test_lenient_flags_2(state, p, endp)) { |
6774 | 0 | case 1: |
6775 | 0 | goto s_n_llhttp__internal__n_invoke_update_initial_message_completed; |
6776 | 0 | default: |
6777 | 0 | goto s_n_llhttp__internal__n_closed; |
6778 | 0 | } |
6779 | 0 | /* UNREACHABLE */; |
6780 | 0 | abort(); |
6781 | 0 | } |
6782 | 0 | s_n_llhttp__internal__n_invoke_update_finish_1: { |
6783 | 0 | switch (llhttp__internal__c_update_finish_1(state, p, endp)) { |
6784 | 0 | default: |
6785 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_2; |
6786 | 0 | } |
6787 | 0 | /* UNREACHABLE */; |
6788 | 0 | abort(); |
6789 | 0 | } |
6790 | 0 | s_n_llhttp__internal__n_pause_13: { |
6791 | 0 | state->error = 0x15; |
6792 | 0 | state->reason = "on_message_complete pause"; |
6793 | 0 | state->error_pos = (const char*) p; |
6794 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_upgrade; |
6795 | 0 | return s_error; |
6796 | 0 | /* UNREACHABLE */; |
6797 | 0 | abort(); |
6798 | 0 | } |
6799 | 0 | s_n_llhttp__internal__n_error_38: { |
6800 | 0 | state->error = 0x12; |
6801 | 0 | state->reason = "`on_message_complete` callback error"; |
6802 | 0 | state->error_pos = (const char*) p; |
6803 | 0 | state->_current = (void*) (intptr_t) s_error; |
6804 | 0 | return s_error; |
6805 | 0 | /* UNREACHABLE */; |
6806 | 0 | abort(); |
6807 | 0 | } |
6808 | 0 | s_n_llhttp__internal__n_pause_15: { |
6809 | 0 | state->error = 0x15; |
6810 | 0 | state->reason = "on_chunk_complete pause"; |
6811 | 0 | state->error_pos = (const char*) p; |
6812 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
6813 | 0 | return s_error; |
6814 | 0 | /* UNREACHABLE */; |
6815 | 0 | abort(); |
6816 | 0 | } |
6817 | 0 | s_n_llhttp__internal__n_error_40: { |
6818 | 0 | state->error = 0x14; |
6819 | 0 | state->reason = "`on_chunk_complete` callback error"; |
6820 | 0 | state->error_pos = (const char*) p; |
6821 | 0 | state->_current = (void*) (intptr_t) s_error; |
6822 | 0 | return s_error; |
6823 | 0 | /* UNREACHABLE */; |
6824 | 0 | abort(); |
6825 | 0 | } |
6826 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1: { |
6827 | 0 | switch (llhttp__on_chunk_complete(state, p, endp)) { |
6828 | 0 | case 0: |
6829 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
6830 | 0 | case 21: |
6831 | 0 | goto s_n_llhttp__internal__n_pause_15; |
6832 | 0 | default: |
6833 | 0 | goto s_n_llhttp__internal__n_error_40; |
6834 | 0 | } |
6835 | 0 | /* UNREACHABLE */; |
6836 | 0 | abort(); |
6837 | 0 | } |
6838 | 0 | s_n_llhttp__internal__n_pause_2: { |
6839 | 0 | state->error = 0x15; |
6840 | 0 | state->reason = "on_message_complete pause"; |
6841 | 0 | state->error_pos = (const char*) p; |
6842 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_pause_1; |
6843 | 0 | return s_error; |
6844 | 0 | /* UNREACHABLE */; |
6845 | 0 | abort(); |
6846 | 0 | } |
6847 | 0 | s_n_llhttp__internal__n_error_9: { |
6848 | 0 | state->error = 0x12; |
6849 | 0 | state->reason = "`on_message_complete` callback error"; |
6850 | 0 | state->error_pos = (const char*) p; |
6851 | 0 | state->_current = (void*) (intptr_t) s_error; |
6852 | 0 | return s_error; |
6853 | 0 | /* UNREACHABLE */; |
6854 | 0 | abort(); |
6855 | 0 | } |
6856 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1: { |
6857 | 0 | switch (llhttp__on_message_complete(state, p, endp)) { |
6858 | 0 | case 0: |
6859 | 0 | goto s_n_llhttp__internal__n_pause_1; |
6860 | 0 | case 21: |
6861 | 0 | goto s_n_llhttp__internal__n_pause_2; |
6862 | 0 | default: |
6863 | 0 | goto s_n_llhttp__internal__n_error_9; |
6864 | 0 | } |
6865 | 0 | /* UNREACHABLE */; |
6866 | 0 | abort(); |
6867 | 0 | } |
6868 | 0 | s_n_llhttp__internal__n_error_36: { |
6869 | 0 | state->error = 0xc; |
6870 | 0 | state->reason = "Chunk size overflow"; |
6871 | 0 | state->error_pos = (const char*) p; |
6872 | 0 | state->_current = (void*) (intptr_t) s_error; |
6873 | 0 | return s_error; |
6874 | 0 | /* UNREACHABLE */; |
6875 | 0 | abort(); |
6876 | 0 | } |
6877 | 0 | s_n_llhttp__internal__n_error_10: { |
6878 | 0 | state->error = 0xc; |
6879 | 0 | state->reason = "Invalid character in chunk size"; |
6880 | 0 | state->error_pos = (const char*) p; |
6881 | 0 | state->_current = (void*) (intptr_t) s_error; |
6882 | 0 | return s_error; |
6883 | 0 | /* UNREACHABLE */; |
6884 | 0 | abort(); |
6885 | 0 | } |
6886 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_4: { |
6887 | 0 | switch (llhttp__internal__c_test_lenient_flags_4(state, p, endp)) { |
6888 | 0 | case 1: |
6889 | 0 | goto s_n_llhttp__internal__n_chunk_size_otherwise; |
6890 | 0 | default: |
6891 | 0 | goto s_n_llhttp__internal__n_error_10; |
6892 | 0 | } |
6893 | 0 | /* UNREACHABLE */; |
6894 | 0 | abort(); |
6895 | 0 | } |
6896 | 0 | s_n_llhttp__internal__n_pause_3: { |
6897 | 0 | state->error = 0x15; |
6898 | 0 | state->reason = "on_chunk_complete pause"; |
6899 | 0 | state->error_pos = (const char*) p; |
6900 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_content_length_1; |
6901 | 0 | return s_error; |
6902 | 0 | /* UNREACHABLE */; |
6903 | 0 | abort(); |
6904 | 0 | } |
6905 | 0 | s_n_llhttp__internal__n_error_14: { |
6906 | 0 | state->error = 0x14; |
6907 | 0 | state->reason = "`on_chunk_complete` callback error"; |
6908 | 0 | state->error_pos = (const char*) p; |
6909 | 0 | state->_current = (void*) (intptr_t) s_error; |
6910 | 0 | return s_error; |
6911 | 0 | /* UNREACHABLE */; |
6912 | 0 | abort(); |
6913 | 0 | } |
6914 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete: { |
6915 | 0 | switch (llhttp__on_chunk_complete(state, p, endp)) { |
6916 | 0 | case 0: |
6917 | 0 | goto s_n_llhttp__internal__n_invoke_update_content_length_1; |
6918 | 0 | case 21: |
6919 | 0 | goto s_n_llhttp__internal__n_pause_3; |
6920 | 0 | default: |
6921 | 0 | goto s_n_llhttp__internal__n_error_14; |
6922 | 0 | } |
6923 | 0 | /* UNREACHABLE */; |
6924 | 0 | abort(); |
6925 | 0 | } |
6926 | 0 | s_n_llhttp__internal__n_error_13: { |
6927 | 0 | state->error = 0x19; |
6928 | 0 | state->reason = "Missing expected CR after chunk data"; |
6929 | 0 | state->error_pos = (const char*) p; |
6930 | 0 | state->_current = (void*) (intptr_t) s_error; |
6931 | 0 | return s_error; |
6932 | 0 | /* UNREACHABLE */; |
6933 | 0 | abort(); |
6934 | 0 | } |
6935 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_6: { |
6936 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
6937 | 0 | case 1: |
6938 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; |
6939 | 0 | default: |
6940 | 0 | goto s_n_llhttp__internal__n_error_13; |
6941 | 0 | } |
6942 | 0 | /* UNREACHABLE */; |
6943 | 0 | abort(); |
6944 | 0 | } |
6945 | 0 | s_n_llhttp__internal__n_error_15: { |
6946 | 0 | state->error = 0x2; |
6947 | 0 | state->reason = "Expected LF after chunk data"; |
6948 | 0 | state->error_pos = (const char*) p; |
6949 | 0 | state->_current = (void*) (intptr_t) s_error; |
6950 | 0 | return s_error; |
6951 | 0 | /* UNREACHABLE */; |
6952 | 0 | abort(); |
6953 | 0 | } |
6954 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_7: { |
6955 | 0 | switch (llhttp__internal__c_test_lenient_flags_7(state, p, endp)) { |
6956 | 0 | case 1: |
6957 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; |
6958 | 0 | default: |
6959 | 0 | goto s_n_llhttp__internal__n_error_15; |
6960 | 0 | } |
6961 | 0 | /* UNREACHABLE */; |
6962 | 0 | abort(); |
6963 | 0 | } |
6964 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_body: { |
6965 | 0 | const unsigned char* start; |
6966 | 0 | int err; |
6967 | | |
6968 | 0 | start = state->_span_pos0; |
6969 | 0 | state->_span_pos0 = NULL; |
6970 | 0 | err = llhttp__on_body(state, start, p); |
6971 | 0 | if (err != 0) { |
6972 | 0 | state->error = err; |
6973 | 0 | state->error_pos = (const char*) p; |
6974 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_data_almost_done; |
6975 | 0 | return s_error; |
6976 | 0 | } |
6977 | 0 | goto s_n_llhttp__internal__n_chunk_data_almost_done; |
6978 | 0 | /* UNREACHABLE */; |
6979 | 0 | abort(); |
6980 | 0 | } |
6981 | 0 | s_n_llhttp__internal__n_invoke_or_flags: { |
6982 | 0 | switch (llhttp__internal__c_or_flags(state, p, endp)) { |
6983 | 0 | default: |
6984 | 0 | goto s_n_llhttp__internal__n_header_field_start; |
6985 | 0 | } |
6986 | 0 | /* UNREACHABLE */; |
6987 | 0 | abort(); |
6988 | 0 | } |
6989 | 0 | s_n_llhttp__internal__n_pause_4: { |
6990 | 0 | state->error = 0x15; |
6991 | 0 | state->reason = "on_chunk_header pause"; |
6992 | 0 | state->error_pos = (const char*) p; |
6993 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_content_length; |
6994 | 0 | return s_error; |
6995 | 0 | /* UNREACHABLE */; |
6996 | 0 | abort(); |
6997 | 0 | } |
6998 | 0 | s_n_llhttp__internal__n_error_12: { |
6999 | 0 | state->error = 0x13; |
7000 | 0 | state->reason = "`on_chunk_header` callback error"; |
7001 | 0 | state->error_pos = (const char*) p; |
7002 | 0 | state->_current = (void*) (intptr_t) s_error; |
7003 | 0 | return s_error; |
7004 | 0 | /* UNREACHABLE */; |
7005 | 0 | abort(); |
7006 | 0 | } |
7007 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header: { |
7008 | 0 | switch (llhttp__on_chunk_header(state, p, endp)) { |
7009 | 0 | case 0: |
7010 | 0 | goto s_n_llhttp__internal__n_invoke_is_equal_content_length; |
7011 | 0 | case 21: |
7012 | 0 | goto s_n_llhttp__internal__n_pause_4; |
7013 | 0 | default: |
7014 | 0 | goto s_n_llhttp__internal__n_error_12; |
7015 | 0 | } |
7016 | 0 | /* UNREACHABLE */; |
7017 | 0 | abort(); |
7018 | 0 | } |
7019 | 0 | s_n_llhttp__internal__n_error_16: { |
7020 | 0 | state->error = 0x2; |
7021 | 0 | state->reason = "Expected LF after chunk size"; |
7022 | 0 | state->error_pos = (const char*) p; |
7023 | 0 | state->_current = (void*) (intptr_t) s_error; |
7024 | 0 | return s_error; |
7025 | 0 | /* UNREACHABLE */; |
7026 | 0 | abort(); |
7027 | 0 | } |
7028 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_8: { |
7029 | 0 | switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { |
7030 | 0 | case 1: |
7031 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header; |
7032 | 0 | default: |
7033 | 0 | goto s_n_llhttp__internal__n_error_16; |
7034 | 0 | } |
7035 | 0 | /* UNREACHABLE */; |
7036 | 0 | abort(); |
7037 | 0 | } |
7038 | 0 | s_n_llhttp__internal__n_error_11: { |
7039 | 0 | state->error = 0x19; |
7040 | 0 | state->reason = "Missing expected CR after chunk size"; |
7041 | 0 | state->error_pos = (const char*) p; |
7042 | 0 | state->_current = (void*) (intptr_t) s_error; |
7043 | 0 | return s_error; |
7044 | 0 | /* UNREACHABLE */; |
7045 | 0 | abort(); |
7046 | 0 | } |
7047 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_5: { |
7048 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
7049 | 0 | case 1: |
7050 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
7051 | 0 | default: |
7052 | 0 | goto s_n_llhttp__internal__n_error_11; |
7053 | 0 | } |
7054 | 0 | /* UNREACHABLE */; |
7055 | 0 | abort(); |
7056 | 0 | } |
7057 | 0 | s_n_llhttp__internal__n_error_17: { |
7058 | 0 | state->error = 0x2; |
7059 | 0 | state->reason = "Invalid character in chunk extensions"; |
7060 | 0 | state->error_pos = (const char*) p; |
7061 | 0 | state->_current = (void*) (intptr_t) s_error; |
7062 | 0 | return s_error; |
7063 | 0 | /* UNREACHABLE */; |
7064 | 0 | abort(); |
7065 | 0 | } |
7066 | 0 | s_n_llhttp__internal__n_error_18: { |
7067 | 0 | state->error = 0x2; |
7068 | 0 | state->reason = "Invalid character in chunk extensions"; |
7069 | 0 | state->error_pos = (const char*) p; |
7070 | 0 | state->_current = (void*) (intptr_t) s_error; |
7071 | 0 | return s_error; |
7072 | 0 | /* UNREACHABLE */; |
7073 | 0 | abort(); |
7074 | 0 | } |
7075 | 0 | s_n_llhttp__internal__n_error_20: { |
7076 | 0 | state->error = 0x19; |
7077 | 0 | state->reason = "Missing expected CR after chunk extension name"; |
7078 | 0 | state->error_pos = (const char*) p; |
7079 | 0 | state->_current = (void*) (intptr_t) s_error; |
7080 | 0 | return s_error; |
7081 | 0 | /* UNREACHABLE */; |
7082 | 0 | abort(); |
7083 | 0 | } |
7084 | 0 | s_n_llhttp__internal__n_pause_5: { |
7085 | 0 | state->error = 0x15; |
7086 | 0 | state->reason = "on_chunk_extension_name pause"; |
7087 | 0 | state->error_pos = (const char*) p; |
7088 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_9; |
7089 | 0 | return s_error; |
7090 | 0 | /* UNREACHABLE */; |
7091 | 0 | abort(); |
7092 | 0 | } |
7093 | 0 | s_n_llhttp__internal__n_error_19: { |
7094 | 0 | state->error = 0x22; |
7095 | 0 | state->reason = "`on_chunk_extension_name` callback error"; |
7096 | 0 | state->error_pos = (const char*) p; |
7097 | 0 | state->_current = (void*) (intptr_t) s_error; |
7098 | 0 | return s_error; |
7099 | 0 | /* UNREACHABLE */; |
7100 | 0 | abort(); |
7101 | 0 | } |
7102 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name: { |
7103 | 0 | const unsigned char* start; |
7104 | 0 | int err; |
7105 | | |
7106 | 0 | start = state->_span_pos0; |
7107 | 0 | state->_span_pos0 = NULL; |
7108 | 0 | err = llhttp__on_chunk_extension_name(state, start, p); |
7109 | 0 | if (err != 0) { |
7110 | 0 | state->error = err; |
7111 | 0 | state->error_pos = (const char*) p; |
7112 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete; |
7113 | 0 | return s_error; |
7114 | 0 | } |
7115 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete; |
7116 | 0 | /* UNREACHABLE */; |
7117 | 0 | abort(); |
7118 | 0 | } |
7119 | 0 | s_n_llhttp__internal__n_pause_6: { |
7120 | 0 | state->error = 0x15; |
7121 | 0 | state->reason = "on_chunk_extension_name pause"; |
7122 | 0 | state->error_pos = (const char*) p; |
7123 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; |
7124 | 0 | return s_error; |
7125 | 0 | /* UNREACHABLE */; |
7126 | 0 | abort(); |
7127 | 0 | } |
7128 | 0 | s_n_llhttp__internal__n_error_21: { |
7129 | 0 | state->error = 0x22; |
7130 | 0 | state->reason = "`on_chunk_extension_name` callback error"; |
7131 | 0 | state->error_pos = (const char*) p; |
7132 | 0 | state->_current = (void*) (intptr_t) s_error; |
7133 | 0 | return s_error; |
7134 | 0 | /* UNREACHABLE */; |
7135 | 0 | abort(); |
7136 | 0 | } |
7137 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1: { |
7138 | 0 | const unsigned char* start; |
7139 | 0 | int err; |
7140 | | |
7141 | 0 | start = state->_span_pos0; |
7142 | 0 | state->_span_pos0 = NULL; |
7143 | 0 | err = llhttp__on_chunk_extension_name(state, start, p); |
7144 | 0 | if (err != 0) { |
7145 | 0 | state->error = err; |
7146 | 0 | state->error_pos = (const char*) (p + 1); |
7147 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1; |
7148 | 0 | return s_error; |
7149 | 0 | } |
7150 | 0 | p++; |
7151 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1; |
7152 | 0 | /* UNREACHABLE */; |
7153 | 0 | abort(); |
7154 | 0 | } |
7155 | 0 | s_n_llhttp__internal__n_pause_7: { |
7156 | 0 | state->error = 0x15; |
7157 | 0 | state->reason = "on_chunk_extension_name pause"; |
7158 | 0 | state->error_pos = (const char*) p; |
7159 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions; |
7160 | 0 | return s_error; |
7161 | 0 | /* UNREACHABLE */; |
7162 | 0 | abort(); |
7163 | 0 | } |
7164 | 0 | s_n_llhttp__internal__n_error_22: { |
7165 | 0 | state->error = 0x22; |
7166 | 0 | state->reason = "`on_chunk_extension_name` callback error"; |
7167 | 0 | state->error_pos = (const char*) p; |
7168 | 0 | state->_current = (void*) (intptr_t) s_error; |
7169 | 0 | return s_error; |
7170 | 0 | /* UNREACHABLE */; |
7171 | 0 | abort(); |
7172 | 0 | } |
7173 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2: { |
7174 | 0 | const unsigned char* start; |
7175 | 0 | int err; |
7176 | | |
7177 | 0 | start = state->_span_pos0; |
7178 | 0 | state->_span_pos0 = NULL; |
7179 | 0 | err = llhttp__on_chunk_extension_name(state, start, p); |
7180 | 0 | if (err != 0) { |
7181 | 0 | state->error = err; |
7182 | 0 | state->error_pos = (const char*) (p + 1); |
7183 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2; |
7184 | 0 | return s_error; |
7185 | 0 | } |
7186 | 0 | p++; |
7187 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2; |
7188 | 0 | /* UNREACHABLE */; |
7189 | 0 | abort(); |
7190 | 0 | } |
7191 | 0 | s_n_llhttp__internal__n_error_25: { |
7192 | 0 | state->error = 0x19; |
7193 | 0 | state->reason = "Missing expected CR after chunk extension value"; |
7194 | 0 | state->error_pos = (const char*) p; |
7195 | 0 | state->_current = (void*) (intptr_t) s_error; |
7196 | 0 | return s_error; |
7197 | 0 | /* UNREACHABLE */; |
7198 | 0 | abort(); |
7199 | 0 | } |
7200 | 0 | s_n_llhttp__internal__n_pause_8: { |
7201 | 0 | state->error = 0x15; |
7202 | 0 | state->reason = "on_chunk_extension_value pause"; |
7203 | 0 | state->error_pos = (const char*) p; |
7204 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_10; |
7205 | 0 | return s_error; |
7206 | 0 | /* UNREACHABLE */; |
7207 | 0 | abort(); |
7208 | 0 | } |
7209 | 0 | s_n_llhttp__internal__n_error_24: { |
7210 | 0 | state->error = 0x23; |
7211 | 0 | state->reason = "`on_chunk_extension_value` callback error"; |
7212 | 0 | state->error_pos = (const char*) p; |
7213 | 0 | state->_current = (void*) (intptr_t) s_error; |
7214 | 0 | return s_error; |
7215 | 0 | /* UNREACHABLE */; |
7216 | 0 | abort(); |
7217 | 0 | } |
7218 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value: { |
7219 | 0 | const unsigned char* start; |
7220 | 0 | int err; |
7221 | | |
7222 | 0 | start = state->_span_pos0; |
7223 | 0 | state->_span_pos0 = NULL; |
7224 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7225 | 0 | if (err != 0) { |
7226 | 0 | state->error = err; |
7227 | 0 | state->error_pos = (const char*) p; |
7228 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete; |
7229 | 0 | return s_error; |
7230 | 0 | } |
7231 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete; |
7232 | 0 | /* UNREACHABLE */; |
7233 | 0 | abort(); |
7234 | 0 | } |
7235 | 0 | s_n_llhttp__internal__n_pause_9: { |
7236 | 0 | state->error = 0x15; |
7237 | 0 | state->reason = "on_chunk_extension_value pause"; |
7238 | 0 | state->error_pos = (const char*) p; |
7239 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; |
7240 | 0 | return s_error; |
7241 | 0 | /* UNREACHABLE */; |
7242 | 0 | abort(); |
7243 | 0 | } |
7244 | 0 | s_n_llhttp__internal__n_error_26: { |
7245 | 0 | state->error = 0x23; |
7246 | 0 | state->reason = "`on_chunk_extension_value` callback error"; |
7247 | 0 | state->error_pos = (const char*) p; |
7248 | 0 | state->_current = (void*) (intptr_t) s_error; |
7249 | 0 | return s_error; |
7250 | 0 | /* UNREACHABLE */; |
7251 | 0 | abort(); |
7252 | 0 | } |
7253 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1: { |
7254 | 0 | const unsigned char* start; |
7255 | 0 | int err; |
7256 | | |
7257 | 0 | start = state->_span_pos0; |
7258 | 0 | state->_span_pos0 = NULL; |
7259 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7260 | 0 | if (err != 0) { |
7261 | 0 | state->error = err; |
7262 | 0 | state->error_pos = (const char*) (p + 1); |
7263 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1; |
7264 | 0 | return s_error; |
7265 | 0 | } |
7266 | 0 | p++; |
7267 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1; |
7268 | 0 | /* UNREACHABLE */; |
7269 | 0 | abort(); |
7270 | 0 | } |
7271 | 0 | s_n_llhttp__internal__n_error_28: { |
7272 | 0 | state->error = 0x19; |
7273 | 0 | state->reason = "Missing expected CR after chunk extension value"; |
7274 | 0 | state->error_pos = (const char*) p; |
7275 | 0 | state->_current = (void*) (intptr_t) s_error; |
7276 | 0 | return s_error; |
7277 | 0 | /* UNREACHABLE */; |
7278 | 0 | abort(); |
7279 | 0 | } |
7280 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_11: { |
7281 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
7282 | 0 | case 1: |
7283 | 0 | goto s_n_llhttp__internal__n_chunk_size_almost_done; |
7284 | 0 | default: |
7285 | 0 | goto s_n_llhttp__internal__n_error_28; |
7286 | 0 | } |
7287 | 0 | /* UNREACHABLE */; |
7288 | 0 | abort(); |
7289 | 0 | } |
7290 | 0 | s_n_llhttp__internal__n_error_29: { |
7291 | 0 | state->error = 0x2; |
7292 | 0 | state->reason = "Invalid character in chunk extensions quote value"; |
7293 | 0 | state->error_pos = (const char*) p; |
7294 | 0 | state->_current = (void*) (intptr_t) s_error; |
7295 | 0 | return s_error; |
7296 | 0 | /* UNREACHABLE */; |
7297 | 0 | abort(); |
7298 | 0 | } |
7299 | 0 | s_n_llhttp__internal__n_pause_10: { |
7300 | 0 | state->error = 0x15; |
7301 | 0 | state->reason = "on_chunk_extension_value pause"; |
7302 | 0 | state->error_pos = (const char*) p; |
7303 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extension_quoted_value_done; |
7304 | 0 | return s_error; |
7305 | 0 | /* UNREACHABLE */; |
7306 | 0 | abort(); |
7307 | 0 | } |
7308 | 0 | s_n_llhttp__internal__n_error_27: { |
7309 | 0 | state->error = 0x23; |
7310 | 0 | state->reason = "`on_chunk_extension_value` callback error"; |
7311 | 0 | state->error_pos = (const char*) p; |
7312 | 0 | state->_current = (void*) (intptr_t) s_error; |
7313 | 0 | return s_error; |
7314 | 0 | /* UNREACHABLE */; |
7315 | 0 | abort(); |
7316 | 0 | } |
7317 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2: { |
7318 | 0 | const unsigned char* start; |
7319 | 0 | int err; |
7320 | | |
7321 | 0 | start = state->_span_pos0; |
7322 | 0 | state->_span_pos0 = NULL; |
7323 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7324 | 0 | if (err != 0) { |
7325 | 0 | state->error = err; |
7326 | 0 | state->error_pos = (const char*) p; |
7327 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2; |
7328 | 0 | return s_error; |
7329 | 0 | } |
7330 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2; |
7331 | 0 | /* UNREACHABLE */; |
7332 | 0 | abort(); |
7333 | 0 | } |
7334 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3: { |
7335 | 0 | const unsigned char* start; |
7336 | 0 | int err; |
7337 | | |
7338 | 0 | start = state->_span_pos0; |
7339 | 0 | state->_span_pos0 = NULL; |
7340 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7341 | 0 | if (err != 0) { |
7342 | 0 | state->error = err; |
7343 | 0 | state->error_pos = (const char*) (p + 1); |
7344 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30; |
7345 | 0 | return s_error; |
7346 | 0 | } |
7347 | 0 | p++; |
7348 | 0 | goto s_n_llhttp__internal__n_error_30; |
7349 | 0 | /* UNREACHABLE */; |
7350 | 0 | abort(); |
7351 | 0 | } |
7352 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4: { |
7353 | 0 | const unsigned char* start; |
7354 | 0 | int err; |
7355 | | |
7356 | 0 | start = state->_span_pos0; |
7357 | 0 | state->_span_pos0 = NULL; |
7358 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7359 | 0 | if (err != 0) { |
7360 | 0 | state->error = err; |
7361 | 0 | state->error_pos = (const char*) (p + 1); |
7362 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_31; |
7363 | 0 | return s_error; |
7364 | 0 | } |
7365 | 0 | p++; |
7366 | 0 | goto s_n_llhttp__internal__n_error_31; |
7367 | 0 | /* UNREACHABLE */; |
7368 | 0 | abort(); |
7369 | 0 | } |
7370 | 0 | s_n_llhttp__internal__n_pause_11: { |
7371 | 0 | state->error = 0x15; |
7372 | 0 | state->reason = "on_chunk_extension_value pause"; |
7373 | 0 | state->error_pos = (const char*) p; |
7374 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions; |
7375 | 0 | return s_error; |
7376 | 0 | /* UNREACHABLE */; |
7377 | 0 | abort(); |
7378 | 0 | } |
7379 | 0 | s_n_llhttp__internal__n_error_32: { |
7380 | 0 | state->error = 0x23; |
7381 | 0 | state->reason = "`on_chunk_extension_value` callback error"; |
7382 | 0 | state->error_pos = (const char*) p; |
7383 | 0 | state->_current = (void*) (intptr_t) s_error; |
7384 | 0 | return s_error; |
7385 | 0 | /* UNREACHABLE */; |
7386 | 0 | abort(); |
7387 | 0 | } |
7388 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5: { |
7389 | 0 | const unsigned char* start; |
7390 | 0 | int err; |
7391 | | |
7392 | 0 | start = state->_span_pos0; |
7393 | 0 | state->_span_pos0 = NULL; |
7394 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7395 | 0 | if (err != 0) { |
7396 | 0 | state->error = err; |
7397 | 0 | state->error_pos = (const char*) (p + 1); |
7398 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3; |
7399 | 0 | return s_error; |
7400 | 0 | } |
7401 | 0 | p++; |
7402 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3; |
7403 | 0 | /* UNREACHABLE */; |
7404 | 0 | abort(); |
7405 | 0 | } |
7406 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6: { |
7407 | 0 | const unsigned char* start; |
7408 | 0 | int err; |
7409 | | |
7410 | 0 | start = state->_span_pos0; |
7411 | 0 | state->_span_pos0 = NULL; |
7412 | 0 | err = llhttp__on_chunk_extension_value(state, start, p); |
7413 | 0 | if (err != 0) { |
7414 | 0 | state->error = err; |
7415 | 0 | state->error_pos = (const char*) (p + 1); |
7416 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_33; |
7417 | 0 | return s_error; |
7418 | 0 | } |
7419 | 0 | p++; |
7420 | 0 | goto s_n_llhttp__internal__n_error_33; |
7421 | 0 | /* UNREACHABLE */; |
7422 | 0 | abort(); |
7423 | 0 | } |
7424 | 0 | s_n_llhttp__internal__n_pause_12: { |
7425 | 0 | state->error = 0x15; |
7426 | 0 | state->reason = "on_chunk_extension_name pause"; |
7427 | 0 | state->error_pos = (const char*) p; |
7428 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extension_value; |
7429 | 0 | return s_error; |
7430 | 0 | /* UNREACHABLE */; |
7431 | 0 | abort(); |
7432 | 0 | } |
7433 | 0 | s_n_llhttp__internal__n_error_23: { |
7434 | 0 | state->error = 0x22; |
7435 | 0 | state->reason = "`on_chunk_extension_name` callback error"; |
7436 | 0 | state->error_pos = (const char*) p; |
7437 | 0 | state->_current = (void*) (intptr_t) s_error; |
7438 | 0 | return s_error; |
7439 | 0 | /* UNREACHABLE */; |
7440 | 0 | abort(); |
7441 | 0 | } |
7442 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3: { |
7443 | 0 | switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { |
7444 | 0 | case 0: |
7445 | 0 | goto s_n_llhttp__internal__n_chunk_extension_value; |
7446 | 0 | case 21: |
7447 | 0 | goto s_n_llhttp__internal__n_pause_12; |
7448 | 0 | default: |
7449 | 0 | goto s_n_llhttp__internal__n_error_23; |
7450 | 0 | } |
7451 | 0 | /* UNREACHABLE */; |
7452 | 0 | abort(); |
7453 | 0 | } |
7454 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3: { |
7455 | 0 | const unsigned char* start; |
7456 | 0 | int err; |
7457 | | |
7458 | 0 | start = state->_span_pos0; |
7459 | 0 | state->_span_pos0 = NULL; |
7460 | 0 | err = llhttp__on_chunk_extension_name(state, start, p); |
7461 | 0 | if (err != 0) { |
7462 | 0 | state->error = err; |
7463 | 0 | state->error_pos = (const char*) (p + 1); |
7464 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value; |
7465 | 0 | return s_error; |
7466 | 0 | } |
7467 | 0 | p++; |
7468 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value; |
7469 | 0 | /* UNREACHABLE */; |
7470 | 0 | abort(); |
7471 | 0 | } |
7472 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4: { |
7473 | 0 | const unsigned char* start; |
7474 | 0 | int err; |
7475 | | |
7476 | 0 | start = state->_span_pos0; |
7477 | 0 | state->_span_pos0 = NULL; |
7478 | 0 | err = llhttp__on_chunk_extension_name(state, start, p); |
7479 | 0 | if (err != 0) { |
7480 | 0 | state->error = err; |
7481 | 0 | state->error_pos = (const char*) (p + 1); |
7482 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_34; |
7483 | 0 | return s_error; |
7484 | 0 | } |
7485 | 0 | p++; |
7486 | 0 | goto s_n_llhttp__internal__n_error_34; |
7487 | 0 | /* UNREACHABLE */; |
7488 | 0 | abort(); |
7489 | 0 | } |
7490 | 0 | s_n_llhttp__internal__n_error_35: { |
7491 | 0 | state->error = 0xc; |
7492 | 0 | state->reason = "Invalid character in chunk size"; |
7493 | 0 | state->error_pos = (const char*) p; |
7494 | 0 | state->_current = (void*) (intptr_t) s_error; |
7495 | 0 | return s_error; |
7496 | 0 | /* UNREACHABLE */; |
7497 | 0 | abort(); |
7498 | 0 | } |
7499 | 0 | s_n_llhttp__internal__n_invoke_mul_add_content_length: { |
7500 | 0 | switch (llhttp__internal__c_mul_add_content_length(state, p, endp, match)) { |
7501 | 0 | case 1: |
7502 | 0 | goto s_n_llhttp__internal__n_error_36; |
7503 | 0 | default: |
7504 | 0 | goto s_n_llhttp__internal__n_chunk_size; |
7505 | 0 | } |
7506 | 0 | /* UNREACHABLE */; |
7507 | 0 | abort(); |
7508 | 0 | } |
7509 | 0 | s_n_llhttp__internal__n_error_37: { |
7510 | 0 | state->error = 0xc; |
7511 | 0 | state->reason = "Invalid character in chunk size"; |
7512 | 0 | state->error_pos = (const char*) p; |
7513 | 0 | state->_current = (void*) (intptr_t) s_error; |
7514 | 0 | return s_error; |
7515 | 0 | /* UNREACHABLE */; |
7516 | 0 | abort(); |
7517 | 0 | } |
7518 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_body_1: { |
7519 | 0 | const unsigned char* start; |
7520 | 0 | int err; |
7521 | | |
7522 | 0 | start = state->_span_pos0; |
7523 | 0 | state->_span_pos0 = NULL; |
7524 | 0 | err = llhttp__on_body(state, start, p); |
7525 | 0 | if (err != 0) { |
7526 | 0 | state->error = err; |
7527 | 0 | state->error_pos = (const char*) p; |
7528 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
7529 | 0 | return s_error; |
7530 | 0 | } |
7531 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
7532 | 0 | /* UNREACHABLE */; |
7533 | 0 | abort(); |
7534 | 0 | } |
7535 | 0 | s_n_llhttp__internal__n_invoke_update_finish_3: { |
7536 | 0 | switch (llhttp__internal__c_update_finish_3(state, p, endp)) { |
7537 | 0 | default: |
7538 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_body_2; |
7539 | 0 | } |
7540 | 0 | /* UNREACHABLE */; |
7541 | 0 | abort(); |
7542 | 0 | } |
7543 | 0 | s_n_llhttp__internal__n_error_39: { |
7544 | 0 | state->error = 0xf; |
7545 | 0 | state->reason = "Request has invalid `Transfer-Encoding`"; |
7546 | 0 | state->error_pos = (const char*) p; |
7547 | 0 | state->_current = (void*) (intptr_t) s_error; |
7548 | 0 | return s_error; |
7549 | 0 | /* UNREACHABLE */; |
7550 | 0 | abort(); |
7551 | 0 | } |
7552 | 0 | s_n_llhttp__internal__n_pause: { |
7553 | 0 | state->error = 0x15; |
7554 | 0 | state->reason = "on_message_complete pause"; |
7555 | 0 | state->error_pos = (const char*) p; |
7556 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; |
7557 | 0 | return s_error; |
7558 | 0 | /* UNREACHABLE */; |
7559 | 0 | abort(); |
7560 | 0 | } |
7561 | 0 | s_n_llhttp__internal__n_error_7: { |
7562 | 0 | state->error = 0x12; |
7563 | 0 | state->reason = "`on_message_complete` callback error"; |
7564 | 0 | state->error_pos = (const char*) p; |
7565 | 0 | state->_current = (void*) (intptr_t) s_error; |
7566 | 0 | return s_error; |
7567 | 0 | /* UNREACHABLE */; |
7568 | 0 | abort(); |
7569 | 0 | } |
7570 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_message_complete: { |
7571 | 0 | switch (llhttp__on_message_complete(state, p, endp)) { |
7572 | 0 | case 0: |
7573 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; |
7574 | 0 | case 21: |
7575 | 0 | goto s_n_llhttp__internal__n_pause; |
7576 | 0 | default: |
7577 | 0 | goto s_n_llhttp__internal__n_error_7; |
7578 | 0 | } |
7579 | 0 | /* UNREACHABLE */; |
7580 | 0 | abort(); |
7581 | 0 | } |
7582 | 0 | s_n_llhttp__internal__n_invoke_or_flags_1: { |
7583 | 0 | switch (llhttp__internal__c_or_flags_1(state, p, endp)) { |
7584 | 0 | default: |
7585 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7586 | 0 | } |
7587 | 0 | /* UNREACHABLE */; |
7588 | 0 | abort(); |
7589 | 0 | } |
7590 | 0 | s_n_llhttp__internal__n_invoke_or_flags_2: { |
7591 | 0 | switch (llhttp__internal__c_or_flags_1(state, p, endp)) { |
7592 | 0 | default: |
7593 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7594 | 0 | } |
7595 | 0 | /* UNREACHABLE */; |
7596 | 0 | abort(); |
7597 | 0 | } |
7598 | 0 | s_n_llhttp__internal__n_invoke_update_upgrade: { |
7599 | 0 | switch (llhttp__internal__c_update_upgrade(state, p, endp)) { |
7600 | 0 | default: |
7601 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_2; |
7602 | 0 | } |
7603 | 0 | /* UNREACHABLE */; |
7604 | 0 | abort(); |
7605 | 0 | } |
7606 | 0 | s_n_llhttp__internal__n_pause_14: { |
7607 | 0 | state->error = 0x15; |
7608 | 0 | state->reason = "Paused by on_headers_complete"; |
7609 | 0 | state->error_pos = (const char*) p; |
7610 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7611 | 0 | return s_error; |
7612 | 0 | /* UNREACHABLE */; |
7613 | 0 | abort(); |
7614 | 0 | } |
7615 | 0 | s_n_llhttp__internal__n_error_6: { |
7616 | 0 | state->error = 0x11; |
7617 | 0 | state->reason = "User callback error"; |
7618 | 0 | state->error_pos = (const char*) p; |
7619 | 0 | state->_current = (void*) (intptr_t) s_error; |
7620 | 0 | return s_error; |
7621 | 0 | /* UNREACHABLE */; |
7622 | 0 | abort(); |
7623 | 0 | } |
7624 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete: { |
7625 | 0 | switch (llhttp__on_headers_complete(state, p, endp)) { |
7626 | 0 | case 0: |
7627 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7628 | 0 | case 1: |
7629 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_1; |
7630 | 0 | case 2: |
7631 | 0 | goto s_n_llhttp__internal__n_invoke_update_upgrade; |
7632 | 0 | case 21: |
7633 | 0 | goto s_n_llhttp__internal__n_pause_14; |
7634 | 0 | default: |
7635 | 0 | goto s_n_llhttp__internal__n_error_6; |
7636 | 0 | } |
7637 | 0 | /* UNREACHABLE */; |
7638 | 0 | abort(); |
7639 | 0 | } |
7640 | 0 | s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete: { |
7641 | 0 | switch (llhttp__before_headers_complete(state, p, endp)) { |
7642 | 0 | default: |
7643 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete; |
7644 | 0 | } |
7645 | 0 | /* UNREACHABLE */; |
7646 | 0 | abort(); |
7647 | 0 | } |
7648 | 0 | s_n_llhttp__internal__n_invoke_test_flags: { |
7649 | 0 | switch (llhttp__internal__c_test_flags(state, p, endp)) { |
7650 | 0 | case 1: |
7651 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1; |
7652 | 0 | default: |
7653 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; |
7654 | 0 | } |
7655 | 0 | /* UNREACHABLE */; |
7656 | 0 | abort(); |
7657 | 0 | } |
7658 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_1: { |
7659 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
7660 | 0 | case 1: |
7661 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags; |
7662 | 0 | default: |
7663 | 0 | goto s_n_llhttp__internal__n_error_5; |
7664 | 0 | } |
7665 | 0 | /* UNREACHABLE */; |
7666 | 0 | abort(); |
7667 | 0 | } |
7668 | 0 | s_n_llhttp__internal__n_pause_17: { |
7669 | 0 | state->error = 0x15; |
7670 | 0 | state->reason = "on_chunk_complete pause"; |
7671 | 0 | state->error_pos = (const char*) p; |
7672 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
7673 | 0 | return s_error; |
7674 | 0 | /* UNREACHABLE */; |
7675 | 0 | abort(); |
7676 | 0 | } |
7677 | 0 | s_n_llhttp__internal__n_error_42: { |
7678 | 0 | state->error = 0x14; |
7679 | 0 | state->reason = "`on_chunk_complete` callback error"; |
7680 | 0 | state->error_pos = (const char*) p; |
7681 | 0 | state->_current = (void*) (intptr_t) s_error; |
7682 | 0 | return s_error; |
7683 | 0 | /* UNREACHABLE */; |
7684 | 0 | abort(); |
7685 | 0 | } |
7686 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2: { |
7687 | 0 | switch (llhttp__on_chunk_complete(state, p, endp)) { |
7688 | 0 | case 0: |
7689 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; |
7690 | 0 | case 21: |
7691 | 0 | goto s_n_llhttp__internal__n_pause_17; |
7692 | 0 | default: |
7693 | 0 | goto s_n_llhttp__internal__n_error_42; |
7694 | 0 | } |
7695 | 0 | /* UNREACHABLE */; |
7696 | 0 | abort(); |
7697 | 0 | } |
7698 | 0 | s_n_llhttp__internal__n_invoke_or_flags_3: { |
7699 | 0 | switch (llhttp__internal__c_or_flags_1(state, p, endp)) { |
7700 | 0 | default: |
7701 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7702 | 0 | } |
7703 | 0 | /* UNREACHABLE */; |
7704 | 0 | abort(); |
7705 | 0 | } |
7706 | 0 | s_n_llhttp__internal__n_invoke_or_flags_4: { |
7707 | 0 | switch (llhttp__internal__c_or_flags_1(state, p, endp)) { |
7708 | 0 | default: |
7709 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7710 | 0 | } |
7711 | 0 | /* UNREACHABLE */; |
7712 | 0 | abort(); |
7713 | 0 | } |
7714 | 0 | s_n_llhttp__internal__n_invoke_update_upgrade_1: { |
7715 | 0 | switch (llhttp__internal__c_update_upgrade(state, p, endp)) { |
7716 | 0 | default: |
7717 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_4; |
7718 | 0 | } |
7719 | 0 | /* UNREACHABLE */; |
7720 | 0 | abort(); |
7721 | 0 | } |
7722 | 0 | s_n_llhttp__internal__n_pause_16: { |
7723 | 0 | state->error = 0x15; |
7724 | 0 | state->reason = "Paused by on_headers_complete"; |
7725 | 0 | state->error_pos = (const char*) p; |
7726 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7727 | 0 | return s_error; |
7728 | 0 | /* UNREACHABLE */; |
7729 | 0 | abort(); |
7730 | 0 | } |
7731 | 0 | s_n_llhttp__internal__n_error_41: { |
7732 | 0 | state->error = 0x11; |
7733 | 0 | state->reason = "User callback error"; |
7734 | 0 | state->error_pos = (const char*) p; |
7735 | 0 | state->_current = (void*) (intptr_t) s_error; |
7736 | 0 | return s_error; |
7737 | 0 | /* UNREACHABLE */; |
7738 | 0 | abort(); |
7739 | 0 | } |
7740 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1: { |
7741 | 0 | switch (llhttp__on_headers_complete(state, p, endp)) { |
7742 | 0 | case 0: |
7743 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; |
7744 | 0 | case 1: |
7745 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_3; |
7746 | 0 | case 2: |
7747 | 0 | goto s_n_llhttp__internal__n_invoke_update_upgrade_1; |
7748 | 0 | case 21: |
7749 | 0 | goto s_n_llhttp__internal__n_pause_16; |
7750 | 0 | default: |
7751 | 0 | goto s_n_llhttp__internal__n_error_41; |
7752 | 0 | } |
7753 | 0 | /* UNREACHABLE */; |
7754 | 0 | abort(); |
7755 | 0 | } |
7756 | 0 | s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1: { |
7757 | 0 | switch (llhttp__before_headers_complete(state, p, endp)) { |
7758 | 0 | default: |
7759 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1; |
7760 | 0 | } |
7761 | 0 | /* UNREACHABLE */; |
7762 | 0 | abort(); |
7763 | 0 | } |
7764 | 0 | s_n_llhttp__internal__n_invoke_test_flags_1: { |
7765 | 0 | switch (llhttp__internal__c_test_flags(state, p, endp)) { |
7766 | 0 | case 1: |
7767 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2; |
7768 | 0 | default: |
7769 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1; |
7770 | 0 | } |
7771 | 0 | /* UNREACHABLE */; |
7772 | 0 | abort(); |
7773 | 0 | } |
7774 | 0 | s_n_llhttp__internal__n_error_43: { |
7775 | 0 | state->error = 0x2; |
7776 | 0 | state->reason = "Expected LF after headers"; |
7777 | 0 | state->error_pos = (const char*) p; |
7778 | 0 | state->_current = (void*) (intptr_t) s_error; |
7779 | 0 | return s_error; |
7780 | 0 | /* UNREACHABLE */; |
7781 | 0 | abort(); |
7782 | 0 | } |
7783 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_12: { |
7784 | 0 | switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { |
7785 | 0 | case 1: |
7786 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_1; |
7787 | 0 | default: |
7788 | 0 | goto s_n_llhttp__internal__n_error_43; |
7789 | 0 | } |
7790 | 0 | /* UNREACHABLE */; |
7791 | 0 | abort(); |
7792 | 0 | } |
7793 | 0 | s_n_llhttp__internal__n_error_44: { |
7794 | 0 | state->error = 0xa; |
7795 | 0 | state->reason = "Invalid header token"; |
7796 | 0 | state->error_pos = (const char*) p; |
7797 | 0 | state->_current = (void*) (intptr_t) s_error; |
7798 | 0 | return s_error; |
7799 | 0 | /* UNREACHABLE */; |
7800 | 0 | abort(); |
7801 | 0 | } |
7802 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { |
7803 | 0 | const unsigned char* start; |
7804 | 0 | int err; |
7805 | | |
7806 | 0 | start = state->_span_pos0; |
7807 | 0 | state->_span_pos0 = NULL; |
7808 | 0 | err = llhttp__on_header_field(state, start, p); |
7809 | 0 | if (err != 0) { |
7810 | 0 | state->error = err; |
7811 | 0 | state->error_pos = (const char*) (p + 1); |
7812 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_5; |
7813 | 0 | return s_error; |
7814 | 0 | } |
7815 | 0 | p++; |
7816 | 0 | goto s_n_llhttp__internal__n_error_5; |
7817 | 0 | /* UNREACHABLE */; |
7818 | 0 | abort(); |
7819 | 0 | } |
7820 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_13: { |
7821 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
7822 | 0 | case 1: |
7823 | 0 | goto s_n_llhttp__internal__n_header_field_colon_discard_ws; |
7824 | 0 | default: |
7825 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field; |
7826 | 0 | } |
7827 | 0 | /* UNREACHABLE */; |
7828 | 0 | abort(); |
7829 | 0 | } |
7830 | 0 | s_n_llhttp__internal__n_error_60: { |
7831 | 0 | state->error = 0xb; |
7832 | 0 | state->reason = "Content-Length can't be present with Transfer-Encoding"; |
7833 | 0 | state->error_pos = (const char*) p; |
7834 | 0 | state->_current = (void*) (intptr_t) s_error; |
7835 | 0 | return s_error; |
7836 | 0 | /* UNREACHABLE */; |
7837 | 0 | abort(); |
7838 | 0 | } |
7839 | 0 | s_n_llhttp__internal__n_error_47: { |
7840 | 0 | state->error = 0xa; |
7841 | 0 | state->reason = "Invalid header value char"; |
7842 | 0 | state->error_pos = (const char*) p; |
7843 | 0 | state->_current = (void*) (intptr_t) s_error; |
7844 | 0 | return s_error; |
7845 | 0 | /* UNREACHABLE */; |
7846 | 0 | abort(); |
7847 | 0 | } |
7848 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_15: { |
7849 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
7850 | 0 | case 1: |
7851 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
7852 | 0 | default: |
7853 | 0 | goto s_n_llhttp__internal__n_error_47; |
7854 | 0 | } |
7855 | 0 | /* UNREACHABLE */; |
7856 | 0 | abort(); |
7857 | 0 | } |
7858 | 0 | s_n_llhttp__internal__n_error_49: { |
7859 | 0 | state->error = 0xb; |
7860 | 0 | state->reason = "Empty Content-Length"; |
7861 | 0 | state->error_pos = (const char*) p; |
7862 | 0 | state->_current = (void*) (intptr_t) s_error; |
7863 | 0 | return s_error; |
7864 | 0 | /* UNREACHABLE */; |
7865 | 0 | abort(); |
7866 | 0 | } |
7867 | 0 | s_n_llhttp__internal__n_pause_18: { |
7868 | 0 | state->error = 0x15; |
7869 | 0 | state->reason = "on_header_value_complete pause"; |
7870 | 0 | state->error_pos = (const char*) p; |
7871 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_field_start; |
7872 | 0 | return s_error; |
7873 | 0 | /* UNREACHABLE */; |
7874 | 0 | abort(); |
7875 | 0 | } |
7876 | 0 | s_n_llhttp__internal__n_error_48: { |
7877 | 0 | state->error = 0x1d; |
7878 | 0 | state->reason = "`on_header_value_complete` callback error"; |
7879 | 0 | state->error_pos = (const char*) p; |
7880 | 0 | state->_current = (void*) (intptr_t) s_error; |
7881 | 0 | return s_error; |
7882 | 0 | /* UNREACHABLE */; |
7883 | 0 | abort(); |
7884 | 0 | } |
7885 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value: { |
7886 | 0 | const unsigned char* start; |
7887 | 0 | int err; |
7888 | | |
7889 | 0 | start = state->_span_pos0; |
7890 | 0 | state->_span_pos0 = NULL; |
7891 | 0 | err = llhttp__on_header_value(state, start, p); |
7892 | 0 | if (err != 0) { |
7893 | 0 | state->error = err; |
7894 | 0 | state->error_pos = (const char*) p; |
7895 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; |
7896 | 0 | return s_error; |
7897 | 0 | } |
7898 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; |
7899 | 0 | /* UNREACHABLE */; |
7900 | 0 | abort(); |
7901 | 0 | } |
7902 | 0 | s_n_llhttp__internal__n_invoke_update_header_state: { |
7903 | 0 | switch (llhttp__internal__c_update_header_state(state, p, endp)) { |
7904 | 0 | default: |
7905 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value; |
7906 | 0 | } |
7907 | 0 | /* UNREACHABLE */; |
7908 | 0 | abort(); |
7909 | 0 | } |
7910 | 0 | s_n_llhttp__internal__n_invoke_or_flags_5: { |
7911 | 0 | switch (llhttp__internal__c_or_flags_5(state, p, endp)) { |
7912 | 0 | default: |
7913 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state; |
7914 | 0 | } |
7915 | 0 | /* UNREACHABLE */; |
7916 | 0 | abort(); |
7917 | 0 | } |
7918 | 0 | s_n_llhttp__internal__n_invoke_or_flags_6: { |
7919 | 0 | switch (llhttp__internal__c_or_flags_6(state, p, endp)) { |
7920 | 0 | default: |
7921 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state; |
7922 | 0 | } |
7923 | 0 | /* UNREACHABLE */; |
7924 | 0 | abort(); |
7925 | 0 | } |
7926 | 0 | s_n_llhttp__internal__n_invoke_or_flags_7: { |
7927 | 0 | switch (llhttp__internal__c_or_flags_7(state, p, endp)) { |
7928 | 0 | default: |
7929 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state; |
7930 | 0 | } |
7931 | 0 | /* UNREACHABLE */; |
7932 | 0 | abort(); |
7933 | 0 | } |
7934 | 0 | s_n_llhttp__internal__n_invoke_or_flags_8: { |
7935 | 0 | switch (llhttp__internal__c_or_flags_8(state, p, endp)) { |
7936 | 0 | default: |
7937 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value; |
7938 | 0 | } |
7939 | 0 | /* UNREACHABLE */; |
7940 | 0 | abort(); |
7941 | 0 | } |
7942 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_2: { |
7943 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
7944 | 0 | case 5: |
7945 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_5; |
7946 | 0 | case 6: |
7947 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_6; |
7948 | 0 | case 7: |
7949 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_7; |
7950 | 0 | case 8: |
7951 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_8; |
7952 | 0 | default: |
7953 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value; |
7954 | 0 | } |
7955 | 0 | /* UNREACHABLE */; |
7956 | 0 | abort(); |
7957 | 0 | } |
7958 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_1: { |
7959 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
7960 | 0 | case 2: |
7961 | 0 | goto s_n_llhttp__internal__n_error_49; |
7962 | 0 | default: |
7963 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_2; |
7964 | 0 | } |
7965 | 0 | /* UNREACHABLE */; |
7966 | 0 | abort(); |
7967 | 0 | } |
7968 | 0 | s_n_llhttp__internal__n_error_46: { |
7969 | 0 | state->error = 0xa; |
7970 | 0 | state->reason = "Invalid header value char"; |
7971 | 0 | state->error_pos = (const char*) p; |
7972 | 0 | state->_current = (void*) (intptr_t) s_error; |
7973 | 0 | return s_error; |
7974 | 0 | /* UNREACHABLE */; |
7975 | 0 | abort(); |
7976 | 0 | } |
7977 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_14: { |
7978 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
7979 | 0 | case 1: |
7980 | 0 | goto s_n_llhttp__internal__n_header_value_discard_lws; |
7981 | 0 | default: |
7982 | 0 | goto s_n_llhttp__internal__n_error_46; |
7983 | 0 | } |
7984 | 0 | /* UNREACHABLE */; |
7985 | 0 | abort(); |
7986 | 0 | } |
7987 | 0 | s_n_llhttp__internal__n_error_50: { |
7988 | 0 | state->error = 0x2; |
7989 | 0 | state->reason = "Expected LF after CR"; |
7990 | 0 | state->error_pos = (const char*) p; |
7991 | 0 | state->_current = (void*) (intptr_t) s_error; |
7992 | 0 | return s_error; |
7993 | 0 | /* UNREACHABLE */; |
7994 | 0 | abort(); |
7995 | 0 | } |
7996 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_16: { |
7997 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
7998 | 0 | case 1: |
7999 | 0 | goto s_n_llhttp__internal__n_header_value_discard_lws; |
8000 | 0 | default: |
8001 | 0 | goto s_n_llhttp__internal__n_error_50; |
8002 | 0 | } |
8003 | 0 | /* UNREACHABLE */; |
8004 | 0 | abort(); |
8005 | 0 | } |
8006 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_1: { |
8007 | 0 | switch (llhttp__internal__c_update_header_state_1(state, p, endp)) { |
8008 | 0 | default: |
8009 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1; |
8010 | 0 | } |
8011 | 0 | /* UNREACHABLE */; |
8012 | 0 | abort(); |
8013 | 0 | } |
8014 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_4: { |
8015 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
8016 | 0 | case 8: |
8017 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_1; |
8018 | 0 | default: |
8019 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1; |
8020 | 0 | } |
8021 | 0 | /* UNREACHABLE */; |
8022 | 0 | abort(); |
8023 | 0 | } |
8024 | 0 | s_n_llhttp__internal__n_error_52: { |
8025 | 0 | state->error = 0xa; |
8026 | 0 | state->reason = "Unexpected whitespace after header value"; |
8027 | 0 | state->error_pos = (const char*) p; |
8028 | 0 | state->_current = (void*) (intptr_t) s_error; |
8029 | 0 | return s_error; |
8030 | 0 | /* UNREACHABLE */; |
8031 | 0 | abort(); |
8032 | 0 | } |
8033 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_18: { |
8034 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
8035 | 0 | case 1: |
8036 | 0 | goto s_n_llhttp__internal__n_invoke_load_header_state_4; |
8037 | 0 | default: |
8038 | 0 | goto s_n_llhttp__internal__n_error_52; |
8039 | 0 | } |
8040 | 0 | /* UNREACHABLE */; |
8041 | 0 | abort(); |
8042 | 0 | } |
8043 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_2: { |
8044 | 0 | switch (llhttp__internal__c_update_header_state(state, p, endp)) { |
8045 | 0 | default: |
8046 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; |
8047 | 0 | } |
8048 | 0 | /* UNREACHABLE */; |
8049 | 0 | abort(); |
8050 | 0 | } |
8051 | 0 | s_n_llhttp__internal__n_invoke_or_flags_9: { |
8052 | 0 | switch (llhttp__internal__c_or_flags_5(state, p, endp)) { |
8053 | 0 | default: |
8054 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_2; |
8055 | 0 | } |
8056 | 0 | /* UNREACHABLE */; |
8057 | 0 | abort(); |
8058 | 0 | } |
8059 | 0 | s_n_llhttp__internal__n_invoke_or_flags_10: { |
8060 | 0 | switch (llhttp__internal__c_or_flags_6(state, p, endp)) { |
8061 | 0 | default: |
8062 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_2; |
8063 | 0 | } |
8064 | 0 | /* UNREACHABLE */; |
8065 | 0 | abort(); |
8066 | 0 | } |
8067 | 0 | s_n_llhttp__internal__n_invoke_or_flags_11: { |
8068 | 0 | switch (llhttp__internal__c_or_flags_7(state, p, endp)) { |
8069 | 0 | default: |
8070 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_2; |
8071 | 0 | } |
8072 | 0 | /* UNREACHABLE */; |
8073 | 0 | abort(); |
8074 | 0 | } |
8075 | 0 | s_n_llhttp__internal__n_invoke_or_flags_12: { |
8076 | 0 | switch (llhttp__internal__c_or_flags_8(state, p, endp)) { |
8077 | 0 | default: |
8078 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; |
8079 | 0 | } |
8080 | 0 | /* UNREACHABLE */; |
8081 | 0 | abort(); |
8082 | 0 | } |
8083 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_5: { |
8084 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
8085 | 0 | case 5: |
8086 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_9; |
8087 | 0 | case 6: |
8088 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_10; |
8089 | 0 | case 7: |
8090 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_11; |
8091 | 0 | case 8: |
8092 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_12; |
8093 | 0 | default: |
8094 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; |
8095 | 0 | } |
8096 | 0 | /* UNREACHABLE */; |
8097 | 0 | abort(); |
8098 | 0 | } |
8099 | 0 | s_n_llhttp__internal__n_error_53: { |
8100 | 0 | state->error = 0x3; |
8101 | 0 | state->reason = "Missing expected LF after header value"; |
8102 | 0 | state->error_pos = (const char*) p; |
8103 | 0 | state->_current = (void*) (intptr_t) s_error; |
8104 | 0 | return s_error; |
8105 | 0 | /* UNREACHABLE */; |
8106 | 0 | abort(); |
8107 | 0 | } |
8108 | 0 | s_n_llhttp__internal__n_error_51: { |
8109 | 0 | state->error = 0x19; |
8110 | 0 | state->reason = "Missing expected CR after header value"; |
8111 | 0 | state->error_pos = (const char*) p; |
8112 | 0 | state->_current = (void*) (intptr_t) s_error; |
8113 | 0 | return s_error; |
8114 | 0 | /* UNREACHABLE */; |
8115 | 0 | abort(); |
8116 | 0 | } |
8117 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1: { |
8118 | 0 | const unsigned char* start; |
8119 | 0 | int err; |
8120 | | |
8121 | 0 | start = state->_span_pos0; |
8122 | 0 | state->_span_pos0 = NULL; |
8123 | 0 | err = llhttp__on_header_value(state, start, p); |
8124 | 0 | if (err != 0) { |
8125 | 0 | state->error = err; |
8126 | 0 | state->error_pos = (const char*) p; |
8127 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_17; |
8128 | 0 | return s_error; |
8129 | 0 | } |
8130 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_17; |
8131 | 0 | /* UNREACHABLE */; |
8132 | 0 | abort(); |
8133 | 0 | } |
8134 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: { |
8135 | 0 | const unsigned char* start; |
8136 | 0 | int err; |
8137 | | |
8138 | 0 | start = state->_span_pos0; |
8139 | 0 | state->_span_pos0 = NULL; |
8140 | 0 | err = llhttp__on_header_value(state, start, p); |
8141 | 0 | if (err != 0) { |
8142 | 0 | state->error = err; |
8143 | 0 | state->error_pos = (const char*) (p + 1); |
8144 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done; |
8145 | 0 | return s_error; |
8146 | 0 | } |
8147 | 0 | p++; |
8148 | 0 | goto s_n_llhttp__internal__n_header_value_almost_done; |
8149 | 0 | /* UNREACHABLE */; |
8150 | 0 | abort(); |
8151 | 0 | } |
8152 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: { |
8153 | 0 | const unsigned char* start; |
8154 | 0 | int err; |
8155 | | |
8156 | 0 | start = state->_span_pos0; |
8157 | 0 | state->_span_pos0 = NULL; |
8158 | 0 | err = llhttp__on_header_value(state, start, p); |
8159 | 0 | if (err != 0) { |
8160 | 0 | state->error = err; |
8161 | 0 | state->error_pos = (const char*) p; |
8162 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done; |
8163 | 0 | return s_error; |
8164 | 0 | } |
8165 | 0 | goto s_n_llhttp__internal__n_header_value_almost_done; |
8166 | 0 | /* UNREACHABLE */; |
8167 | 0 | abort(); |
8168 | 0 | } |
8169 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: { |
8170 | 0 | const unsigned char* start; |
8171 | 0 | int err; |
8172 | | |
8173 | 0 | start = state->_span_pos0; |
8174 | 0 | state->_span_pos0 = NULL; |
8175 | 0 | err = llhttp__on_header_value(state, start, p); |
8176 | 0 | if (err != 0) { |
8177 | 0 | state->error = err; |
8178 | 0 | state->error_pos = (const char*) (p + 1); |
8179 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done; |
8180 | 0 | return s_error; |
8181 | 0 | } |
8182 | 0 | p++; |
8183 | 0 | goto s_n_llhttp__internal__n_header_value_almost_done; |
8184 | 0 | /* UNREACHABLE */; |
8185 | 0 | abort(); |
8186 | 0 | } |
8187 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: { |
8188 | 0 | const unsigned char* start; |
8189 | 0 | int err; |
8190 | | |
8191 | 0 | start = state->_span_pos0; |
8192 | 0 | state->_span_pos0 = NULL; |
8193 | 0 | err = llhttp__on_header_value(state, start, p); |
8194 | 0 | if (err != 0) { |
8195 | 0 | state->error = err; |
8196 | 0 | state->error_pos = (const char*) p; |
8197 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_54; |
8198 | 0 | return s_error; |
8199 | 0 | } |
8200 | 0 | goto s_n_llhttp__internal__n_error_54; |
8201 | 0 | /* UNREACHABLE */; |
8202 | 0 | abort(); |
8203 | 0 | } |
8204 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_19: { |
8205 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
8206 | 0 | case 1: |
8207 | 0 | goto s_n_llhttp__internal__n_header_value_lenient; |
8208 | 0 | default: |
8209 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3; |
8210 | 0 | } |
8211 | 0 | /* UNREACHABLE */; |
8212 | 0 | abort(); |
8213 | 0 | } |
8214 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_4: { |
8215 | 0 | switch (llhttp__internal__c_update_header_state(state, p, endp)) { |
8216 | 0 | default: |
8217 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
8218 | 0 | } |
8219 | 0 | /* UNREACHABLE */; |
8220 | 0 | abort(); |
8221 | 0 | } |
8222 | 0 | s_n_llhttp__internal__n_invoke_or_flags_13: { |
8223 | 0 | switch (llhttp__internal__c_or_flags_5(state, p, endp)) { |
8224 | 0 | default: |
8225 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_4; |
8226 | 0 | } |
8227 | 0 | /* UNREACHABLE */; |
8228 | 0 | abort(); |
8229 | 0 | } |
8230 | 0 | s_n_llhttp__internal__n_invoke_or_flags_14: { |
8231 | 0 | switch (llhttp__internal__c_or_flags_6(state, p, endp)) { |
8232 | 0 | default: |
8233 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_4; |
8234 | 0 | } |
8235 | 0 | /* UNREACHABLE */; |
8236 | 0 | abort(); |
8237 | 0 | } |
8238 | 0 | s_n_llhttp__internal__n_invoke_or_flags_15: { |
8239 | 0 | switch (llhttp__internal__c_or_flags_7(state, p, endp)) { |
8240 | 0 | default: |
8241 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_4; |
8242 | 0 | } |
8243 | 0 | /* UNREACHABLE */; |
8244 | 0 | abort(); |
8245 | 0 | } |
8246 | 0 | s_n_llhttp__internal__n_invoke_or_flags_16: { |
8247 | 0 | switch (llhttp__internal__c_or_flags_8(state, p, endp)) { |
8248 | 0 | default: |
8249 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
8250 | 0 | } |
8251 | 0 | /* UNREACHABLE */; |
8252 | 0 | abort(); |
8253 | 0 | } |
8254 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_6: { |
8255 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
8256 | 0 | case 5: |
8257 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_13; |
8258 | 0 | case 6: |
8259 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_14; |
8260 | 0 | case 7: |
8261 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_15; |
8262 | 0 | case 8: |
8263 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_16; |
8264 | 0 | default: |
8265 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
8266 | 0 | } |
8267 | 0 | /* UNREACHABLE */; |
8268 | 0 | abort(); |
8269 | 0 | } |
8270 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_5: { |
8271 | 0 | switch (llhttp__internal__c_update_header_state_1(state, p, endp)) { |
8272 | 0 | default: |
8273 | 0 | goto s_n_llhttp__internal__n_header_value_connection_token; |
8274 | 0 | } |
8275 | 0 | /* UNREACHABLE */; |
8276 | 0 | abort(); |
8277 | 0 | } |
8278 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_3: { |
8279 | 0 | switch (llhttp__internal__c_update_header_state_3(state, p, endp)) { |
8280 | 0 | default: |
8281 | 0 | goto s_n_llhttp__internal__n_header_value_connection_ws; |
8282 | 0 | } |
8283 | 0 | /* UNREACHABLE */; |
8284 | 0 | abort(); |
8285 | 0 | } |
8286 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_6: { |
8287 | 0 | switch (llhttp__internal__c_update_header_state_6(state, p, endp)) { |
8288 | 0 | default: |
8289 | 0 | goto s_n_llhttp__internal__n_header_value_connection_ws; |
8290 | 0 | } |
8291 | 0 | /* UNREACHABLE */; |
8292 | 0 | abort(); |
8293 | 0 | } |
8294 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_7: { |
8295 | 0 | switch (llhttp__internal__c_update_header_state_7(state, p, endp)) { |
8296 | 0 | default: |
8297 | 0 | goto s_n_llhttp__internal__n_header_value_connection_ws; |
8298 | 0 | } |
8299 | 0 | /* UNREACHABLE */; |
8300 | 0 | abort(); |
8301 | 0 | } |
8302 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: { |
8303 | 0 | const unsigned char* start; |
8304 | 0 | int err; |
8305 | | |
8306 | 0 | start = state->_span_pos0; |
8307 | 0 | state->_span_pos0 = NULL; |
8308 | 0 | err = llhttp__on_header_value(state, start, p); |
8309 | 0 | if (err != 0) { |
8310 | 0 | state->error = err; |
8311 | 0 | state->error_pos = (const char*) p; |
8312 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_56; |
8313 | 0 | return s_error; |
8314 | 0 | } |
8315 | 0 | goto s_n_llhttp__internal__n_error_56; |
8316 | 0 | /* UNREACHABLE */; |
8317 | 0 | abort(); |
8318 | 0 | } |
8319 | 0 | s_n_llhttp__internal__n_invoke_mul_add_content_length_1: { |
8320 | 0 | switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) { |
8321 | 0 | case 1: |
8322 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6; |
8323 | 0 | default: |
8324 | 0 | goto s_n_llhttp__internal__n_header_value_content_length; |
8325 | 0 | } |
8326 | 0 | /* UNREACHABLE */; |
8327 | 0 | abort(); |
8328 | 0 | } |
8329 | 0 | s_n_llhttp__internal__n_invoke_or_flags_17: { |
8330 | 0 | switch (llhttp__internal__c_or_flags_17(state, p, endp)) { |
8331 | 0 | default: |
8332 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
8333 | 0 | } |
8334 | 0 | /* UNREACHABLE */; |
8335 | 0 | abort(); |
8336 | 0 | } |
8337 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: { |
8338 | 0 | const unsigned char* start; |
8339 | 0 | int err; |
8340 | | |
8341 | 0 | start = state->_span_pos0; |
8342 | 0 | state->_span_pos0 = NULL; |
8343 | 0 | err = llhttp__on_header_value(state, start, p); |
8344 | 0 | if (err != 0) { |
8345 | 0 | state->error = err; |
8346 | 0 | state->error_pos = (const char*) p; |
8347 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_57; |
8348 | 0 | return s_error; |
8349 | 0 | } |
8350 | 0 | goto s_n_llhttp__internal__n_error_57; |
8351 | 0 | /* UNREACHABLE */; |
8352 | 0 | abort(); |
8353 | 0 | } |
8354 | 0 | s_n_llhttp__internal__n_error_55: { |
8355 | 0 | state->error = 0x4; |
8356 | 0 | state->reason = "Duplicate Content-Length"; |
8357 | 0 | state->error_pos = (const char*) p; |
8358 | 0 | state->_current = (void*) (intptr_t) s_error; |
8359 | 0 | return s_error; |
8360 | 0 | /* UNREACHABLE */; |
8361 | 0 | abort(); |
8362 | 0 | } |
8363 | 0 | s_n_llhttp__internal__n_invoke_test_flags_2: { |
8364 | 0 | switch (llhttp__internal__c_test_flags_2(state, p, endp)) { |
8365 | 0 | case 0: |
8366 | 0 | goto s_n_llhttp__internal__n_header_value_content_length; |
8367 | 0 | default: |
8368 | 0 | goto s_n_llhttp__internal__n_error_55; |
8369 | 0 | } |
8370 | 0 | /* UNREACHABLE */; |
8371 | 0 | abort(); |
8372 | 0 | } |
8373 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9: { |
8374 | 0 | const unsigned char* start; |
8375 | 0 | int err; |
8376 | | |
8377 | 0 | start = state->_span_pos0; |
8378 | 0 | state->_span_pos0 = NULL; |
8379 | 0 | err = llhttp__on_header_value(state, start, p); |
8380 | 0 | if (err != 0) { |
8381 | 0 | state->error = err; |
8382 | 0 | state->error_pos = (const char*) (p + 1); |
8383 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_59; |
8384 | 0 | return s_error; |
8385 | 0 | } |
8386 | 0 | p++; |
8387 | 0 | goto s_n_llhttp__internal__n_error_59; |
8388 | 0 | /* UNREACHABLE */; |
8389 | 0 | abort(); |
8390 | 0 | } |
8391 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_8: { |
8392 | 0 | switch (llhttp__internal__c_update_header_state_8(state, p, endp)) { |
8393 | 0 | default: |
8394 | 0 | goto s_n_llhttp__internal__n_header_value_otherwise; |
8395 | 0 | } |
8396 | 0 | /* UNREACHABLE */; |
8397 | 0 | abort(); |
8398 | 0 | } |
8399 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: { |
8400 | 0 | const unsigned char* start; |
8401 | 0 | int err; |
8402 | | |
8403 | 0 | start = state->_span_pos0; |
8404 | 0 | state->_span_pos0 = NULL; |
8405 | 0 | err = llhttp__on_header_value(state, start, p); |
8406 | 0 | if (err != 0) { |
8407 | 0 | state->error = err; |
8408 | 0 | state->error_pos = (const char*) (p + 1); |
8409 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_58; |
8410 | 0 | return s_error; |
8411 | 0 | } |
8412 | 0 | p++; |
8413 | 0 | goto s_n_llhttp__internal__n_error_58; |
8414 | 0 | /* UNREACHABLE */; |
8415 | 0 | abort(); |
8416 | 0 | } |
8417 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_20: { |
8418 | 0 | switch (llhttp__internal__c_test_lenient_flags_20(state, p, endp)) { |
8419 | 0 | case 0: |
8420 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8; |
8421 | 0 | default: |
8422 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked; |
8423 | 0 | } |
8424 | 0 | /* UNREACHABLE */; |
8425 | 0 | abort(); |
8426 | 0 | } |
8427 | 0 | s_n_llhttp__internal__n_invoke_load_type_1: { |
8428 | 0 | switch (llhttp__internal__c_load_type(state, p, endp)) { |
8429 | 0 | case 1: |
8430 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_20; |
8431 | 0 | default: |
8432 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked; |
8433 | 0 | } |
8434 | 0 | /* UNREACHABLE */; |
8435 | 0 | abort(); |
8436 | 0 | } |
8437 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_9: { |
8438 | 0 | switch (llhttp__internal__c_update_header_state_1(state, p, endp)) { |
8439 | 0 | default: |
8440 | 0 | goto s_n_llhttp__internal__n_header_value; |
8441 | 0 | } |
8442 | 0 | /* UNREACHABLE */; |
8443 | 0 | abort(); |
8444 | 0 | } |
8445 | 0 | s_n_llhttp__internal__n_invoke_and_flags: { |
8446 | 0 | switch (llhttp__internal__c_and_flags(state, p, endp)) { |
8447 | 0 | default: |
8448 | 0 | goto s_n_llhttp__internal__n_header_value_te_chunked; |
8449 | 0 | } |
8450 | 0 | /* UNREACHABLE */; |
8451 | 0 | abort(); |
8452 | 0 | } |
8453 | 0 | s_n_llhttp__internal__n_invoke_or_flags_19: { |
8454 | 0 | switch (llhttp__internal__c_or_flags_18(state, p, endp)) { |
8455 | 0 | default: |
8456 | 0 | goto s_n_llhttp__internal__n_invoke_and_flags; |
8457 | 0 | } |
8458 | 0 | /* UNREACHABLE */; |
8459 | 0 | abort(); |
8460 | 0 | } |
8461 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_21: { |
8462 | 0 | switch (llhttp__internal__c_test_lenient_flags_20(state, p, endp)) { |
8463 | 0 | case 0: |
8464 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9; |
8465 | 0 | default: |
8466 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_19; |
8467 | 0 | } |
8468 | 0 | /* UNREACHABLE */; |
8469 | 0 | abort(); |
8470 | 0 | } |
8471 | 0 | s_n_llhttp__internal__n_invoke_load_type_2: { |
8472 | 0 | switch (llhttp__internal__c_load_type(state, p, endp)) { |
8473 | 0 | case 1: |
8474 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_21; |
8475 | 0 | default: |
8476 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_19; |
8477 | 0 | } |
8478 | 0 | /* UNREACHABLE */; |
8479 | 0 | abort(); |
8480 | 0 | } |
8481 | 0 | s_n_llhttp__internal__n_invoke_or_flags_18: { |
8482 | 0 | switch (llhttp__internal__c_or_flags_18(state, p, endp)) { |
8483 | 0 | default: |
8484 | 0 | goto s_n_llhttp__internal__n_invoke_and_flags; |
8485 | 0 | } |
8486 | 0 | /* UNREACHABLE */; |
8487 | 0 | abort(); |
8488 | 0 | } |
8489 | 0 | s_n_llhttp__internal__n_invoke_test_flags_3: { |
8490 | 0 | switch (llhttp__internal__c_test_flags_3(state, p, endp)) { |
8491 | 0 | case 1: |
8492 | 0 | goto s_n_llhttp__internal__n_invoke_load_type_2; |
8493 | 0 | default: |
8494 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_18; |
8495 | 0 | } |
8496 | 0 | /* UNREACHABLE */; |
8497 | 0 | abort(); |
8498 | 0 | } |
8499 | 0 | s_n_llhttp__internal__n_invoke_or_flags_20: { |
8500 | 0 | switch (llhttp__internal__c_or_flags_20(state, p, endp)) { |
8501 | 0 | default: |
8502 | 0 | goto s_n_llhttp__internal__n_invoke_update_header_state_9; |
8503 | 0 | } |
8504 | 0 | /* UNREACHABLE */; |
8505 | 0 | abort(); |
8506 | 0 | } |
8507 | 0 | s_n_llhttp__internal__n_invoke_load_header_state_3: { |
8508 | 0 | switch (llhttp__internal__c_load_header_state(state, p, endp)) { |
8509 | 0 | case 1: |
8510 | 0 | goto s_n_llhttp__internal__n_header_value_connection; |
8511 | 0 | case 2: |
8512 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_2; |
8513 | 0 | case 3: |
8514 | 0 | goto s_n_llhttp__internal__n_invoke_test_flags_3; |
8515 | 0 | case 4: |
8516 | 0 | goto s_n_llhttp__internal__n_invoke_or_flags_20; |
8517 | 0 | default: |
8518 | 0 | goto s_n_llhttp__internal__n_header_value; |
8519 | 0 | } |
8520 | 0 | /* UNREACHABLE */; |
8521 | 0 | abort(); |
8522 | 0 | } |
8523 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_22: { |
8524 | 0 | switch (llhttp__internal__c_test_lenient_flags_22(state, p, endp)) { |
8525 | 0 | case 0: |
8526 | 0 | goto s_n_llhttp__internal__n_error_60; |
8527 | 0 | default: |
8528 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
8529 | 0 | } |
8530 | 0 | /* UNREACHABLE */; |
8531 | 0 | abort(); |
8532 | 0 | } |
8533 | 0 | s_n_llhttp__internal__n_invoke_test_flags_4: { |
8534 | 0 | switch (llhttp__internal__c_test_flags_4(state, p, endp)) { |
8535 | 0 | case 1: |
8536 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_22; |
8537 | 0 | default: |
8538 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
8539 | 0 | } |
8540 | 0 | /* UNREACHABLE */; |
8541 | 0 | abort(); |
8542 | 0 | } |
8543 | 0 | s_n_llhttp__internal__n_error_61: { |
8544 | 0 | state->error = 0xf; |
8545 | 0 | state->reason = "Transfer-Encoding can't be present with Content-Length"; |
8546 | 0 | state->error_pos = (const char*) p; |
8547 | 0 | state->_current = (void*) (intptr_t) s_error; |
8548 | 0 | return s_error; |
8549 | 0 | /* UNREACHABLE */; |
8550 | 0 | abort(); |
8551 | 0 | } |
8552 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_23: { |
8553 | 0 | switch (llhttp__internal__c_test_lenient_flags_22(state, p, endp)) { |
8554 | 0 | case 0: |
8555 | 0 | goto s_n_llhttp__internal__n_error_61; |
8556 | 0 | default: |
8557 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
8558 | 0 | } |
8559 | 0 | /* UNREACHABLE */; |
8560 | 0 | abort(); |
8561 | 0 | } |
8562 | 0 | s_n_llhttp__internal__n_invoke_test_flags_5: { |
8563 | 0 | switch (llhttp__internal__c_test_flags_2(state, p, endp)) { |
8564 | 0 | case 1: |
8565 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_23; |
8566 | 0 | default: |
8567 | 0 | goto s_n_llhttp__internal__n_header_value_discard_ws; |
8568 | 0 | } |
8569 | 0 | /* UNREACHABLE */; |
8570 | 0 | abort(); |
8571 | 0 | } |
8572 | 0 | s_n_llhttp__internal__n_pause_19: { |
8573 | 0 | state->error = 0x15; |
8574 | 0 | state->reason = "on_header_field_complete pause"; |
8575 | 0 | state->error_pos = (const char*) p; |
8576 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_header_state; |
8577 | 0 | return s_error; |
8578 | 0 | /* UNREACHABLE */; |
8579 | 0 | abort(); |
8580 | 0 | } |
8581 | 0 | s_n_llhttp__internal__n_error_45: { |
8582 | 0 | state->error = 0x1c; |
8583 | 0 | state->reason = "`on_header_field_complete` callback error"; |
8584 | 0 | state->error_pos = (const char*) p; |
8585 | 0 | state->_current = (void*) (intptr_t) s_error; |
8586 | 0 | return s_error; |
8587 | 0 | /* UNREACHABLE */; |
8588 | 0 | abort(); |
8589 | 0 | } |
8590 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: { |
8591 | 0 | const unsigned char* start; |
8592 | 0 | int err; |
8593 | | |
8594 | 0 | start = state->_span_pos0; |
8595 | 0 | state->_span_pos0 = NULL; |
8596 | 0 | err = llhttp__on_header_field(state, start, p); |
8597 | 0 | if (err != 0) { |
8598 | 0 | state->error = err; |
8599 | 0 | state->error_pos = (const char*) (p + 1); |
8600 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; |
8601 | 0 | return s_error; |
8602 | 0 | } |
8603 | 0 | p++; |
8604 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; |
8605 | 0 | /* UNREACHABLE */; |
8606 | 0 | abort(); |
8607 | 0 | } |
8608 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2: { |
8609 | 0 | const unsigned char* start; |
8610 | 0 | int err; |
8611 | | |
8612 | 0 | start = state->_span_pos0; |
8613 | 0 | state->_span_pos0 = NULL; |
8614 | 0 | err = llhttp__on_header_field(state, start, p); |
8615 | 0 | if (err != 0) { |
8616 | 0 | state->error = err; |
8617 | 0 | state->error_pos = (const char*) (p + 1); |
8618 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; |
8619 | 0 | return s_error; |
8620 | 0 | } |
8621 | 0 | p++; |
8622 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; |
8623 | 0 | /* UNREACHABLE */; |
8624 | 0 | abort(); |
8625 | 0 | } |
8626 | 0 | s_n_llhttp__internal__n_error_62: { |
8627 | 0 | state->error = 0xa; |
8628 | 0 | state->reason = "Invalid header token"; |
8629 | 0 | state->error_pos = (const char*) p; |
8630 | 0 | state->_current = (void*) (intptr_t) s_error; |
8631 | 0 | return s_error; |
8632 | 0 | /* UNREACHABLE */; |
8633 | 0 | abort(); |
8634 | 0 | } |
8635 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_10: { |
8636 | 0 | switch (llhttp__internal__c_update_header_state_1(state, p, endp)) { |
8637 | 0 | default: |
8638 | 0 | goto s_n_llhttp__internal__n_header_field_general; |
8639 | 0 | } |
8640 | 0 | /* UNREACHABLE */; |
8641 | 0 | abort(); |
8642 | 0 | } |
8643 | 0 | s_n_llhttp__internal__n_invoke_store_header_state: { |
8644 | 0 | switch (llhttp__internal__c_store_header_state(state, p, endp, match)) { |
8645 | 0 | default: |
8646 | 0 | goto s_n_llhttp__internal__n_header_field_colon; |
8647 | 0 | } |
8648 | 0 | /* UNREACHABLE */; |
8649 | 0 | abort(); |
8650 | 0 | } |
8651 | 0 | s_n_llhttp__internal__n_invoke_update_header_state_11: { |
8652 | 0 | switch (llhttp__internal__c_update_header_state_1(state, p, endp)) { |
8653 | 0 | default: |
8654 | 0 | goto s_n_llhttp__internal__n_header_field_general; |
8655 | 0 | } |
8656 | 0 | /* UNREACHABLE */; |
8657 | 0 | abort(); |
8658 | 0 | } |
8659 | 0 | s_n_llhttp__internal__n_error_4: { |
8660 | 0 | state->error = 0x1e; |
8661 | 0 | state->reason = "Unexpected space after start line"; |
8662 | 0 | state->error_pos = (const char*) p; |
8663 | 0 | state->_current = (void*) (intptr_t) s_error; |
8664 | 0 | return s_error; |
8665 | 0 | /* UNREACHABLE */; |
8666 | 0 | abort(); |
8667 | 0 | } |
8668 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags: { |
8669 | 0 | switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { |
8670 | 0 | case 1: |
8671 | 0 | goto s_n_llhttp__internal__n_header_field_start; |
8672 | 0 | default: |
8673 | 0 | goto s_n_llhttp__internal__n_error_4; |
8674 | 0 | } |
8675 | 0 | /* UNREACHABLE */; |
8676 | 0 | abort(); |
8677 | 0 | } |
8678 | 0 | s_n_llhttp__internal__n_pause_20: { |
8679 | 0 | state->error = 0x15; |
8680 | 0 | state->reason = "on_url_complete pause"; |
8681 | 0 | state->error_pos = (const char*) p; |
8682 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_headers_start; |
8683 | 0 | return s_error; |
8684 | 0 | /* UNREACHABLE */; |
8685 | 0 | abort(); |
8686 | 0 | } |
8687 | 0 | s_n_llhttp__internal__n_error_3: { |
8688 | 0 | state->error = 0x1a; |
8689 | 0 | state->reason = "`on_url_complete` callback error"; |
8690 | 0 | state->error_pos = (const char*) p; |
8691 | 0 | state->_current = (void*) (intptr_t) s_error; |
8692 | 0 | return s_error; |
8693 | 0 | /* UNREACHABLE */; |
8694 | 0 | abort(); |
8695 | 0 | } |
8696 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_url_complete: { |
8697 | 0 | switch (llhttp__on_url_complete(state, p, endp)) { |
8698 | 0 | case 0: |
8699 | 0 | goto s_n_llhttp__internal__n_headers_start; |
8700 | 0 | case 21: |
8701 | 0 | goto s_n_llhttp__internal__n_pause_20; |
8702 | 0 | default: |
8703 | 0 | goto s_n_llhttp__internal__n_error_3; |
8704 | 0 | } |
8705 | 0 | /* UNREACHABLE */; |
8706 | 0 | abort(); |
8707 | 0 | } |
8708 | 0 | s_n_llhttp__internal__n_invoke_update_http_minor: { |
8709 | 0 | switch (llhttp__internal__c_update_http_minor(state, p, endp)) { |
8710 | 0 | default: |
8711 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete; |
8712 | 0 | } |
8713 | 0 | /* UNREACHABLE */; |
8714 | 0 | abort(); |
8715 | 0 | } |
8716 | 0 | s_n_llhttp__internal__n_invoke_update_http_major: { |
8717 | 0 | switch (llhttp__internal__c_update_http_major(state, p, endp)) { |
8718 | 0 | default: |
8719 | 0 | goto s_n_llhttp__internal__n_invoke_update_http_minor; |
8720 | 0 | } |
8721 | 0 | /* UNREACHABLE */; |
8722 | 0 | abort(); |
8723 | 0 | } |
8724 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_3: { |
8725 | 0 | const unsigned char* start; |
8726 | 0 | int err; |
8727 | | |
8728 | 0 | start = state->_span_pos0; |
8729 | 0 | state->_span_pos0 = NULL; |
8730 | 0 | err = llhttp__on_url(state, start, p); |
8731 | 0 | if (err != 0) { |
8732 | 0 | state->error = err; |
8733 | 0 | state->error_pos = (const char*) p; |
8734 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09; |
8735 | 0 | return s_error; |
8736 | 0 | } |
8737 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http09; |
8738 | 0 | /* UNREACHABLE */; |
8739 | 0 | abort(); |
8740 | 0 | } |
8741 | 0 | s_n_llhttp__internal__n_error_63: { |
8742 | 0 | state->error = 0x7; |
8743 | 0 | state->reason = "Expected CRLF"; |
8744 | 0 | state->error_pos = (const char*) p; |
8745 | 0 | state->_current = (void*) (intptr_t) s_error; |
8746 | 0 | return s_error; |
8747 | 0 | /* UNREACHABLE */; |
8748 | 0 | abort(); |
8749 | 0 | } |
8750 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_4: { |
8751 | 0 | const unsigned char* start; |
8752 | 0 | int err; |
8753 | | |
8754 | 0 | start = state->_span_pos0; |
8755 | 0 | state->_span_pos0 = NULL; |
8756 | 0 | err = llhttp__on_url(state, start, p); |
8757 | 0 | if (err != 0) { |
8758 | 0 | state->error = err; |
8759 | 0 | state->error_pos = (const char*) p; |
8760 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09; |
8761 | 0 | return s_error; |
8762 | 0 | } |
8763 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09; |
8764 | 0 | /* UNREACHABLE */; |
8765 | 0 | abort(); |
8766 | 0 | } |
8767 | 0 | s_n_llhttp__internal__n_error_71: { |
8768 | 0 | state->error = 0x17; |
8769 | 0 | state->reason = "Pause on PRI/Upgrade"; |
8770 | 0 | state->error_pos = (const char*) p; |
8771 | 0 | state->_current = (void*) (intptr_t) s_error; |
8772 | 0 | return s_error; |
8773 | 0 | /* UNREACHABLE */; |
8774 | 0 | abort(); |
8775 | 0 | } |
8776 | 0 | s_n_llhttp__internal__n_error_72: { |
8777 | 0 | state->error = 0x9; |
8778 | 0 | state->reason = "Expected HTTP/2 Connection Preface"; |
8779 | 0 | state->error_pos = (const char*) p; |
8780 | 0 | state->_current = (void*) (intptr_t) s_error; |
8781 | 0 | return s_error; |
8782 | 0 | /* UNREACHABLE */; |
8783 | 0 | abort(); |
8784 | 0 | } |
8785 | 0 | s_n_llhttp__internal__n_error_69: { |
8786 | 0 | state->error = 0x2; |
8787 | 0 | state->reason = "Expected CRLF after version"; |
8788 | 0 | state->error_pos = (const char*) p; |
8789 | 0 | state->_current = (void*) (intptr_t) s_error; |
8790 | 0 | return s_error; |
8791 | 0 | /* UNREACHABLE */; |
8792 | 0 | abort(); |
8793 | 0 | } |
8794 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_26: { |
8795 | 0 | switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { |
8796 | 0 | case 1: |
8797 | 0 | goto s_n_llhttp__internal__n_headers_start; |
8798 | 0 | default: |
8799 | 0 | goto s_n_llhttp__internal__n_error_69; |
8800 | 0 | } |
8801 | 0 | /* UNREACHABLE */; |
8802 | 0 | abort(); |
8803 | 0 | } |
8804 | 0 | s_n_llhttp__internal__n_error_68: { |
8805 | 0 | state->error = 0x9; |
8806 | 0 | state->reason = "Expected CRLF after version"; |
8807 | 0 | state->error_pos = (const char*) p; |
8808 | 0 | state->_current = (void*) (intptr_t) s_error; |
8809 | 0 | return s_error; |
8810 | 0 | /* UNREACHABLE */; |
8811 | 0 | abort(); |
8812 | 0 | } |
8813 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_25: { |
8814 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
8815 | 0 | case 1: |
8816 | 0 | goto s_n_llhttp__internal__n_req_http_complete_crlf; |
8817 | 0 | default: |
8818 | 0 | goto s_n_llhttp__internal__n_error_68; |
8819 | 0 | } |
8820 | 0 | /* UNREACHABLE */; |
8821 | 0 | abort(); |
8822 | 0 | } |
8823 | 0 | s_n_llhttp__internal__n_error_70: { |
8824 | 0 | state->error = 0x9; |
8825 | 0 | state->reason = "Expected CRLF after version"; |
8826 | 0 | state->error_pos = (const char*) p; |
8827 | 0 | state->_current = (void*) (intptr_t) s_error; |
8828 | 0 | return s_error; |
8829 | 0 | /* UNREACHABLE */; |
8830 | 0 | abort(); |
8831 | 0 | } |
8832 | 0 | s_n_llhttp__internal__n_pause_21: { |
8833 | 0 | state->error = 0x15; |
8834 | 0 | state->reason = "on_version_complete pause"; |
8835 | 0 | state->error_pos = (const char*) p; |
8836 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_method_1; |
8837 | 0 | return s_error; |
8838 | 0 | /* UNREACHABLE */; |
8839 | 0 | abort(); |
8840 | 0 | } |
8841 | 0 | s_n_llhttp__internal__n_error_67: { |
8842 | 0 | state->error = 0x21; |
8843 | 0 | state->reason = "`on_version_complete` callback error"; |
8844 | 0 | state->error_pos = (const char*) p; |
8845 | 0 | state->_current = (void*) (intptr_t) s_error; |
8846 | 0 | return s_error; |
8847 | 0 | /* UNREACHABLE */; |
8848 | 0 | abort(); |
8849 | 0 | } |
8850 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_1: { |
8851 | 0 | const unsigned char* start; |
8852 | 0 | int err; |
8853 | | |
8854 | 0 | start = state->_span_pos0; |
8855 | 0 | state->_span_pos0 = NULL; |
8856 | 0 | err = llhttp__on_version(state, start, p); |
8857 | 0 | if (err != 0) { |
8858 | 0 | state->error = err; |
8859 | 0 | state->error_pos = (const char*) p; |
8860 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_version_complete; |
8861 | 0 | return s_error; |
8862 | 0 | } |
8863 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_version_complete; |
8864 | 0 | /* UNREACHABLE */; |
8865 | 0 | abort(); |
8866 | 0 | } |
8867 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version: { |
8868 | 0 | const unsigned char* start; |
8869 | 0 | int err; |
8870 | | |
8871 | 0 | start = state->_span_pos0; |
8872 | 0 | state->_span_pos0 = NULL; |
8873 | 0 | err = llhttp__on_version(state, start, p); |
8874 | 0 | if (err != 0) { |
8875 | 0 | state->error = err; |
8876 | 0 | state->error_pos = (const char*) p; |
8877 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_66; |
8878 | 0 | return s_error; |
8879 | 0 | } |
8880 | 0 | goto s_n_llhttp__internal__n_error_66; |
8881 | 0 | /* UNREACHABLE */; |
8882 | 0 | abort(); |
8883 | 0 | } |
8884 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor: { |
8885 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
8886 | 0 | case 9: |
8887 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; |
8888 | 0 | default: |
8889 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version; |
8890 | 0 | } |
8891 | 0 | /* UNREACHABLE */; |
8892 | 0 | abort(); |
8893 | 0 | } |
8894 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor_1: { |
8895 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
8896 | 0 | case 0: |
8897 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; |
8898 | 0 | case 1: |
8899 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; |
8900 | 0 | default: |
8901 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version; |
8902 | 0 | } |
8903 | 0 | /* UNREACHABLE */; |
8904 | 0 | abort(); |
8905 | 0 | } |
8906 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor_2: { |
8907 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
8908 | 0 | case 0: |
8909 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; |
8910 | 0 | default: |
8911 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version; |
8912 | 0 | } |
8913 | 0 | /* UNREACHABLE */; |
8914 | 0 | abort(); |
8915 | 0 | } |
8916 | 0 | s_n_llhttp__internal__n_invoke_load_http_major: { |
8917 | 0 | switch (llhttp__internal__c_load_http_major(state, p, endp)) { |
8918 | 0 | case 0: |
8919 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor; |
8920 | 0 | case 1: |
8921 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor_1; |
8922 | 0 | case 2: |
8923 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor_2; |
8924 | 0 | default: |
8925 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version; |
8926 | 0 | } |
8927 | 0 | /* UNREACHABLE */; |
8928 | 0 | abort(); |
8929 | 0 | } |
8930 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_24: { |
8931 | 0 | switch (llhttp__internal__c_test_lenient_flags_24(state, p, endp)) { |
8932 | 0 | case 1: |
8933 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; |
8934 | 0 | default: |
8935 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_major; |
8936 | 0 | } |
8937 | 0 | /* UNREACHABLE */; |
8938 | 0 | abort(); |
8939 | 0 | } |
8940 | 0 | s_n_llhttp__internal__n_invoke_store_http_minor: { |
8941 | 0 | switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) { |
8942 | 0 | default: |
8943 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_24; |
8944 | 0 | } |
8945 | 0 | /* UNREACHABLE */; |
8946 | 0 | abort(); |
8947 | 0 | } |
8948 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_2: { |
8949 | 0 | const unsigned char* start; |
8950 | 0 | int err; |
8951 | | |
8952 | 0 | start = state->_span_pos0; |
8953 | 0 | state->_span_pos0 = NULL; |
8954 | 0 | err = llhttp__on_version(state, start, p); |
8955 | 0 | if (err != 0) { |
8956 | 0 | state->error = err; |
8957 | 0 | state->error_pos = (const char*) p; |
8958 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_73; |
8959 | 0 | return s_error; |
8960 | 0 | } |
8961 | 0 | goto s_n_llhttp__internal__n_error_73; |
8962 | 0 | /* UNREACHABLE */; |
8963 | 0 | abort(); |
8964 | 0 | } |
8965 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_3: { |
8966 | 0 | const unsigned char* start; |
8967 | 0 | int err; |
8968 | | |
8969 | 0 | start = state->_span_pos0; |
8970 | 0 | state->_span_pos0 = NULL; |
8971 | 0 | err = llhttp__on_version(state, start, p); |
8972 | 0 | if (err != 0) { |
8973 | 0 | state->error = err; |
8974 | 0 | state->error_pos = (const char*) p; |
8975 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_74; |
8976 | 0 | return s_error; |
8977 | 0 | } |
8978 | 0 | goto s_n_llhttp__internal__n_error_74; |
8979 | 0 | /* UNREACHABLE */; |
8980 | 0 | abort(); |
8981 | 0 | } |
8982 | 0 | s_n_llhttp__internal__n_invoke_store_http_major: { |
8983 | 0 | switch (llhttp__internal__c_store_http_major(state, p, endp, match)) { |
8984 | 0 | default: |
8985 | 0 | goto s_n_llhttp__internal__n_req_http_dot; |
8986 | 0 | } |
8987 | 0 | /* UNREACHABLE */; |
8988 | 0 | abort(); |
8989 | 0 | } |
8990 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_4: { |
8991 | 0 | const unsigned char* start; |
8992 | 0 | int err; |
8993 | | |
8994 | 0 | start = state->_span_pos0; |
8995 | 0 | state->_span_pos0 = NULL; |
8996 | 0 | err = llhttp__on_version(state, start, p); |
8997 | 0 | if (err != 0) { |
8998 | 0 | state->error = err; |
8999 | 0 | state->error_pos = (const char*) p; |
9000 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_75; |
9001 | 0 | return s_error; |
9002 | 0 | } |
9003 | 0 | goto s_n_llhttp__internal__n_error_75; |
9004 | 0 | /* UNREACHABLE */; |
9005 | 0 | abort(); |
9006 | 0 | } |
9007 | 0 | s_n_llhttp__internal__n_error_65: { |
9008 | 0 | state->error = 0x8; |
9009 | 0 | state->reason = "Invalid method for HTTP/x.x request"; |
9010 | 0 | state->error_pos = (const char*) p; |
9011 | 0 | state->_current = (void*) (intptr_t) s_error; |
9012 | 0 | return s_error; |
9013 | 0 | /* UNREACHABLE */; |
9014 | 0 | abort(); |
9015 | 0 | } |
9016 | 0 | s_n_llhttp__internal__n_invoke_load_method: { |
9017 | 0 | switch (llhttp__internal__c_load_method(state, p, endp)) { |
9018 | 0 | case 0: |
9019 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9020 | 0 | case 1: |
9021 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9022 | 0 | case 2: |
9023 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9024 | 0 | case 3: |
9025 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9026 | 0 | case 4: |
9027 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9028 | 0 | case 5: |
9029 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9030 | 0 | case 6: |
9031 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9032 | 0 | case 7: |
9033 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9034 | 0 | case 8: |
9035 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9036 | 0 | case 9: |
9037 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9038 | 0 | case 10: |
9039 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9040 | 0 | case 11: |
9041 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9042 | 0 | case 12: |
9043 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9044 | 0 | case 13: |
9045 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9046 | 0 | case 14: |
9047 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9048 | 0 | case 15: |
9049 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9050 | 0 | case 16: |
9051 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9052 | 0 | case 17: |
9053 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9054 | 0 | case 18: |
9055 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9056 | 0 | case 19: |
9057 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9058 | 0 | case 20: |
9059 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9060 | 0 | case 21: |
9061 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9062 | 0 | case 22: |
9063 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9064 | 0 | case 23: |
9065 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9066 | 0 | case 24: |
9067 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9068 | 0 | case 25: |
9069 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9070 | 0 | case 26: |
9071 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9072 | 0 | case 27: |
9073 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9074 | 0 | case 28: |
9075 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9076 | 0 | case 29: |
9077 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9078 | 0 | case 30: |
9079 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9080 | 0 | case 31: |
9081 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9082 | 0 | case 32: |
9083 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9084 | 0 | case 33: |
9085 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9086 | 0 | case 34: |
9087 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9088 | 0 | case 46: |
9089 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9090 | 0 | default: |
9091 | 0 | goto s_n_llhttp__internal__n_error_65; |
9092 | 0 | } |
9093 | 0 | /* UNREACHABLE */; |
9094 | 0 | abort(); |
9095 | 0 | } |
9096 | 0 | s_n_llhttp__internal__n_error_78: { |
9097 | 0 | state->error = 0x8; |
9098 | 0 | state->reason = "Expected HTTP/"; |
9099 | 0 | state->error_pos = (const char*) p; |
9100 | 0 | state->_current = (void*) (intptr_t) s_error; |
9101 | 0 | return s_error; |
9102 | 0 | /* UNREACHABLE */; |
9103 | 0 | abort(); |
9104 | 0 | } |
9105 | 0 | s_n_llhttp__internal__n_error_76: { |
9106 | 0 | state->error = 0x8; |
9107 | 0 | state->reason = "Expected SOURCE method for ICE/x.x request"; |
9108 | 0 | state->error_pos = (const char*) p; |
9109 | 0 | state->_current = (void*) (intptr_t) s_error; |
9110 | 0 | return s_error; |
9111 | 0 | /* UNREACHABLE */; |
9112 | 0 | abort(); |
9113 | 0 | } |
9114 | 0 | s_n_llhttp__internal__n_invoke_load_method_2: { |
9115 | 0 | switch (llhttp__internal__c_load_method(state, p, endp)) { |
9116 | 0 | case 33: |
9117 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9118 | 0 | default: |
9119 | 0 | goto s_n_llhttp__internal__n_error_76; |
9120 | 0 | } |
9121 | 0 | /* UNREACHABLE */; |
9122 | 0 | abort(); |
9123 | 0 | } |
9124 | 0 | s_n_llhttp__internal__n_error_77: { |
9125 | 0 | state->error = 0x8; |
9126 | 0 | state->reason = "Invalid method for RTSP/x.x request"; |
9127 | 0 | state->error_pos = (const char*) p; |
9128 | 0 | state->_current = (void*) (intptr_t) s_error; |
9129 | 0 | return s_error; |
9130 | 0 | /* UNREACHABLE */; |
9131 | 0 | abort(); |
9132 | 0 | } |
9133 | 0 | s_n_llhttp__internal__n_invoke_load_method_3: { |
9134 | 0 | switch (llhttp__internal__c_load_method(state, p, endp)) { |
9135 | 0 | case 1: |
9136 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9137 | 0 | case 3: |
9138 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9139 | 0 | case 6: |
9140 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9141 | 0 | case 35: |
9142 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9143 | 0 | case 36: |
9144 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9145 | 0 | case 37: |
9146 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9147 | 0 | case 38: |
9148 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9149 | 0 | case 39: |
9150 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9151 | 0 | case 40: |
9152 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9153 | 0 | case 41: |
9154 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9155 | 0 | case 42: |
9156 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9157 | 0 | case 43: |
9158 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9159 | 0 | case 44: |
9160 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9161 | 0 | case 45: |
9162 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_version; |
9163 | 0 | default: |
9164 | 0 | goto s_n_llhttp__internal__n_error_77; |
9165 | 0 | } |
9166 | 0 | /* UNREACHABLE */; |
9167 | 0 | abort(); |
9168 | 0 | } |
9169 | 0 | s_n_llhttp__internal__n_pause_22: { |
9170 | 0 | state->error = 0x15; |
9171 | 0 | state->reason = "on_url_complete pause"; |
9172 | 0 | state->error_pos = (const char*) p; |
9173 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_http_start; |
9174 | 0 | return s_error; |
9175 | 0 | /* UNREACHABLE */; |
9176 | 0 | abort(); |
9177 | 0 | } |
9178 | 0 | s_n_llhttp__internal__n_error_64: { |
9179 | 0 | state->error = 0x1a; |
9180 | 0 | state->reason = "`on_url_complete` callback error"; |
9181 | 0 | state->error_pos = (const char*) p; |
9182 | 0 | state->_current = (void*) (intptr_t) s_error; |
9183 | 0 | return s_error; |
9184 | 0 | /* UNREACHABLE */; |
9185 | 0 | abort(); |
9186 | 0 | } |
9187 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1: { |
9188 | 0 | switch (llhttp__on_url_complete(state, p, endp)) { |
9189 | 0 | case 0: |
9190 | 0 | goto s_n_llhttp__internal__n_req_http_start; |
9191 | 0 | case 21: |
9192 | 0 | goto s_n_llhttp__internal__n_pause_22; |
9193 | 0 | default: |
9194 | 0 | goto s_n_llhttp__internal__n_error_64; |
9195 | 0 | } |
9196 | 0 | /* UNREACHABLE */; |
9197 | 0 | abort(); |
9198 | 0 | } |
9199 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_5: { |
9200 | 0 | const unsigned char* start; |
9201 | 0 | int err; |
9202 | | |
9203 | 0 | start = state->_span_pos0; |
9204 | 0 | state->_span_pos0 = NULL; |
9205 | 0 | err = llhttp__on_url(state, start, p); |
9206 | 0 | if (err != 0) { |
9207 | 0 | state->error = err; |
9208 | 0 | state->error_pos = (const char*) p; |
9209 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http; |
9210 | 0 | return s_error; |
9211 | 0 | } |
9212 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http; |
9213 | 0 | /* UNREACHABLE */; |
9214 | 0 | abort(); |
9215 | 0 | } |
9216 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_6: { |
9217 | 0 | const unsigned char* start; |
9218 | 0 | int err; |
9219 | | |
9220 | 0 | start = state->_span_pos0; |
9221 | 0 | state->_span_pos0 = NULL; |
9222 | 0 | err = llhttp__on_url(state, start, p); |
9223 | 0 | if (err != 0) { |
9224 | 0 | state->error = err; |
9225 | 0 | state->error_pos = (const char*) p; |
9226 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09; |
9227 | 0 | return s_error; |
9228 | 0 | } |
9229 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http09; |
9230 | 0 | /* UNREACHABLE */; |
9231 | 0 | abort(); |
9232 | 0 | } |
9233 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_7: { |
9234 | 0 | const unsigned char* start; |
9235 | 0 | int err; |
9236 | | |
9237 | 0 | start = state->_span_pos0; |
9238 | 0 | state->_span_pos0 = NULL; |
9239 | 0 | err = llhttp__on_url(state, start, p); |
9240 | 0 | if (err != 0) { |
9241 | 0 | state->error = err; |
9242 | 0 | state->error_pos = (const char*) p; |
9243 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9244 | 0 | return s_error; |
9245 | 0 | } |
9246 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9247 | 0 | /* UNREACHABLE */; |
9248 | 0 | abort(); |
9249 | 0 | } |
9250 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_8: { |
9251 | 0 | const unsigned char* start; |
9252 | 0 | int err; |
9253 | | |
9254 | 0 | start = state->_span_pos0; |
9255 | 0 | state->_span_pos0 = NULL; |
9256 | 0 | err = llhttp__on_url(state, start, p); |
9257 | 0 | if (err != 0) { |
9258 | 0 | state->error = err; |
9259 | 0 | state->error_pos = (const char*) p; |
9260 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http; |
9261 | 0 | return s_error; |
9262 | 0 | } |
9263 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http; |
9264 | 0 | /* UNREACHABLE */; |
9265 | 0 | abort(); |
9266 | 0 | } |
9267 | 0 | s_n_llhttp__internal__n_error_79: { |
9268 | 0 | state->error = 0x7; |
9269 | 0 | state->reason = "Invalid char in url fragment start"; |
9270 | 0 | state->error_pos = (const char*) p; |
9271 | 0 | state->_current = (void*) (intptr_t) s_error; |
9272 | 0 | return s_error; |
9273 | 0 | /* UNREACHABLE */; |
9274 | 0 | abort(); |
9275 | 0 | } |
9276 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_9: { |
9277 | 0 | const unsigned char* start; |
9278 | 0 | int err; |
9279 | | |
9280 | 0 | start = state->_span_pos0; |
9281 | 0 | state->_span_pos0 = NULL; |
9282 | 0 | err = llhttp__on_url(state, start, p); |
9283 | 0 | if (err != 0) { |
9284 | 0 | state->error = err; |
9285 | 0 | state->error_pos = (const char*) p; |
9286 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09; |
9287 | 0 | return s_error; |
9288 | 0 | } |
9289 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http09; |
9290 | 0 | /* UNREACHABLE */; |
9291 | 0 | abort(); |
9292 | 0 | } |
9293 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_10: { |
9294 | 0 | const unsigned char* start; |
9295 | 0 | int err; |
9296 | | |
9297 | 0 | start = state->_span_pos0; |
9298 | 0 | state->_span_pos0 = NULL; |
9299 | 0 | err = llhttp__on_url(state, start, p); |
9300 | 0 | if (err != 0) { |
9301 | 0 | state->error = err; |
9302 | 0 | state->error_pos = (const char*) p; |
9303 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9304 | 0 | return s_error; |
9305 | 0 | } |
9306 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9307 | 0 | /* UNREACHABLE */; |
9308 | 0 | abort(); |
9309 | 0 | } |
9310 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_11: { |
9311 | 0 | const unsigned char* start; |
9312 | 0 | int err; |
9313 | | |
9314 | 0 | start = state->_span_pos0; |
9315 | 0 | state->_span_pos0 = NULL; |
9316 | 0 | err = llhttp__on_url(state, start, p); |
9317 | 0 | if (err != 0) { |
9318 | 0 | state->error = err; |
9319 | 0 | state->error_pos = (const char*) p; |
9320 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http; |
9321 | 0 | return s_error; |
9322 | 0 | } |
9323 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http; |
9324 | 0 | /* UNREACHABLE */; |
9325 | 0 | abort(); |
9326 | 0 | } |
9327 | 0 | s_n_llhttp__internal__n_error_80: { |
9328 | 0 | state->error = 0x7; |
9329 | 0 | state->reason = "Invalid char in url query"; |
9330 | 0 | state->error_pos = (const char*) p; |
9331 | 0 | state->_current = (void*) (intptr_t) s_error; |
9332 | 0 | return s_error; |
9333 | 0 | /* UNREACHABLE */; |
9334 | 0 | abort(); |
9335 | 0 | } |
9336 | 0 | s_n_llhttp__internal__n_error_81: { |
9337 | 0 | state->error = 0x7; |
9338 | 0 | state->reason = "Invalid char in url path"; |
9339 | 0 | state->error_pos = (const char*) p; |
9340 | 0 | state->_current = (void*) (intptr_t) s_error; |
9341 | 0 | return s_error; |
9342 | 0 | /* UNREACHABLE */; |
9343 | 0 | abort(); |
9344 | 0 | } |
9345 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url: { |
9346 | 0 | const unsigned char* start; |
9347 | 0 | int err; |
9348 | | |
9349 | 0 | start = state->_span_pos0; |
9350 | 0 | state->_span_pos0 = NULL; |
9351 | 0 | err = llhttp__on_url(state, start, p); |
9352 | 0 | if (err != 0) { |
9353 | 0 | state->error = err; |
9354 | 0 | state->error_pos = (const char*) p; |
9355 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09; |
9356 | 0 | return s_error; |
9357 | 0 | } |
9358 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http09; |
9359 | 0 | /* UNREACHABLE */; |
9360 | 0 | abort(); |
9361 | 0 | } |
9362 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_1: { |
9363 | 0 | const unsigned char* start; |
9364 | 0 | int err; |
9365 | | |
9366 | 0 | start = state->_span_pos0; |
9367 | 0 | state->_span_pos0 = NULL; |
9368 | 0 | err = llhttp__on_url(state, start, p); |
9369 | 0 | if (err != 0) { |
9370 | 0 | state->error = err; |
9371 | 0 | state->error_pos = (const char*) p; |
9372 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9373 | 0 | return s_error; |
9374 | 0 | } |
9375 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9376 | 0 | /* UNREACHABLE */; |
9377 | 0 | abort(); |
9378 | 0 | } |
9379 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_2: { |
9380 | 0 | const unsigned char* start; |
9381 | 0 | int err; |
9382 | | |
9383 | 0 | start = state->_span_pos0; |
9384 | 0 | state->_span_pos0 = NULL; |
9385 | 0 | err = llhttp__on_url(state, start, p); |
9386 | 0 | if (err != 0) { |
9387 | 0 | state->error = err; |
9388 | 0 | state->error_pos = (const char*) p; |
9389 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http; |
9390 | 0 | return s_error; |
9391 | 0 | } |
9392 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http; |
9393 | 0 | /* UNREACHABLE */; |
9394 | 0 | abort(); |
9395 | 0 | } |
9396 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_12: { |
9397 | 0 | const unsigned char* start; |
9398 | 0 | int err; |
9399 | | |
9400 | 0 | start = state->_span_pos0; |
9401 | 0 | state->_span_pos0 = NULL; |
9402 | 0 | err = llhttp__on_url(state, start, p); |
9403 | 0 | if (err != 0) { |
9404 | 0 | state->error = err; |
9405 | 0 | state->error_pos = (const char*) p; |
9406 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09; |
9407 | 0 | return s_error; |
9408 | 0 | } |
9409 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http09; |
9410 | 0 | /* UNREACHABLE */; |
9411 | 0 | abort(); |
9412 | 0 | } |
9413 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_13: { |
9414 | 0 | const unsigned char* start; |
9415 | 0 | int err; |
9416 | | |
9417 | 0 | start = state->_span_pos0; |
9418 | 0 | state->_span_pos0 = NULL; |
9419 | 0 | err = llhttp__on_url(state, start, p); |
9420 | 0 | if (err != 0) { |
9421 | 0 | state->error = err; |
9422 | 0 | state->error_pos = (const char*) p; |
9423 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9424 | 0 | return s_error; |
9425 | 0 | } |
9426 | 0 | goto s_n_llhttp__internal__n_url_skip_lf_to_http09; |
9427 | 0 | /* UNREACHABLE */; |
9428 | 0 | abort(); |
9429 | 0 | } |
9430 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_url_14: { |
9431 | 0 | const unsigned char* start; |
9432 | 0 | int err; |
9433 | | |
9434 | 0 | start = state->_span_pos0; |
9435 | 0 | state->_span_pos0 = NULL; |
9436 | 0 | err = llhttp__on_url(state, start, p); |
9437 | 0 | if (err != 0) { |
9438 | 0 | state->error = err; |
9439 | 0 | state->error_pos = (const char*) p; |
9440 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http; |
9441 | 0 | return s_error; |
9442 | 0 | } |
9443 | 0 | goto s_n_llhttp__internal__n_url_skip_to_http; |
9444 | 0 | /* UNREACHABLE */; |
9445 | 0 | abort(); |
9446 | 0 | } |
9447 | 0 | s_n_llhttp__internal__n_error_82: { |
9448 | 0 | state->error = 0x7; |
9449 | 0 | state->reason = "Double @ in url"; |
9450 | 0 | state->error_pos = (const char*) p; |
9451 | 0 | state->_current = (void*) (intptr_t) s_error; |
9452 | 0 | return s_error; |
9453 | 0 | /* UNREACHABLE */; |
9454 | 0 | abort(); |
9455 | 0 | } |
9456 | 0 | s_n_llhttp__internal__n_error_83: { |
9457 | 0 | state->error = 0x7; |
9458 | 0 | state->reason = "Unexpected char in url server"; |
9459 | 0 | state->error_pos = (const char*) p; |
9460 | 0 | state->_current = (void*) (intptr_t) s_error; |
9461 | 0 | return s_error; |
9462 | 0 | /* UNREACHABLE */; |
9463 | 0 | abort(); |
9464 | 0 | } |
9465 | 0 | s_n_llhttp__internal__n_error_84: { |
9466 | 0 | state->error = 0x7; |
9467 | 0 | state->reason = "Unexpected char in url server"; |
9468 | 0 | state->error_pos = (const char*) p; |
9469 | 0 | state->_current = (void*) (intptr_t) s_error; |
9470 | 0 | return s_error; |
9471 | 0 | /* UNREACHABLE */; |
9472 | 0 | abort(); |
9473 | 0 | } |
9474 | 0 | s_n_llhttp__internal__n_error_85: { |
9475 | 0 | state->error = 0x7; |
9476 | 0 | state->reason = "Unexpected char in url schema"; |
9477 | 0 | state->error_pos = (const char*) p; |
9478 | 0 | state->_current = (void*) (intptr_t) s_error; |
9479 | 0 | return s_error; |
9480 | 0 | /* UNREACHABLE */; |
9481 | 0 | abort(); |
9482 | 0 | } |
9483 | 0 | s_n_llhttp__internal__n_error_86: { |
9484 | 0 | state->error = 0x7; |
9485 | 0 | state->reason = "Unexpected char in url schema"; |
9486 | 0 | state->error_pos = (const char*) p; |
9487 | 0 | state->_current = (void*) (intptr_t) s_error; |
9488 | 0 | return s_error; |
9489 | 0 | /* UNREACHABLE */; |
9490 | 0 | abort(); |
9491 | 0 | } |
9492 | 0 | s_n_llhttp__internal__n_error_87: { |
9493 | 0 | state->error = 0x7; |
9494 | 0 | state->reason = "Unexpected start char in url"; |
9495 | 0 | state->error_pos = (const char*) p; |
9496 | 0 | state->_current = (void*) (intptr_t) s_error; |
9497 | 0 | return s_error; |
9498 | 0 | /* UNREACHABLE */; |
9499 | 0 | abort(); |
9500 | 0 | } |
9501 | 0 | s_n_llhttp__internal__n_invoke_is_equal_method: { |
9502 | 0 | switch (llhttp__internal__c_is_equal_method(state, p, endp)) { |
9503 | 0 | case 0: |
9504 | 0 | goto s_n_llhttp__internal__n_url_entry_normal; |
9505 | 0 | default: |
9506 | 0 | goto s_n_llhttp__internal__n_url_entry_connect; |
9507 | 0 | } |
9508 | 0 | /* UNREACHABLE */; |
9509 | 0 | abort(); |
9510 | 0 | } |
9511 | 0 | s_n_llhttp__internal__n_error_88: { |
9512 | 0 | state->error = 0x6; |
9513 | 0 | state->reason = "Expected space after method"; |
9514 | 0 | state->error_pos = (const char*) p; |
9515 | 0 | state->_current = (void*) (intptr_t) s_error; |
9516 | 0 | return s_error; |
9517 | 0 | /* UNREACHABLE */; |
9518 | 0 | abort(); |
9519 | 0 | } |
9520 | 0 | s_n_llhttp__internal__n_pause_26: { |
9521 | 0 | state->error = 0x15; |
9522 | 0 | state->reason = "on_method_complete pause"; |
9523 | 0 | state->error_pos = (const char*) p; |
9524 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_first_space_before_url; |
9525 | 0 | return s_error; |
9526 | 0 | /* UNREACHABLE */; |
9527 | 0 | abort(); |
9528 | 0 | } |
9529 | 0 | s_n_llhttp__internal__n_error_107: { |
9530 | 0 | state->error = 0x20; |
9531 | 0 | state->reason = "`on_method_complete` callback error"; |
9532 | 0 | state->error_pos = (const char*) p; |
9533 | 0 | state->_current = (void*) (intptr_t) s_error; |
9534 | 0 | return s_error; |
9535 | 0 | /* UNREACHABLE */; |
9536 | 0 | abort(); |
9537 | 0 | } |
9538 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_method_2: { |
9539 | 0 | const unsigned char* start; |
9540 | 0 | int err; |
9541 | | |
9542 | 0 | start = state->_span_pos0; |
9543 | 0 | state->_span_pos0 = NULL; |
9544 | 0 | err = llhttp__on_method(state, start, p); |
9545 | 0 | if (err != 0) { |
9546 | 0 | state->error = err; |
9547 | 0 | state->error_pos = (const char*) p; |
9548 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1; |
9549 | 0 | return s_error; |
9550 | 0 | } |
9551 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1; |
9552 | 0 | /* UNREACHABLE */; |
9553 | 0 | abort(); |
9554 | 0 | } |
9555 | 0 | s_n_llhttp__internal__n_invoke_store_method_1: { |
9556 | 0 | switch (llhttp__internal__c_store_method(state, p, endp, match)) { |
9557 | 0 | default: |
9558 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_method_2; |
9559 | 0 | } |
9560 | 0 | /* UNREACHABLE */; |
9561 | 0 | abort(); |
9562 | 0 | } |
9563 | 0 | s_n_llhttp__internal__n_error_108: { |
9564 | 0 | state->error = 0x6; |
9565 | 0 | state->reason = "Invalid method encountered"; |
9566 | 0 | state->error_pos = (const char*) p; |
9567 | 0 | state->_current = (void*) (intptr_t) s_error; |
9568 | 0 | return s_error; |
9569 | 0 | /* UNREACHABLE */; |
9570 | 0 | abort(); |
9571 | 0 | } |
9572 | 0 | s_n_llhttp__internal__n_error_100: { |
9573 | 0 | state->error = 0xd; |
9574 | 0 | state->reason = "Invalid status code"; |
9575 | 0 | state->error_pos = (const char*) p; |
9576 | 0 | state->_current = (void*) (intptr_t) s_error; |
9577 | 0 | return s_error; |
9578 | 0 | /* UNREACHABLE */; |
9579 | 0 | abort(); |
9580 | 0 | } |
9581 | 0 | s_n_llhttp__internal__n_error_98: { |
9582 | 0 | state->error = 0xd; |
9583 | 0 | state->reason = "Invalid status code"; |
9584 | 0 | state->error_pos = (const char*) p; |
9585 | 0 | state->_current = (void*) (intptr_t) s_error; |
9586 | 0 | return s_error; |
9587 | 0 | /* UNREACHABLE */; |
9588 | 0 | abort(); |
9589 | 0 | } |
9590 | 0 | s_n_llhttp__internal__n_error_96: { |
9591 | 0 | state->error = 0xd; |
9592 | 0 | state->reason = "Invalid status code"; |
9593 | 0 | state->error_pos = (const char*) p; |
9594 | 0 | state->_current = (void*) (intptr_t) s_error; |
9595 | 0 | return s_error; |
9596 | 0 | /* UNREACHABLE */; |
9597 | 0 | abort(); |
9598 | 0 | } |
9599 | 0 | s_n_llhttp__internal__n_pause_24: { |
9600 | 0 | state->error = 0x15; |
9601 | 0 | state->reason = "on_status_complete pause"; |
9602 | 0 | state->error_pos = (const char*) p; |
9603 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_headers_start; |
9604 | 0 | return s_error; |
9605 | 0 | /* UNREACHABLE */; |
9606 | 0 | abort(); |
9607 | 0 | } |
9608 | 0 | s_n_llhttp__internal__n_error_92: { |
9609 | 0 | state->error = 0x1b; |
9610 | 0 | state->reason = "`on_status_complete` callback error"; |
9611 | 0 | state->error_pos = (const char*) p; |
9612 | 0 | state->_current = (void*) (intptr_t) s_error; |
9613 | 0 | return s_error; |
9614 | 0 | /* UNREACHABLE */; |
9615 | 0 | abort(); |
9616 | 0 | } |
9617 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: { |
9618 | 0 | switch (llhttp__on_status_complete(state, p, endp)) { |
9619 | 0 | case 0: |
9620 | 0 | goto s_n_llhttp__internal__n_headers_start; |
9621 | 0 | case 21: |
9622 | 0 | goto s_n_llhttp__internal__n_pause_24; |
9623 | 0 | default: |
9624 | 0 | goto s_n_llhttp__internal__n_error_92; |
9625 | 0 | } |
9626 | 0 | /* UNREACHABLE */; |
9627 | 0 | abort(); |
9628 | 0 | } |
9629 | 0 | s_n_llhttp__internal__n_error_91: { |
9630 | 0 | state->error = 0xd; |
9631 | 0 | state->reason = "Invalid response status"; |
9632 | 0 | state->error_pos = (const char*) p; |
9633 | 0 | state->_current = (void*) (intptr_t) s_error; |
9634 | 0 | return s_error; |
9635 | 0 | /* UNREACHABLE */; |
9636 | 0 | abort(); |
9637 | 0 | } |
9638 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_28: { |
9639 | 0 | switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { |
9640 | 0 | case 1: |
9641 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; |
9642 | 0 | default: |
9643 | 0 | goto s_n_llhttp__internal__n_error_91; |
9644 | 0 | } |
9645 | 0 | /* UNREACHABLE */; |
9646 | 0 | abort(); |
9647 | 0 | } |
9648 | 0 | s_n_llhttp__internal__n_error_93: { |
9649 | 0 | state->error = 0x2; |
9650 | 0 | state->reason = "Expected LF after CR"; |
9651 | 0 | state->error_pos = (const char*) p; |
9652 | 0 | state->_current = (void*) (intptr_t) s_error; |
9653 | 0 | return s_error; |
9654 | 0 | /* UNREACHABLE */; |
9655 | 0 | abort(); |
9656 | 0 | } |
9657 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_29: { |
9658 | 0 | switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { |
9659 | 0 | case 1: |
9660 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; |
9661 | 0 | default: |
9662 | 0 | goto s_n_llhttp__internal__n_error_93; |
9663 | 0 | } |
9664 | 0 | /* UNREACHABLE */; |
9665 | 0 | abort(); |
9666 | 0 | } |
9667 | 0 | s_n_llhttp__internal__n_error_94: { |
9668 | 0 | state->error = 0x19; |
9669 | 0 | state->reason = "Missing expected CR after response line"; |
9670 | 0 | state->error_pos = (const char*) p; |
9671 | 0 | state->_current = (void*) (intptr_t) s_error; |
9672 | 0 | return s_error; |
9673 | 0 | /* UNREACHABLE */; |
9674 | 0 | abort(); |
9675 | 0 | } |
9676 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_status: { |
9677 | 0 | const unsigned char* start; |
9678 | 0 | int err; |
9679 | | |
9680 | 0 | start = state->_span_pos0; |
9681 | 0 | state->_span_pos0 = NULL; |
9682 | 0 | err = llhttp__on_status(state, start, p); |
9683 | 0 | if (err != 0) { |
9684 | 0 | state->error = err; |
9685 | 0 | state->error_pos = (const char*) (p + 1); |
9686 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_30; |
9687 | 0 | return s_error; |
9688 | 0 | } |
9689 | 0 | p++; |
9690 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_30; |
9691 | 0 | /* UNREACHABLE */; |
9692 | 0 | abort(); |
9693 | 0 | } |
9694 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_status_1: { |
9695 | 0 | const unsigned char* start; |
9696 | 0 | int err; |
9697 | | |
9698 | 0 | start = state->_span_pos0; |
9699 | 0 | state->_span_pos0 = NULL; |
9700 | 0 | err = llhttp__on_status(state, start, p); |
9701 | 0 | if (err != 0) { |
9702 | 0 | state->error = err; |
9703 | 0 | state->error_pos = (const char*) (p + 1); |
9704 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_res_line_almost_done; |
9705 | 0 | return s_error; |
9706 | 0 | } |
9707 | 0 | p++; |
9708 | 0 | goto s_n_llhttp__internal__n_res_line_almost_done; |
9709 | 0 | /* UNREACHABLE */; |
9710 | 0 | abort(); |
9711 | 0 | } |
9712 | 0 | s_n_llhttp__internal__n_error_95: { |
9713 | 0 | state->error = 0xd; |
9714 | 0 | state->reason = "Invalid response status"; |
9715 | 0 | state->error_pos = (const char*) p; |
9716 | 0 | state->_current = (void*) (intptr_t) s_error; |
9717 | 0 | return s_error; |
9718 | 0 | /* UNREACHABLE */; |
9719 | 0 | abort(); |
9720 | 0 | } |
9721 | 0 | s_n_llhttp__internal__n_invoke_mul_add_status_code_2: { |
9722 | 0 | switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { |
9723 | 0 | case 1: |
9724 | 0 | goto s_n_llhttp__internal__n_error_96; |
9725 | 0 | default: |
9726 | 0 | goto s_n_llhttp__internal__n_res_status_code_otherwise; |
9727 | 0 | } |
9728 | 0 | /* UNREACHABLE */; |
9729 | 0 | abort(); |
9730 | 0 | } |
9731 | 0 | s_n_llhttp__internal__n_error_97: { |
9732 | 0 | state->error = 0xd; |
9733 | 0 | state->reason = "Invalid status code"; |
9734 | 0 | state->error_pos = (const char*) p; |
9735 | 0 | state->_current = (void*) (intptr_t) s_error; |
9736 | 0 | return s_error; |
9737 | 0 | /* UNREACHABLE */; |
9738 | 0 | abort(); |
9739 | 0 | } |
9740 | 0 | s_n_llhttp__internal__n_invoke_mul_add_status_code_1: { |
9741 | 0 | switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { |
9742 | 0 | case 1: |
9743 | 0 | goto s_n_llhttp__internal__n_error_98; |
9744 | 0 | default: |
9745 | 0 | goto s_n_llhttp__internal__n_res_status_code_digit_3; |
9746 | 0 | } |
9747 | 0 | /* UNREACHABLE */; |
9748 | 0 | abort(); |
9749 | 0 | } |
9750 | 0 | s_n_llhttp__internal__n_error_99: { |
9751 | 0 | state->error = 0xd; |
9752 | 0 | state->reason = "Invalid status code"; |
9753 | 0 | state->error_pos = (const char*) p; |
9754 | 0 | state->_current = (void*) (intptr_t) s_error; |
9755 | 0 | return s_error; |
9756 | 0 | /* UNREACHABLE */; |
9757 | 0 | abort(); |
9758 | 0 | } |
9759 | 0 | s_n_llhttp__internal__n_invoke_mul_add_status_code: { |
9760 | 0 | switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { |
9761 | 0 | case 1: |
9762 | 0 | goto s_n_llhttp__internal__n_error_100; |
9763 | 0 | default: |
9764 | 0 | goto s_n_llhttp__internal__n_res_status_code_digit_2; |
9765 | 0 | } |
9766 | 0 | /* UNREACHABLE */; |
9767 | 0 | abort(); |
9768 | 0 | } |
9769 | 0 | s_n_llhttp__internal__n_error_101: { |
9770 | 0 | state->error = 0xd; |
9771 | 0 | state->reason = "Invalid status code"; |
9772 | 0 | state->error_pos = (const char*) p; |
9773 | 0 | state->_current = (void*) (intptr_t) s_error; |
9774 | 0 | return s_error; |
9775 | 0 | /* UNREACHABLE */; |
9776 | 0 | abort(); |
9777 | 0 | } |
9778 | 0 | s_n_llhttp__internal__n_invoke_update_status_code: { |
9779 | 0 | switch (llhttp__internal__c_update_status_code(state, p, endp)) { |
9780 | 0 | default: |
9781 | 0 | goto s_n_llhttp__internal__n_res_status_code_digit_1; |
9782 | 0 | } |
9783 | 0 | /* UNREACHABLE */; |
9784 | 0 | abort(); |
9785 | 0 | } |
9786 | 0 | s_n_llhttp__internal__n_error_102: { |
9787 | 0 | state->error = 0x9; |
9788 | 0 | state->reason = "Expected space after version"; |
9789 | 0 | state->error_pos = (const char*) p; |
9790 | 0 | state->_current = (void*) (intptr_t) s_error; |
9791 | 0 | return s_error; |
9792 | 0 | /* UNREACHABLE */; |
9793 | 0 | abort(); |
9794 | 0 | } |
9795 | 0 | s_n_llhttp__internal__n_pause_25: { |
9796 | 0 | state->error = 0x15; |
9797 | 0 | state->reason = "on_version_complete pause"; |
9798 | 0 | state->error_pos = (const char*) p; |
9799 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_res_after_version; |
9800 | 0 | return s_error; |
9801 | 0 | /* UNREACHABLE */; |
9802 | 0 | abort(); |
9803 | 0 | } |
9804 | 0 | s_n_llhttp__internal__n_error_90: { |
9805 | 0 | state->error = 0x21; |
9806 | 0 | state->reason = "`on_version_complete` callback error"; |
9807 | 0 | state->error_pos = (const char*) p; |
9808 | 0 | state->_current = (void*) (intptr_t) s_error; |
9809 | 0 | return s_error; |
9810 | 0 | /* UNREACHABLE */; |
9811 | 0 | abort(); |
9812 | 0 | } |
9813 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_6: { |
9814 | 0 | const unsigned char* start; |
9815 | 0 | int err; |
9816 | | |
9817 | 0 | start = state->_span_pos0; |
9818 | 0 | state->_span_pos0 = NULL; |
9819 | 0 | err = llhttp__on_version(state, start, p); |
9820 | 0 | if (err != 0) { |
9821 | 0 | state->error = err; |
9822 | 0 | state->error_pos = (const char*) p; |
9823 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1; |
9824 | 0 | return s_error; |
9825 | 0 | } |
9826 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1; |
9827 | 0 | /* UNREACHABLE */; |
9828 | 0 | abort(); |
9829 | 0 | } |
9830 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_5: { |
9831 | 0 | const unsigned char* start; |
9832 | 0 | int err; |
9833 | | |
9834 | 0 | start = state->_span_pos0; |
9835 | 0 | state->_span_pos0 = NULL; |
9836 | 0 | err = llhttp__on_version(state, start, p); |
9837 | 0 | if (err != 0) { |
9838 | 0 | state->error = err; |
9839 | 0 | state->error_pos = (const char*) p; |
9840 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_89; |
9841 | 0 | return s_error; |
9842 | 0 | } |
9843 | 0 | goto s_n_llhttp__internal__n_error_89; |
9844 | 0 | /* UNREACHABLE */; |
9845 | 0 | abort(); |
9846 | 0 | } |
9847 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor_3: { |
9848 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
9849 | 0 | case 9: |
9850 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; |
9851 | 0 | default: |
9852 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5; |
9853 | 0 | } |
9854 | 0 | /* UNREACHABLE */; |
9855 | 0 | abort(); |
9856 | 0 | } |
9857 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor_4: { |
9858 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
9859 | 0 | case 0: |
9860 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; |
9861 | 0 | case 1: |
9862 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; |
9863 | 0 | default: |
9864 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5; |
9865 | 0 | } |
9866 | 0 | /* UNREACHABLE */; |
9867 | 0 | abort(); |
9868 | 0 | } |
9869 | 0 | s_n_llhttp__internal__n_invoke_load_http_minor_5: { |
9870 | 0 | switch (llhttp__internal__c_load_http_minor(state, p, endp)) { |
9871 | 0 | case 0: |
9872 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; |
9873 | 0 | default: |
9874 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5; |
9875 | 0 | } |
9876 | 0 | /* UNREACHABLE */; |
9877 | 0 | abort(); |
9878 | 0 | } |
9879 | 0 | s_n_llhttp__internal__n_invoke_load_http_major_1: { |
9880 | 0 | switch (llhttp__internal__c_load_http_major(state, p, endp)) { |
9881 | 0 | case 0: |
9882 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor_3; |
9883 | 0 | case 1: |
9884 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor_4; |
9885 | 0 | case 2: |
9886 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_minor_5; |
9887 | 0 | default: |
9888 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5; |
9889 | 0 | } |
9890 | 0 | /* UNREACHABLE */; |
9891 | 0 | abort(); |
9892 | 0 | } |
9893 | 0 | s_n_llhttp__internal__n_invoke_test_lenient_flags_27: { |
9894 | 0 | switch (llhttp__internal__c_test_lenient_flags_24(state, p, endp)) { |
9895 | 0 | case 1: |
9896 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; |
9897 | 0 | default: |
9898 | 0 | goto s_n_llhttp__internal__n_invoke_load_http_major_1; |
9899 | 0 | } |
9900 | 0 | /* UNREACHABLE */; |
9901 | 0 | abort(); |
9902 | 0 | } |
9903 | 0 | s_n_llhttp__internal__n_invoke_store_http_minor_1: { |
9904 | 0 | switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) { |
9905 | 0 | default: |
9906 | 0 | goto s_n_llhttp__internal__n_invoke_test_lenient_flags_27; |
9907 | 0 | } |
9908 | 0 | /* UNREACHABLE */; |
9909 | 0 | abort(); |
9910 | 0 | } |
9911 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_7: { |
9912 | 0 | const unsigned char* start; |
9913 | 0 | int err; |
9914 | | |
9915 | 0 | start = state->_span_pos0; |
9916 | 0 | state->_span_pos0 = NULL; |
9917 | 0 | err = llhttp__on_version(state, start, p); |
9918 | 0 | if (err != 0) { |
9919 | 0 | state->error = err; |
9920 | 0 | state->error_pos = (const char*) p; |
9921 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_103; |
9922 | 0 | return s_error; |
9923 | 0 | } |
9924 | 0 | goto s_n_llhttp__internal__n_error_103; |
9925 | 0 | /* UNREACHABLE */; |
9926 | 0 | abort(); |
9927 | 0 | } |
9928 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_8: { |
9929 | 0 | const unsigned char* start; |
9930 | 0 | int err; |
9931 | | |
9932 | 0 | start = state->_span_pos0; |
9933 | 0 | state->_span_pos0 = NULL; |
9934 | 0 | err = llhttp__on_version(state, start, p); |
9935 | 0 | if (err != 0) { |
9936 | 0 | state->error = err; |
9937 | 0 | state->error_pos = (const char*) p; |
9938 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_104; |
9939 | 0 | return s_error; |
9940 | 0 | } |
9941 | 0 | goto s_n_llhttp__internal__n_error_104; |
9942 | 0 | /* UNREACHABLE */; |
9943 | 0 | abort(); |
9944 | 0 | } |
9945 | 0 | s_n_llhttp__internal__n_invoke_store_http_major_1: { |
9946 | 0 | switch (llhttp__internal__c_store_http_major(state, p, endp, match)) { |
9947 | 0 | default: |
9948 | 0 | goto s_n_llhttp__internal__n_res_http_dot; |
9949 | 0 | } |
9950 | 0 | /* UNREACHABLE */; |
9951 | 0 | abort(); |
9952 | 0 | } |
9953 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_version_9: { |
9954 | 0 | const unsigned char* start; |
9955 | 0 | int err; |
9956 | | |
9957 | 0 | start = state->_span_pos0; |
9958 | 0 | state->_span_pos0 = NULL; |
9959 | 0 | err = llhttp__on_version(state, start, p); |
9960 | 0 | if (err != 0) { |
9961 | 0 | state->error = err; |
9962 | 0 | state->error_pos = (const char*) p; |
9963 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_105; |
9964 | 0 | return s_error; |
9965 | 0 | } |
9966 | 0 | goto s_n_llhttp__internal__n_error_105; |
9967 | 0 | /* UNREACHABLE */; |
9968 | 0 | abort(); |
9969 | 0 | } |
9970 | 0 | s_n_llhttp__internal__n_error_109: { |
9971 | 0 | state->error = 0x8; |
9972 | 0 | state->reason = "Expected HTTP/"; |
9973 | 0 | state->error_pos = (const char*) p; |
9974 | 0 | state->_current = (void*) (intptr_t) s_error; |
9975 | 0 | return s_error; |
9976 | 0 | /* UNREACHABLE */; |
9977 | 0 | abort(); |
9978 | 0 | } |
9979 | 0 | s_n_llhttp__internal__n_pause_23: { |
9980 | 0 | state->error = 0x15; |
9981 | 0 | state->reason = "on_method_complete pause"; |
9982 | 0 | state->error_pos = (const char*) p; |
9983 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_first_space_before_url; |
9984 | 0 | return s_error; |
9985 | 0 | /* UNREACHABLE */; |
9986 | 0 | abort(); |
9987 | 0 | } |
9988 | 0 | s_n_llhttp__internal__n_error_1: { |
9989 | 0 | state->error = 0x20; |
9990 | 0 | state->reason = "`on_method_complete` callback error"; |
9991 | 0 | state->error_pos = (const char*) p; |
9992 | 0 | state->_current = (void*) (intptr_t) s_error; |
9993 | 0 | return s_error; |
9994 | 0 | /* UNREACHABLE */; |
9995 | 0 | abort(); |
9996 | 0 | } |
9997 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_method: { |
9998 | 0 | const unsigned char* start; |
9999 | 0 | int err; |
10000 | | |
10001 | 0 | start = state->_span_pos0; |
10002 | 0 | state->_span_pos0 = NULL; |
10003 | 0 | err = llhttp__on_method(state, start, p); |
10004 | 0 | if (err != 0) { |
10005 | 0 | state->error = err; |
10006 | 0 | state->error_pos = (const char*) p; |
10007 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_method_complete; |
10008 | 0 | return s_error; |
10009 | 0 | } |
10010 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_method_complete; |
10011 | 0 | /* UNREACHABLE */; |
10012 | 0 | abort(); |
10013 | 0 | } |
10014 | 0 | s_n_llhttp__internal__n_invoke_update_type: { |
10015 | 0 | switch (llhttp__internal__c_update_type(state, p, endp)) { |
10016 | 0 | default: |
10017 | 0 | goto s_n_llhttp__internal__n_span_end_llhttp__on_method; |
10018 | 0 | } |
10019 | 0 | /* UNREACHABLE */; |
10020 | 0 | abort(); |
10021 | 0 | } |
10022 | 0 | s_n_llhttp__internal__n_invoke_store_method: { |
10023 | 0 | switch (llhttp__internal__c_store_method(state, p, endp, match)) { |
10024 | 0 | default: |
10025 | 0 | goto s_n_llhttp__internal__n_invoke_update_type; |
10026 | 0 | } |
10027 | 0 | /* UNREACHABLE */; |
10028 | 0 | abort(); |
10029 | 0 | } |
10030 | 0 | s_n_llhttp__internal__n_error_106: { |
10031 | 0 | state->error = 0x8; |
10032 | 0 | state->reason = "Invalid word encountered"; |
10033 | 0 | state->error_pos = (const char*) p; |
10034 | 0 | state->_current = (void*) (intptr_t) s_error; |
10035 | 0 | return s_error; |
10036 | 0 | /* UNREACHABLE */; |
10037 | 0 | abort(); |
10038 | 0 | } |
10039 | 0 | s_n_llhttp__internal__n_span_end_llhttp__on_method_1: { |
10040 | 0 | const unsigned char* start; |
10041 | 0 | int err; |
10042 | | |
10043 | 0 | start = state->_span_pos0; |
10044 | 0 | state->_span_pos0 = NULL; |
10045 | 0 | err = llhttp__on_method(state, start, p); |
10046 | 0 | if (err != 0) { |
10047 | 0 | state->error = err; |
10048 | 0 | state->error_pos = (const char*) p; |
10049 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_type_1; |
10050 | 0 | return s_error; |
10051 | 0 | } |
10052 | 0 | goto s_n_llhttp__internal__n_invoke_update_type_1; |
10053 | 0 | /* UNREACHABLE */; |
10054 | 0 | abort(); |
10055 | 0 | } |
10056 | 0 | s_n_llhttp__internal__n_invoke_update_type_2: { |
10057 | 0 | switch (llhttp__internal__c_update_type(state, p, endp)) { |
10058 | 0 | default: |
10059 | 0 | goto s_n_llhttp__internal__n_span_start_llhttp__on_method_1; |
10060 | 0 | } |
10061 | 0 | /* UNREACHABLE */; |
10062 | 0 | abort(); |
10063 | 0 | } |
10064 | 0 | s_n_llhttp__internal__n_pause_27: { |
10065 | 0 | state->error = 0x15; |
10066 | 0 | state->reason = "on_message_begin pause"; |
10067 | 0 | state->error_pos = (const char*) p; |
10068 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_type; |
10069 | 0 | return s_error; |
10070 | 0 | /* UNREACHABLE */; |
10071 | 0 | abort(); |
10072 | 0 | } |
10073 | 0 | s_n_llhttp__internal__n_error: { |
10074 | 0 | state->error = 0x10; |
10075 | 0 | state->reason = "`on_message_begin` callback error"; |
10076 | 0 | state->error_pos = (const char*) p; |
10077 | 0 | state->_current = (void*) (intptr_t) s_error; |
10078 | 0 | return s_error; |
10079 | 0 | /* UNREACHABLE */; |
10080 | 0 | abort(); |
10081 | 0 | } |
10082 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_message_begin: { |
10083 | 0 | switch (llhttp__on_message_begin(state, p, endp)) { |
10084 | 0 | case 0: |
10085 | 0 | goto s_n_llhttp__internal__n_invoke_load_type; |
10086 | 0 | case 21: |
10087 | 0 | goto s_n_llhttp__internal__n_pause_27; |
10088 | 0 | default: |
10089 | 0 | goto s_n_llhttp__internal__n_error; |
10090 | 0 | } |
10091 | 0 | /* UNREACHABLE */; |
10092 | 0 | abort(); |
10093 | 0 | } |
10094 | 0 | s_n_llhttp__internal__n_pause_28: { |
10095 | 0 | state->error = 0x15; |
10096 | 0 | state->reason = "on_reset pause"; |
10097 | 0 | state->error_pos = (const char*) p; |
10098 | 0 | state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_finish; |
10099 | 0 | return s_error; |
10100 | 0 | /* UNREACHABLE */; |
10101 | 0 | abort(); |
10102 | 0 | } |
10103 | 0 | s_n_llhttp__internal__n_error_110: { |
10104 | 0 | state->error = 0x1f; |
10105 | 0 | state->reason = "`on_reset` callback error"; |
10106 | 0 | state->error_pos = (const char*) p; |
10107 | 0 | state->_current = (void*) (intptr_t) s_error; |
10108 | 0 | return s_error; |
10109 | 0 | /* UNREACHABLE */; |
10110 | 0 | abort(); |
10111 | 0 | } |
10112 | 0 | s_n_llhttp__internal__n_invoke_llhttp__on_reset: { |
10113 | 0 | switch (llhttp__on_reset(state, p, endp)) { |
10114 | 0 | case 0: |
10115 | 0 | goto s_n_llhttp__internal__n_invoke_update_finish; |
10116 | 0 | case 21: |
10117 | 0 | goto s_n_llhttp__internal__n_pause_28; |
10118 | 0 | default: |
10119 | 0 | goto s_n_llhttp__internal__n_error_110; |
10120 | 0 | } |
10121 | 0 | /* UNREACHABLE */; |
10122 | 0 | abort(); |
10123 | 0 | } |
10124 | 0 | s_n_llhttp__internal__n_invoke_load_initial_message_completed: { |
10125 | 0 | switch (llhttp__internal__c_load_initial_message_completed(state, p, endp)) { |
10126 | 0 | case 1: |
10127 | 0 | goto s_n_llhttp__internal__n_invoke_llhttp__on_reset; |
10128 | 0 | default: |
10129 | 0 | goto s_n_llhttp__internal__n_invoke_update_finish; |
10130 | 0 | } |
10131 | 0 | /* UNREACHABLE */; |
10132 | 0 | abort(); |
10133 | 0 | } |
10134 | 0 | } |
10135 | | |
10136 | 0 | int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const char* endp) { |
10137 | 0 | llparse_state_t next; |
10138 | | |
10139 | | /* check lingering errors */ |
10140 | 0 | if (state->error != 0) { |
10141 | 0 | return state->error; |
10142 | 0 | } |
10143 | | |
10144 | | /* restart spans */ |
10145 | 0 | if (state->_span_pos0 != NULL) { |
10146 | 0 | state->_span_pos0 = (void*) p; |
10147 | 0 | } |
10148 | | |
10149 | 0 | next = llhttp__internal__run(state, (const unsigned char*) p, (const unsigned char*) endp); |
10150 | 0 | if (next == s_error) { |
10151 | 0 | return state->error; |
10152 | 0 | } |
10153 | 0 | state->_current = (void*) (intptr_t) next; |
10154 | | |
10155 | | /* execute spans */ |
10156 | 0 | if (state->_span_pos0 != NULL) { |
10157 | 0 | int error; |
10158 | | |
10159 | 0 | error = ((llhttp__internal__span_cb) state->_span_cb0)(state, state->_span_pos0, (const char*) endp); |
10160 | 0 | if (error != 0) { |
10161 | 0 | state->error = error; |
10162 | 0 | state->error_pos = endp; |
10163 | 0 | return error; |
10164 | 0 | } |
10165 | 0 | } |
10166 | | |
10167 | 0 | return 0; |
10168 | 0 | } |