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
21typedef int (*llhttp__internal__span_cb)(
22 llhttp__internal_t*, const char*, const char*);
23
24static const unsigned char llparse_blob0[] = {
25 'o', 'n'
26};
27static const unsigned char llparse_blob1[] = {
28 'e', 'c', 't', 'i', 'o', 'n'
29};
30static const unsigned char llparse_blob2[] = {
31 'l', 'o', 's', 'e'
32};
33static const unsigned char llparse_blob3[] = {
34 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e'
35};
36static const unsigned char llparse_blob4[] = {
37 'p', 'g', 'r', 'a', 'd', 'e'
38};
39static const unsigned char llparse_blob5[] = {
40 'c', 'h', 'u', 'n', 'k', 'e', 'd'
41};
42#ifdef __SSE4_2__
43static 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__
49static const unsigned char ALIGN(16) llparse_blob7[] = {
50 '!', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A',
51 'Z', '^', 'z', '|', '|'
52};
53#endif /* __SSE4_2__ */
54#ifdef __SSE4_2__
55static 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__ */
60static const unsigned char llparse_blob9[] = {
61 'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h'
62};
63static const unsigned char llparse_blob10[] = {
64 'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c',
65 't', 'i', 'o', 'n'
66};
67static const unsigned char llparse_blob11[] = {
68 'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c',
69 'o', 'd', 'i', 'n', 'g'
70};
71static const unsigned char llparse_blob12[] = {
72 'p', 'g', 'r', 'a', 'd', 'e'
73};
74static const unsigned char llparse_blob13[] = {
75 'T', 'T', 'P', '/'
76};
77static const unsigned char llparse_blob14[] = {
78 0xd, 0xa, 0xd, 0xa, 'S', 'M', 0xd, 0xa, 0xd, 0xa
79};
80static const unsigned char llparse_blob15[] = {
81 'C', 'E', '/'
82};
83static const unsigned char llparse_blob16[] = {
84 'T', 'S', 'P', '/'
85};
86static const unsigned char llparse_blob17[] = {
87 'N', 'O', 'U', 'N', 'C', 'E'
88};
89static const unsigned char llparse_blob18[] = {
90 'I', 'N', 'D'
91};
92static const unsigned char llparse_blob19[] = {
93 'E', 'C', 'K', 'O', 'U', 'T'
94};
95static const unsigned char llparse_blob20[] = {
96 'N', 'E', 'C', 'T'
97};
98static const unsigned char llparse_blob21[] = {
99 'E', 'T', 'E'
100};
101static const unsigned char llparse_blob22[] = {
102 'C', 'R', 'I', 'B', 'E'
103};
104static const unsigned char llparse_blob23[] = {
105 'L', 'U', 'S', 'H'
106};
107static const unsigned char llparse_blob24[] = {
108 'E', 'T'
109};
110static const unsigned char llparse_blob25[] = {
111 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R'
112};
113static const unsigned char llparse_blob26[] = {
114 'E', 'A', 'D'
115};
116static const unsigned char llparse_blob27[] = {
117 'N', 'K'
118};
119static const unsigned char llparse_blob28[] = {
120 'C', 'K'
121};
122static const unsigned char llparse_blob29[] = {
123 'S', 'E', 'A', 'R', 'C', 'H'
124};
125static const unsigned char llparse_blob30[] = {
126 'R', 'G', 'E'
127};
128static const unsigned char llparse_blob31[] = {
129 'C', 'T', 'I', 'V', 'I', 'T', 'Y'
130};
131static const unsigned char llparse_blob32[] = {
132 'L', 'E', 'N', 'D', 'A', 'R'
133};
134static const unsigned char llparse_blob33[] = {
135 'V', 'E'
136};
137static const unsigned char llparse_blob34[] = {
138 'O', 'T', 'I', 'F', 'Y'
139};
140static const unsigned char llparse_blob35[] = {
141 'P', 'T', 'I', 'O', 'N', 'S'
142};
143static const unsigned char llparse_blob36[] = {
144 'C', 'H'
145};
146static const unsigned char llparse_blob37[] = {
147 'S', 'E'
148};
149static const unsigned char llparse_blob38[] = {
150 'A', 'Y'
151};
152static const unsigned char llparse_blob39[] = {
153 'S', 'T'
154};
155static const unsigned char llparse_blob40[] = {
156 'I', 'N', 'D'
157};
158static const unsigned char llparse_blob41[] = {
159 'A', 'T', 'C', 'H'
160};
161static const unsigned char llparse_blob42[] = {
162 'G', 'E'
163};
164static const unsigned char llparse_blob43[] = {
165 'I', 'N', 'D'
166};
167static const unsigned char llparse_blob44[] = {
168 'O', 'R', 'D'
169};
170static const unsigned char llparse_blob45[] = {
171 'I', 'R', 'E', 'C', 'T'
172};
173static const unsigned char llparse_blob46[] = {
174 'O', 'R', 'T'
175};
176static const unsigned char llparse_blob47[] = {
177 'R', 'C', 'H'
178};
179static const unsigned char llparse_blob48[] = {
180 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R'
181};
182static const unsigned char llparse_blob49[] = {
183 'U', 'R', 'C', 'E'
184};
185static const unsigned char llparse_blob50[] = {
186 'B', 'S', 'C', 'R', 'I', 'B', 'E'
187};
188static const unsigned char llparse_blob51[] = {
189 'A', 'R', 'D', 'O', 'W', 'N'
190};
191static const unsigned char llparse_blob52[] = {
192 'A', 'C', 'E'
193};
194static const unsigned char llparse_blob53[] = {
195 'I', 'N', 'D'
196};
197static const unsigned char llparse_blob54[] = {
198 'N', 'K'
199};
200static const unsigned char llparse_blob55[] = {
201 'C', 'K'
202};
203static const unsigned char llparse_blob56[] = {
204 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E'
205};
206static const unsigned char llparse_blob57[] = {
207 'H', 'T', 'T', 'P', '/'
208};
209static const unsigned char llparse_blob58[] = {
210 'A', 'D'
211};
212static const unsigned char llparse_blob59[] = {
213 'T', 'P', '/'
214};
215
216enum llparse_match_status_e {
217 kMatchComplete,
218 kMatchPause,
219 kMatchMismatch
220};
221typedef enum llparse_match_status_e llparse_match_status_t;
222
223struct llparse_match_s {
224 llparse_match_status_t status;
225 const unsigned char* current;
226};
227typedef struct llparse_match_s llparse_match_t;
228
229static llparse_match_t llparse__match_sequence_to_lower(
230 llhttp__internal_t* s, const unsigned char* p,
231 const unsigned char* endp,
232 const unsigned char* seq, uint32_t seq_len) {
233 uint32_t index;
234 llparse_match_t res;
235
236 index = s->_index;
237 for (; p != endp; p++) {
238 unsigned char current;
239
240 current = ((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p));
241 if (current == seq[index]) {
242 if (++index == seq_len) {
243 res.status = kMatchComplete;
244 goto reset;
245 }
246 } else {
247 res.status = kMatchMismatch;
248 goto reset;
249 }
250 }
251 s->_index = index;
252 res.status = kMatchPause;
253 res.current = p;
254 return res;
255reset:
256 s->_index = 0;
257 res.current = p;
258 return res;
259}
260
261static llparse_match_t llparse__match_sequence_to_lower_unsafe(
262 llhttp__internal_t* s, const unsigned char* p,
263 const unsigned char* endp,
264 const unsigned char* seq, uint32_t seq_len) {
265 uint32_t index;
266 llparse_match_t res;
267
268 index = s->_index;
269 for (; p != endp; p++) {
270 unsigned char current;
271
272 current = ((*p) | 0x20);
273 if (current == seq[index]) {
274 if (++index == seq_len) {
275 res.status = kMatchComplete;
276 goto reset;
277 }
278 } else {
279 res.status = kMatchMismatch;
280 goto reset;
281 }
282 }
283 s->_index = index;
284 res.status = kMatchPause;
285 res.current = p;
286 return res;
287reset:
288 s->_index = 0;
289 res.current = p;
290 return res;
291}
292
293static llparse_match_t llparse__match_sequence_id(
294 llhttp__internal_t* s, const unsigned char* p,
295 const unsigned char* endp,
296 const unsigned char* seq, uint32_t seq_len) {
297 uint32_t index;
298 llparse_match_t res;
299
300 index = s->_index;
301 for (; p != endp; p++) {
302 unsigned char current;
303
304 current = *p;
305 if (current == seq[index]) {
306 if (++index == seq_len) {
307 res.status = kMatchComplete;
308 goto reset;
309 }
310 } else {
311 res.status = kMatchMismatch;
312 goto reset;
313 }
314 }
315 s->_index = index;
316 res.status = kMatchPause;
317 res.current = p;
318 return res;
319reset:
320 s->_index = 0;
321 res.current = p;
322 return res;
323}
324
325enum llparse_state_e {
326 s_error,
327 s_n_llhttp__internal__n_closed,
328 s_n_llhttp__internal__n_invoke_llhttp__after_message_complete,
329 s_n_llhttp__internal__n_pause_1,
330 s_n_llhttp__internal__n_invoke_is_equal_upgrade,
331 s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2,
332 s_n_llhttp__internal__n_chunk_data_almost_done_1,
333 s_n_llhttp__internal__n_chunk_data_almost_done,
334 s_n_llhttp__internal__n_consume_content_length,
335 s_n_llhttp__internal__n_span_start_llhttp__on_body,
336 s_n_llhttp__internal__n_invoke_is_equal_content_length,
337 s_n_llhttp__internal__n_chunk_size_almost_done,
338 s_n_llhttp__internal__n_invoke_test_lenient_flags_9,
339 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete,
340 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1,
341 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2,
342 s_n_llhttp__internal__n_invoke_test_lenient_flags_10,
343 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete,
344 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1,
345 s_n_llhttp__internal__n_chunk_extension_quoted_value_done,
346 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2,
347 s_n_llhttp__internal__n_error_30,
348 s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair,
349 s_n_llhttp__internal__n_error_31,
350 s_n_llhttp__internal__n_chunk_extension_quoted_value,
351 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3,
352 s_n_llhttp__internal__n_error_33,
353 s_n_llhttp__internal__n_chunk_extension_value,
354 s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value,
355 s_n_llhttp__internal__n_error_34,
356 s_n_llhttp__internal__n_chunk_extension_name,
357 s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name,
358 s_n_llhttp__internal__n_chunk_extensions,
359 s_n_llhttp__internal__n_chunk_size_otherwise,
360 s_n_llhttp__internal__n_chunk_size,
361 s_n_llhttp__internal__n_chunk_size_digit,
362 s_n_llhttp__internal__n_invoke_update_content_length_1,
363 s_n_llhttp__internal__n_consume_content_length_1,
364 s_n_llhttp__internal__n_span_start_llhttp__on_body_1,
365 s_n_llhttp__internal__n_eof,
366 s_n_llhttp__internal__n_span_start_llhttp__on_body_2,
367 s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete,
368 s_n_llhttp__internal__n_error_5,
369 s_n_llhttp__internal__n_headers_almost_done,
370 s_n_llhttp__internal__n_header_field_colon_discard_ws,
371 s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete,
372 s_n_llhttp__internal__n_span_start_llhttp__on_header_value,
373 s_n_llhttp__internal__n_header_value_discard_lws,
374 s_n_llhttp__internal__n_header_value_discard_ws_almost_done,
375 s_n_llhttp__internal__n_header_value_lws,
376 s_n_llhttp__internal__n_header_value_almost_done,
377 s_n_llhttp__internal__n_invoke_test_lenient_flags_17,
378 s_n_llhttp__internal__n_header_value_lenient,
379 s_n_llhttp__internal__n_error_52,
380 s_n_llhttp__internal__n_header_value_otherwise,
381 s_n_llhttp__internal__n_header_value_connection_token,
382 s_n_llhttp__internal__n_header_value_connection_ws,
383 s_n_llhttp__internal__n_header_value_connection_1,
384 s_n_llhttp__internal__n_header_value_connection_2,
385 s_n_llhttp__internal__n_header_value_connection_3,
386 s_n_llhttp__internal__n_header_value_connection,
387 s_n_llhttp__internal__n_error_54,
388 s_n_llhttp__internal__n_error_55,
389 s_n_llhttp__internal__n_header_value_content_length_ws,
390 s_n_llhttp__internal__n_header_value_content_length,
391 s_n_llhttp__internal__n_error_57,
392 s_n_llhttp__internal__n_error_56,
393 s_n_llhttp__internal__n_header_value_te_token_ows,
394 s_n_llhttp__internal__n_header_value,
395 s_n_llhttp__internal__n_header_value_te_token,
396 s_n_llhttp__internal__n_header_value_te_chunked_last,
397 s_n_llhttp__internal__n_header_value_te_chunked,
398 s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1,
399 s_n_llhttp__internal__n_header_value_discard_ws,
400 s_n_llhttp__internal__n_invoke_load_header_state,
401 s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete,
402 s_n_llhttp__internal__n_header_field_general_otherwise,
403 s_n_llhttp__internal__n_header_field_general,
404 s_n_llhttp__internal__n_header_field_colon,
405 s_n_llhttp__internal__n_header_field_3,
406 s_n_llhttp__internal__n_header_field_4,
407 s_n_llhttp__internal__n_header_field_2,
408 s_n_llhttp__internal__n_header_field_1,
409 s_n_llhttp__internal__n_header_field_5,
410 s_n_llhttp__internal__n_header_field_6,
411 s_n_llhttp__internal__n_header_field_7,
412 s_n_llhttp__internal__n_header_field,
413 s_n_llhttp__internal__n_span_start_llhttp__on_header_field,
414 s_n_llhttp__internal__n_header_field_start,
415 s_n_llhttp__internal__n_headers_start,
416 s_n_llhttp__internal__n_url_to_http_09,
417 s_n_llhttp__internal__n_url_skip_to_http09,
418 s_n_llhttp__internal__n_url_skip_lf_to_http09_1,
419 s_n_llhttp__internal__n_url_skip_lf_to_http09,
420 s_n_llhttp__internal__n_req_pri_upgrade,
421 s_n_llhttp__internal__n_req_http_complete_crlf,
422 s_n_llhttp__internal__n_req_http_complete,
423 s_n_llhttp__internal__n_invoke_load_method_1,
424 s_n_llhttp__internal__n_invoke_llhttp__on_version_complete,
425 s_n_llhttp__internal__n_error_64,
426 s_n_llhttp__internal__n_error_71,
427 s_n_llhttp__internal__n_req_http_minor,
428 s_n_llhttp__internal__n_error_72,
429 s_n_llhttp__internal__n_req_http_dot,
430 s_n_llhttp__internal__n_error_73,
431 s_n_llhttp__internal__n_req_http_major,
432 s_n_llhttp__internal__n_span_start_llhttp__on_version,
433 s_n_llhttp__internal__n_req_http_start_1,
434 s_n_llhttp__internal__n_req_http_start_2,
435 s_n_llhttp__internal__n_req_http_start_3,
436 s_n_llhttp__internal__n_req_http_start,
437 s_n_llhttp__internal__n_url_to_http,
438 s_n_llhttp__internal__n_url_skip_to_http,
439 s_n_llhttp__internal__n_url_fragment,
440 s_n_llhttp__internal__n_span_end_stub_query_3,
441 s_n_llhttp__internal__n_url_query,
442 s_n_llhttp__internal__n_url_query_or_fragment,
443 s_n_llhttp__internal__n_url_path,
444 s_n_llhttp__internal__n_span_start_stub_path_2,
445 s_n_llhttp__internal__n_span_start_stub_path,
446 s_n_llhttp__internal__n_span_start_stub_path_1,
447 s_n_llhttp__internal__n_url_server_with_at,
448 s_n_llhttp__internal__n_url_server,
449 s_n_llhttp__internal__n_url_schema_delim_1,
450 s_n_llhttp__internal__n_url_schema_delim,
451 s_n_llhttp__internal__n_span_end_stub_schema,
452 s_n_llhttp__internal__n_url_schema,
453 s_n_llhttp__internal__n_url_start,
454 s_n_llhttp__internal__n_span_start_llhttp__on_url_1,
455 s_n_llhttp__internal__n_url_entry_normal,
456 s_n_llhttp__internal__n_span_start_llhttp__on_url,
457 s_n_llhttp__internal__n_url_entry_connect,
458 s_n_llhttp__internal__n_req_spaces_before_url,
459 s_n_llhttp__internal__n_req_first_space_before_url,
460 s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1,
461 s_n_llhttp__internal__n_after_start_req_2,
462 s_n_llhttp__internal__n_after_start_req_3,
463 s_n_llhttp__internal__n_after_start_req_1,
464 s_n_llhttp__internal__n_after_start_req_4,
465 s_n_llhttp__internal__n_after_start_req_6,
466 s_n_llhttp__internal__n_after_start_req_8,
467 s_n_llhttp__internal__n_after_start_req_9,
468 s_n_llhttp__internal__n_after_start_req_7,
469 s_n_llhttp__internal__n_after_start_req_5,
470 s_n_llhttp__internal__n_after_start_req_12,
471 s_n_llhttp__internal__n_after_start_req_13,
472 s_n_llhttp__internal__n_after_start_req_11,
473 s_n_llhttp__internal__n_after_start_req_10,
474 s_n_llhttp__internal__n_after_start_req_14,
475 s_n_llhttp__internal__n_after_start_req_17,
476 s_n_llhttp__internal__n_after_start_req_16,
477 s_n_llhttp__internal__n_after_start_req_15,
478 s_n_llhttp__internal__n_after_start_req_18,
479 s_n_llhttp__internal__n_after_start_req_20,
480 s_n_llhttp__internal__n_after_start_req_21,
481 s_n_llhttp__internal__n_after_start_req_19,
482 s_n_llhttp__internal__n_after_start_req_23,
483 s_n_llhttp__internal__n_after_start_req_24,
484 s_n_llhttp__internal__n_after_start_req_26,
485 s_n_llhttp__internal__n_after_start_req_28,
486 s_n_llhttp__internal__n_after_start_req_29,
487 s_n_llhttp__internal__n_after_start_req_27,
488 s_n_llhttp__internal__n_after_start_req_25,
489 s_n_llhttp__internal__n_after_start_req_30,
490 s_n_llhttp__internal__n_after_start_req_22,
491 s_n_llhttp__internal__n_after_start_req_31,
492 s_n_llhttp__internal__n_after_start_req_32,
493 s_n_llhttp__internal__n_after_start_req_35,
494 s_n_llhttp__internal__n_after_start_req_36,
495 s_n_llhttp__internal__n_after_start_req_34,
496 s_n_llhttp__internal__n_after_start_req_37,
497 s_n_llhttp__internal__n_after_start_req_38,
498 s_n_llhttp__internal__n_after_start_req_42,
499 s_n_llhttp__internal__n_after_start_req_43,
500 s_n_llhttp__internal__n_after_start_req_41,
501 s_n_llhttp__internal__n_after_start_req_40,
502 s_n_llhttp__internal__n_after_start_req_39,
503 s_n_llhttp__internal__n_after_start_req_45,
504 s_n_llhttp__internal__n_after_start_req_44,
505 s_n_llhttp__internal__n_after_start_req_33,
506 s_n_llhttp__internal__n_after_start_req_48,
507 s_n_llhttp__internal__n_after_start_req_49,
508 s_n_llhttp__internal__n_after_start_req_50,
509 s_n_llhttp__internal__n_after_start_req_51,
510 s_n_llhttp__internal__n_after_start_req_47,
511 s_n_llhttp__internal__n_after_start_req_46,
512 s_n_llhttp__internal__n_after_start_req_54,
513 s_n_llhttp__internal__n_after_start_req_56,
514 s_n_llhttp__internal__n_after_start_req_57,
515 s_n_llhttp__internal__n_after_start_req_55,
516 s_n_llhttp__internal__n_after_start_req_53,
517 s_n_llhttp__internal__n_after_start_req_58,
518 s_n_llhttp__internal__n_after_start_req_59,
519 s_n_llhttp__internal__n_after_start_req_52,
520 s_n_llhttp__internal__n_after_start_req_61,
521 s_n_llhttp__internal__n_after_start_req_62,
522 s_n_llhttp__internal__n_after_start_req_60,
523 s_n_llhttp__internal__n_after_start_req_65,
524 s_n_llhttp__internal__n_after_start_req_67,
525 s_n_llhttp__internal__n_after_start_req_68,
526 s_n_llhttp__internal__n_after_start_req_66,
527 s_n_llhttp__internal__n_after_start_req_69,
528 s_n_llhttp__internal__n_after_start_req_64,
529 s_n_llhttp__internal__n_after_start_req_63,
530 s_n_llhttp__internal__n_after_start_req,
531 s_n_llhttp__internal__n_span_start_llhttp__on_method_1,
532 s_n_llhttp__internal__n_res_line_almost_done,
533 s_n_llhttp__internal__n_invoke_test_lenient_flags_29,
534 s_n_llhttp__internal__n_res_status,
535 s_n_llhttp__internal__n_span_start_llhttp__on_status,
536 s_n_llhttp__internal__n_res_status_code_otherwise,
537 s_n_llhttp__internal__n_res_status_code_digit_3,
538 s_n_llhttp__internal__n_res_status_code_digit_2,
539 s_n_llhttp__internal__n_res_status_code_digit_1,
540 s_n_llhttp__internal__n_res_after_version,
541 s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1,
542 s_n_llhttp__internal__n_error_87,
543 s_n_llhttp__internal__n_error_101,
544 s_n_llhttp__internal__n_res_http_minor,
545 s_n_llhttp__internal__n_error_102,
546 s_n_llhttp__internal__n_res_http_dot,
547 s_n_llhttp__internal__n_error_103,
548 s_n_llhttp__internal__n_res_http_major,
549 s_n_llhttp__internal__n_span_start_llhttp__on_version_1,
550 s_n_llhttp__internal__n_start_res,
551 s_n_llhttp__internal__n_invoke_llhttp__on_method_complete,
552 s_n_llhttp__internal__n_req_or_res_method_2,
553 s_n_llhttp__internal__n_invoke_update_type_1,
554 s_n_llhttp__internal__n_req_or_res_method_3,
555 s_n_llhttp__internal__n_req_or_res_method_1,
556 s_n_llhttp__internal__n_req_or_res_method,
557 s_n_llhttp__internal__n_span_start_llhttp__on_method,
558 s_n_llhttp__internal__n_start_req_or_res,
559 s_n_llhttp__internal__n_invoke_load_type,
560 s_n_llhttp__internal__n_invoke_update_finish,
561 s_n_llhttp__internal__n_start,
562};
563typedef enum llparse_state_e llparse_state_t;
564
565int llhttp__on_method(
566 llhttp__internal_t* s, const unsigned char* p,
567 const unsigned char* endp);
568
569int llhttp__on_url(
570 llhttp__internal_t* s, const unsigned char* p,
571 const unsigned char* endp);
572
573int llhttp__on_version(
574 llhttp__internal_t* s, const unsigned char* p,
575 const unsigned char* endp);
576
577int llhttp__on_header_field(
578 llhttp__internal_t* s, const unsigned char* p,
579 const unsigned char* endp);
580
581int llhttp__on_header_value(
582 llhttp__internal_t* s, const unsigned char* p,
583 const unsigned char* endp);
584
585int llhttp__on_body(
586 llhttp__internal_t* s, const unsigned char* p,
587 const unsigned char* endp);
588
589int llhttp__on_chunk_extension_name(
590 llhttp__internal_t* s, const unsigned char* p,
591 const unsigned char* endp);
592
593int llhttp__on_chunk_extension_value(
594 llhttp__internal_t* s, const unsigned char* p,
595 const unsigned char* endp);
596
597int llhttp__on_status(
598 llhttp__internal_t* s, const unsigned char* p,
599 const unsigned char* endp);
600
601int llhttp__internal__c_load_initial_message_completed(
602 llhttp__internal_t* state,
603 const unsigned char* p,
604 const unsigned char* endp) {
605 return state->initial_message_completed;
606}
607
608int llhttp__on_reset(
609 llhttp__internal_t* s, const unsigned char* p,
610 const unsigned char* endp);
611
612int llhttp__internal__c_update_finish(
613 llhttp__internal_t* state,
614 const unsigned char* p,
615 const unsigned char* endp) {
616 state->finish = 2;
617 return 0;
618}
619
620int llhttp__on_message_begin(
621 llhttp__internal_t* s, const unsigned char* p,
622 const unsigned char* endp);
623
624int llhttp__internal__c_load_type(
625 llhttp__internal_t* state,
626 const unsigned char* p,
627 const unsigned char* endp) {
628 return state->type;
629}
630
631int llhttp__internal__c_store_method(
632 llhttp__internal_t* state,
633 const unsigned char* p,
634 const unsigned char* endp,
635 int match) {
636 state->method = match;
637 return 0;
638}
639
640int llhttp__on_method_complete(
641 llhttp__internal_t* s, const unsigned char* p,
642 const unsigned char* endp);
643
644int llhttp__internal__c_is_equal_method(
645 llhttp__internal_t* state,
646 const unsigned char* p,
647 const unsigned char* endp) {
648 return state->method == 5;
649}
650
651int llhttp__internal__c_update_http_major(
652 llhttp__internal_t* state,
653 const unsigned char* p,
654 const unsigned char* endp) {
655 state->http_major = 0;
656 return 0;
657}
658
659int llhttp__internal__c_update_http_minor(
660 llhttp__internal_t* state,
661 const unsigned char* p,
662 const unsigned char* endp) {
663 state->http_minor = 9;
664 return 0;
665}
666
667int llhttp__on_url_complete(
668 llhttp__internal_t* s, const unsigned char* p,
669 const unsigned char* endp);
670
671int llhttp__internal__c_test_lenient_flags(
672 llhttp__internal_t* state,
673 const unsigned char* p,
674 const unsigned char* endp) {
675 return (state->lenient_flags & 1) == 1;
676}
677
678int llhttp__internal__c_test_lenient_flags_1(
679 llhttp__internal_t* state,
680 const unsigned char* p,
681 const unsigned char* endp) {
682 return (state->lenient_flags & 256) == 256;
683}
684
685int llhttp__internal__c_test_flags(
686 llhttp__internal_t* state,
687 const unsigned char* p,
688 const unsigned char* endp) {
689 return (state->flags & 128) == 128;
690}
691
692int llhttp__on_chunk_complete(
693 llhttp__internal_t* s, const unsigned char* p,
694 const unsigned char* endp);
695
696int llhttp__on_message_complete(
697 llhttp__internal_t* s, const unsigned char* p,
698 const unsigned char* endp);
699
700int llhttp__internal__c_is_equal_upgrade(
701 llhttp__internal_t* state,
702 const unsigned char* p,
703 const unsigned char* endp) {
704 return state->upgrade == 1;
705}
706
707int llhttp__after_message_complete(
708 llhttp__internal_t* s, const unsigned char* p,
709 const unsigned char* endp);
710
711int llhttp__internal__c_update_content_length(
712 llhttp__internal_t* state,
713 const unsigned char* p,
714 const unsigned char* endp) {
715 state->content_length = 0;
716 return 0;
717}
718
719int llhttp__internal__c_update_initial_message_completed(
720 llhttp__internal_t* state,
721 const unsigned char* p,
722 const unsigned char* endp) {
723 state->initial_message_completed = 1;
724 return 0;
725}
726
727int llhttp__internal__c_update_finish_1(
728 llhttp__internal_t* state,
729 const unsigned char* p,
730 const unsigned char* endp) {
731 state->finish = 0;
732 return 0;
733}
734
735int llhttp__internal__c_test_lenient_flags_2(
736 llhttp__internal_t* state,
737 const unsigned char* p,
738 const unsigned char* endp) {
739 return (state->lenient_flags & 4) == 4;
740}
741
742int llhttp__internal__c_test_lenient_flags_3(
743 llhttp__internal_t* state,
744 const unsigned char* p,
745 const unsigned char* endp) {
746 return (state->lenient_flags & 32) == 32;
747}
748
749int llhttp__before_headers_complete(
750 llhttp__internal_t* s, const unsigned char* p,
751 const unsigned char* endp);
752
753int llhttp__on_headers_complete(
754 llhttp__internal_t* s, const unsigned char* p,
755 const unsigned char* endp);
756
757int llhttp__after_headers_complete(
758 llhttp__internal_t* s, const unsigned char* p,
759 const unsigned char* endp);
760
761int llhttp__internal__c_mul_add_content_length(
762 llhttp__internal_t* state,
763 const unsigned char* p,
764 const unsigned char* endp,
765 int match) {
766 /* Multiplication overflow */
767 if (state->content_length > 0xffffffffffffffffULL / 16) {
768 return 1;
769 }
770
771 state->content_length *= 16;
772
773 /* Addition overflow */
774 if (match >= 0) {
775 if (state->content_length > 0xffffffffffffffffULL - match) {
776 return 1;
777 }
778 } else {
779 if (state->content_length < 0ULL - match) {
780 return 1;
781 }
782 }
783 state->content_length += match;
784 return 0;
785}
786
787int llhttp__internal__c_test_lenient_flags_4(
788 llhttp__internal_t* state,
789 const unsigned char* p,
790 const unsigned char* endp) {
791 return (state->lenient_flags & 512) == 512;
792}
793
794int llhttp__on_chunk_header(
795 llhttp__internal_t* s, const unsigned char* p,
796 const unsigned char* endp);
797
798int llhttp__internal__c_is_equal_content_length(
799 llhttp__internal_t* state,
800 const unsigned char* p,
801 const unsigned char* endp) {
802 return state->content_length == 0;
803}
804
805int llhttp__internal__c_test_lenient_flags_7(
806 llhttp__internal_t* state,
807 const unsigned char* p,
808 const unsigned char* endp) {
809 return (state->lenient_flags & 128) == 128;
810}
811
812int llhttp__internal__c_or_flags(
813 llhttp__internal_t* state,
814 const unsigned char* p,
815 const unsigned char* endp) {
816 state->flags |= 128;
817 return 0;
818}
819
820int llhttp__internal__c_test_lenient_flags_8(
821 llhttp__internal_t* state,
822 const unsigned char* p,
823 const unsigned char* endp) {
824 return (state->lenient_flags & 64) == 64;
825}
826
827int llhttp__on_chunk_extension_name_complete(
828 llhttp__internal_t* s, const unsigned char* p,
829 const unsigned char* endp);
830
831int llhttp__on_chunk_extension_value_complete(
832 llhttp__internal_t* s, const unsigned char* p,
833 const unsigned char* endp);
834
835int llhttp__internal__c_update_finish_3(
836 llhttp__internal_t* state,
837 const unsigned char* p,
838 const unsigned char* endp) {
839 state->finish = 1;
840 return 0;
841}
842
843int llhttp__internal__c_or_flags_1(
844 llhttp__internal_t* state,
845 const unsigned char* p,
846 const unsigned char* endp) {
847 state->flags |= 64;
848 return 0;
849}
850
851int llhttp__internal__c_update_upgrade(
852 llhttp__internal_t* state,
853 const unsigned char* p,
854 const unsigned char* endp) {
855 state->upgrade = 1;
856 return 0;
857}
858
859int llhttp__internal__c_store_header_state(
860 llhttp__internal_t* state,
861 const unsigned char* p,
862 const unsigned char* endp,
863 int match) {
864 state->header_state = match;
865 return 0;
866}
867
868int llhttp__on_header_field_complete(
869 llhttp__internal_t* s, const unsigned char* p,
870 const unsigned char* endp);
871
872int llhttp__internal__c_load_header_state(
873 llhttp__internal_t* state,
874 const unsigned char* p,
875 const unsigned char* endp) {
876 return state->header_state;
877}
878
879int llhttp__internal__c_test_flags_4(
880 llhttp__internal_t* state,
881 const unsigned char* p,
882 const unsigned char* endp) {
883 return (state->flags & 512) == 512;
884}
885
886int llhttp__internal__c_test_lenient_flags_21(
887 llhttp__internal_t* state,
888 const unsigned char* p,
889 const unsigned char* endp) {
890 return (state->lenient_flags & 2) == 2;
891}
892
893int llhttp__internal__c_or_flags_5(
894 llhttp__internal_t* state,
895 const unsigned char* p,
896 const unsigned char* endp) {
897 state->flags |= 1;
898 return 0;
899}
900
901int llhttp__internal__c_update_header_state(
902 llhttp__internal_t* state,
903 const unsigned char* p,
904 const unsigned char* endp) {
905 state->header_state = 1;
906 return 0;
907}
908
909int llhttp__on_header_value_complete(
910 llhttp__internal_t* s, const unsigned char* p,
911 const unsigned char* endp);
912
913int llhttp__internal__c_or_flags_6(
914 llhttp__internal_t* state,
915 const unsigned char* p,
916 const unsigned char* endp) {
917 state->flags |= 2;
918 return 0;
919}
920
921int llhttp__internal__c_or_flags_7(
922 llhttp__internal_t* state,
923 const unsigned char* p,
924 const unsigned char* endp) {
925 state->flags |= 4;
926 return 0;
927}
928
929int llhttp__internal__c_or_flags_8(
930 llhttp__internal_t* state,
931 const unsigned char* p,
932 const unsigned char* endp) {
933 state->flags |= 8;
934 return 0;
935}
936
937int llhttp__internal__c_update_header_state_3(
938 llhttp__internal_t* state,
939 const unsigned char* p,
940 const unsigned char* endp) {
941 state->header_state = 6;
942 return 0;
943}
944
945int llhttp__internal__c_update_header_state_1(
946 llhttp__internal_t* state,
947 const unsigned char* p,
948 const unsigned char* endp) {
949 state->header_state = 0;
950 return 0;
951}
952
953int llhttp__internal__c_update_header_state_6(
954 llhttp__internal_t* state,
955 const unsigned char* p,
956 const unsigned char* endp) {
957 state->header_state = 5;
958 return 0;
959}
960
961int llhttp__internal__c_update_header_state_7(
962 llhttp__internal_t* state,
963 const unsigned char* p,
964 const unsigned char* endp) {
965 state->header_state = 7;
966 return 0;
967}
968
969int llhttp__internal__c_test_flags_2(
970 llhttp__internal_t* state,
971 const unsigned char* p,
972 const unsigned char* endp) {
973 return (state->flags & 32) == 32;
974}
975
976int llhttp__internal__c_mul_add_content_length_1(
977 llhttp__internal_t* state,
978 const unsigned char* p,
979 const unsigned char* endp,
980 int match) {
981 /* Multiplication overflow */
982 if (state->content_length > 0xffffffffffffffffULL / 10) {
983 return 1;
984 }
985
986 state->content_length *= 10;
987
988 /* Addition overflow */
989 if (match >= 0) {
990 if (state->content_length > 0xffffffffffffffffULL - match) {
991 return 1;
992 }
993 } else {
994 if (state->content_length < 0ULL - match) {
995 return 1;
996 }
997 }
998 state->content_length += match;
999 return 0;
1000}
1001
1002int llhttp__internal__c_or_flags_17(
1003 llhttp__internal_t* state,
1004 const unsigned char* p,
1005 const unsigned char* endp) {
1006 state->flags |= 32;
1007 return 0;
1008}
1009
1010int llhttp__internal__c_test_flags_3(
1011 llhttp__internal_t* state,
1012 const unsigned char* p,
1013 const unsigned char* endp) {
1014 return (state->flags & 8) == 8;
1015}
1016
1017int llhttp__internal__c_test_lenient_flags_19(
1018 llhttp__internal_t* state,
1019 const unsigned char* p,
1020 const unsigned char* endp) {
1021 return (state->lenient_flags & 8) == 8;
1022}
1023
1024int llhttp__internal__c_or_flags_18(
1025 llhttp__internal_t* state,
1026 const unsigned char* p,
1027 const unsigned char* endp) {
1028 state->flags |= 512;
1029 return 0;
1030}
1031
1032int llhttp__internal__c_and_flags(
1033 llhttp__internal_t* state,
1034 const unsigned char* p,
1035 const unsigned char* endp) {
1036 state->flags &= -9;
1037 return 0;
1038}
1039
1040int llhttp__internal__c_update_header_state_8(
1041 llhttp__internal_t* state,
1042 const unsigned char* p,
1043 const unsigned char* endp) {
1044 state->header_state = 8;
1045 return 0;
1046}
1047
1048int llhttp__internal__c_or_flags_20(
1049 llhttp__internal_t* state,
1050 const unsigned char* p,
1051 const unsigned char* endp) {
1052 state->flags |= 16;
1053 return 0;
1054}
1055
1056int llhttp__internal__c_load_method(
1057 llhttp__internal_t* state,
1058 const unsigned char* p,
1059 const unsigned char* endp) {
1060 return state->method;
1061}
1062
1063int llhttp__internal__c_store_http_major(
1064 llhttp__internal_t* state,
1065 const unsigned char* p,
1066 const unsigned char* endp,
1067 int match) {
1068 state->http_major = match;
1069 return 0;
1070}
1071
1072int llhttp__internal__c_store_http_minor(
1073 llhttp__internal_t* state,
1074 const unsigned char* p,
1075 const unsigned char* endp,
1076 int match) {
1077 state->http_minor = match;
1078 return 0;
1079}
1080
1081int llhttp__internal__c_test_lenient_flags_23(
1082 llhttp__internal_t* state,
1083 const unsigned char* p,
1084 const unsigned char* endp) {
1085 return (state->lenient_flags & 16) == 16;
1086}
1087
1088int llhttp__on_version_complete(
1089 llhttp__internal_t* s, const unsigned char* p,
1090 const unsigned char* endp);
1091
1092int llhttp__internal__c_load_http_major(
1093 llhttp__internal_t* state,
1094 const unsigned char* p,
1095 const unsigned char* endp) {
1096 return state->http_major;
1097}
1098
1099int llhttp__internal__c_load_http_minor(
1100 llhttp__internal_t* state,
1101 const unsigned char* p,
1102 const unsigned char* endp) {
1103 return state->http_minor;
1104}
1105
1106int llhttp__internal__c_update_status_code(
1107 llhttp__internal_t* state,
1108 const unsigned char* p,
1109 const unsigned char* endp) {
1110 state->status_code = 0;
1111 return 0;
1112}
1113
1114int llhttp__internal__c_mul_add_status_code(
1115 llhttp__internal_t* state,
1116 const unsigned char* p,
1117 const unsigned char* endp,
1118 int match) {
1119 /* Multiplication overflow */
1120 if (state->status_code > 0xffff / 10) {
1121 return 1;
1122 }
1123
1124 state->status_code *= 10;
1125
1126 /* Addition overflow */
1127 if (match >= 0) {
1128 if (state->status_code > 0xffff - match) {
1129 return 1;
1130 }
1131 } else {
1132 if (state->status_code < 0 - match) {
1133 return 1;
1134 }
1135 }
1136 state->status_code += match;
1137 return 0;
1138}
1139
1140int llhttp__on_status_complete(
1141 llhttp__internal_t* s, const unsigned char* p,
1142 const unsigned char* endp);
1143
1144int llhttp__internal__c_update_type(
1145 llhttp__internal_t* state,
1146 const unsigned char* p,
1147 const unsigned char* endp) {
1148 state->type = 1;
1149 return 0;
1150}
1151
1152int llhttp__internal__c_update_type_1(
1153 llhttp__internal_t* state,
1154 const unsigned char* p,
1155 const unsigned char* endp) {
1156 state->type = 2;
1157 return 0;
1158}
1159
1160int llhttp__internal_init(llhttp__internal_t* state) {
1161 memset(state, 0, sizeof(*state));
1162 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_start;
1163 return 0;
1164}
1165
1166static llparse_state_t llhttp__internal__run(
1167 llhttp__internal_t* state,
1168 const unsigned char* p,
1169 const unsigned char* endp) {
1170 int match;
1171 switch ((llparse_state_t) (intptr_t) state->_current) {
1172 case s_n_llhttp__internal__n_closed:
1173 s_n_llhttp__internal__n_closed: {
1174 if (p == endp) {
1175 return s_n_llhttp__internal__n_closed;
1176 }
1177 switch (*p) {
1178 case 10: {
1179 p++;
1180 goto s_n_llhttp__internal__n_closed;
1181 }
1182 case 13: {
1183 p++;
1184 goto s_n_llhttp__internal__n_closed;
1185 }
1186 default: {
1187 p++;
1188 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_3;
1189 }
1190 }
1191 /* UNREACHABLE */;
1192 abort();
1193 }
1194 case s_n_llhttp__internal__n_invoke_llhttp__after_message_complete:
1195 s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: {
1196 switch (llhttp__after_message_complete(state, p, endp)) {
1197 case 1:
1198 goto s_n_llhttp__internal__n_invoke_update_content_length;
1199 default:
1200 goto s_n_llhttp__internal__n_invoke_update_finish_1;
1201 }
1202 /* UNREACHABLE */;
1203 abort();
1204 }
1205 case s_n_llhttp__internal__n_pause_1:
1206 s_n_llhttp__internal__n_pause_1: {
1207 state->error = 0x16;
1208 state->reason = "Pause on CONNECT/Upgrade";
1209 state->error_pos = (const char*) p;
1210 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
1211 return s_error;
1212 /* UNREACHABLE */;
1213 abort();
1214 }
1215 case s_n_llhttp__internal__n_invoke_is_equal_upgrade:
1216 s_n_llhttp__internal__n_invoke_is_equal_upgrade: {
1217 switch (llhttp__internal__c_is_equal_upgrade(state, p, endp)) {
1218 case 0:
1219 goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
1220 default:
1221 goto s_n_llhttp__internal__n_pause_1;
1222 }
1223 /* UNREACHABLE */;
1224 abort();
1225 }
1226 case s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2:
1227 s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: {
1228 switch (llhttp__on_message_complete(state, p, endp)) {
1229 case 0:
1230 goto s_n_llhttp__internal__n_invoke_is_equal_upgrade;
1231 case 21:
1232 goto s_n_llhttp__internal__n_pause_13;
1233 default:
1234 goto s_n_llhttp__internal__n_error_38;
1235 }
1236 /* UNREACHABLE */;
1237 abort();
1238 }
1239 case s_n_llhttp__internal__n_chunk_data_almost_done_1:
1240 s_n_llhttp__internal__n_chunk_data_almost_done_1: {
1241 if (p == endp) {
1242 return s_n_llhttp__internal__n_chunk_data_almost_done_1;
1243 }
1244 switch (*p) {
1245 case 10: {
1246 p++;
1247 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete;
1248 }
1249 default: {
1250 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7;
1251 }
1252 }
1253 /* UNREACHABLE */;
1254 abort();
1255 }
1256 case s_n_llhttp__internal__n_chunk_data_almost_done:
1257 s_n_llhttp__internal__n_chunk_data_almost_done: {
1258 if (p == endp) {
1259 return s_n_llhttp__internal__n_chunk_data_almost_done;
1260 }
1261 switch (*p) {
1262 case 10: {
1263 p++;
1264 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_6;
1265 }
1266 case 13: {
1267 p++;
1268 goto s_n_llhttp__internal__n_chunk_data_almost_done_1;
1269 }
1270 default: {
1271 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7;
1272 }
1273 }
1274 /* UNREACHABLE */;
1275 abort();
1276 }
1277 case s_n_llhttp__internal__n_consume_content_length:
1278 s_n_llhttp__internal__n_consume_content_length: {
1279 size_t avail;
1280 uint64_t need;
1281
1282 avail = endp - p;
1283 need = state->content_length;
1284 if (avail >= need) {
1285 p += need;
1286 state->content_length = 0;
1287 goto s_n_llhttp__internal__n_span_end_llhttp__on_body;
1288 }
1289
1290 state->content_length -= avail;
1291 return s_n_llhttp__internal__n_consume_content_length;
1292 /* UNREACHABLE */;
1293 abort();
1294 }
1295 case s_n_llhttp__internal__n_span_start_llhttp__on_body:
1296 s_n_llhttp__internal__n_span_start_llhttp__on_body: {
1297 if (p == endp) {
1298 return s_n_llhttp__internal__n_span_start_llhttp__on_body;
1299 }
1300 state->_span_pos0 = (void*) p;
1301 state->_span_cb0 = llhttp__on_body;
1302 goto s_n_llhttp__internal__n_consume_content_length;
1303 /* UNREACHABLE */;
1304 abort();
1305 }
1306 case s_n_llhttp__internal__n_invoke_is_equal_content_length:
1307 s_n_llhttp__internal__n_invoke_is_equal_content_length: {
1308 switch (llhttp__internal__c_is_equal_content_length(state, p, endp)) {
1309 case 0:
1310 goto s_n_llhttp__internal__n_span_start_llhttp__on_body;
1311 default:
1312 goto s_n_llhttp__internal__n_invoke_or_flags;
1313 }
1314 /* UNREACHABLE */;
1315 abort();
1316 }
1317 case s_n_llhttp__internal__n_chunk_size_almost_done:
1318 s_n_llhttp__internal__n_chunk_size_almost_done: {
1319 if (p == endp) {
1320 return s_n_llhttp__internal__n_chunk_size_almost_done;
1321 }
1322 switch (*p) {
1323 case 10: {
1324 p++;
1325 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header;
1326 }
1327 default: {
1328 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_8;
1329 }
1330 }
1331 /* UNREACHABLE */;
1332 abort();
1333 }
1334 case s_n_llhttp__internal__n_invoke_test_lenient_flags_9:
1335 s_n_llhttp__internal__n_invoke_test_lenient_flags_9: {
1336 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
1337 case 1:
1338 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1339 default:
1340 goto s_n_llhttp__internal__n_error_20;
1341 }
1342 /* UNREACHABLE */;
1343 abort();
1344 }
1345 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete:
1346 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete: {
1347 switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) {
1348 case 0:
1349 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_9;
1350 case 21:
1351 goto s_n_llhttp__internal__n_pause_5;
1352 default:
1353 goto s_n_llhttp__internal__n_error_19;
1354 }
1355 /* UNREACHABLE */;
1356 abort();
1357 }
1358 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1:
1359 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1: {
1360 switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) {
1361 case 0:
1362 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1363 case 21:
1364 goto s_n_llhttp__internal__n_pause_6;
1365 default:
1366 goto s_n_llhttp__internal__n_error_21;
1367 }
1368 /* UNREACHABLE */;
1369 abort();
1370 }
1371 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2:
1372 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: {
1373 switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) {
1374 case 0:
1375 goto s_n_llhttp__internal__n_chunk_extensions;
1376 case 21:
1377 goto s_n_llhttp__internal__n_pause_7;
1378 default:
1379 goto s_n_llhttp__internal__n_error_22;
1380 }
1381 /* UNREACHABLE */;
1382 abort();
1383 }
1384 case s_n_llhttp__internal__n_invoke_test_lenient_flags_10:
1385 s_n_llhttp__internal__n_invoke_test_lenient_flags_10: {
1386 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
1387 case 1:
1388 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1389 default:
1390 goto s_n_llhttp__internal__n_error_25;
1391 }
1392 /* UNREACHABLE */;
1393 abort();
1394 }
1395 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete:
1396 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete: {
1397 switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) {
1398 case 0:
1399 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_10;
1400 case 21:
1401 goto s_n_llhttp__internal__n_pause_8;
1402 default:
1403 goto s_n_llhttp__internal__n_error_24;
1404 }
1405 /* UNREACHABLE */;
1406 abort();
1407 }
1408 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1:
1409 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: {
1410 switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) {
1411 case 0:
1412 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1413 case 21:
1414 goto s_n_llhttp__internal__n_pause_9;
1415 default:
1416 goto s_n_llhttp__internal__n_error_26;
1417 }
1418 /* UNREACHABLE */;
1419 abort();
1420 }
1421 case s_n_llhttp__internal__n_chunk_extension_quoted_value_done:
1422 s_n_llhttp__internal__n_chunk_extension_quoted_value_done: {
1423 if (p == endp) {
1424 return s_n_llhttp__internal__n_chunk_extension_quoted_value_done;
1425 }
1426 switch (*p) {
1427 case 10: {
1428 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_11;
1429 }
1430 case 13: {
1431 p++;
1432 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1433 }
1434 case ';': {
1435 p++;
1436 goto s_n_llhttp__internal__n_chunk_extensions;
1437 }
1438 default: {
1439 goto s_n_llhttp__internal__n_error_29;
1440 }
1441 }
1442 /* UNREACHABLE */;
1443 abort();
1444 }
1445 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2:
1446 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: {
1447 switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) {
1448 case 0:
1449 goto s_n_llhttp__internal__n_chunk_extension_quoted_value_done;
1450 case 21:
1451 goto s_n_llhttp__internal__n_pause_10;
1452 default:
1453 goto s_n_llhttp__internal__n_error_27;
1454 }
1455 /* UNREACHABLE */;
1456 abort();
1457 }
1458 case s_n_llhttp__internal__n_error_30:
1459 s_n_llhttp__internal__n_error_30: {
1460 state->error = 0x2;
1461 state->reason = "Invalid quoted-pair in chunk extensions quoted value";
1462 state->error_pos = (const char*) p;
1463 state->_current = (void*) (intptr_t) s_error;
1464 return s_error;
1465 /* UNREACHABLE */;
1466 abort();
1467 }
1468 case s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair:
1469 s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair: {
1470 static uint8_t lookup_table[] = {
1471 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1487 };
1488 if (p == endp) {
1489 return s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair;
1490 }
1491 switch (lookup_table[(uint8_t) *p]) {
1492 case 1: {
1493 p++;
1494 goto s_n_llhttp__internal__n_chunk_extension_quoted_value;
1495 }
1496 default: {
1497 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3;
1498 }
1499 }
1500 /* UNREACHABLE */;
1501 abort();
1502 }
1503 case s_n_llhttp__internal__n_error_31:
1504 s_n_llhttp__internal__n_error_31: {
1505 state->error = 0x2;
1506 state->reason = "Invalid character in chunk extensions quoted value";
1507 state->error_pos = (const char*) p;
1508 state->_current = (void*) (intptr_t) s_error;
1509 return s_error;
1510 /* UNREACHABLE */;
1511 abort();
1512 }
1513 case s_n_llhttp__internal__n_chunk_extension_quoted_value:
1514 s_n_llhttp__internal__n_chunk_extension_quoted_value: {
1515 static uint8_t lookup_table[] = {
1516 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1518 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
1522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1524 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1526 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1527 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1528 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1529 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1530 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1531 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1532 };
1533 if (p == endp) {
1534 return s_n_llhttp__internal__n_chunk_extension_quoted_value;
1535 }
1536 switch (lookup_table[(uint8_t) *p]) {
1537 case 1: {
1538 p++;
1539 goto s_n_llhttp__internal__n_chunk_extension_quoted_value;
1540 }
1541 case 2: {
1542 p++;
1543 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2;
1544 }
1545 case 3: {
1546 p++;
1547 goto s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair;
1548 }
1549 default: {
1550 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4;
1551 }
1552 }
1553 /* UNREACHABLE */;
1554 abort();
1555 }
1556 case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3:
1557 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3: {
1558 switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) {
1559 case 0:
1560 goto s_n_llhttp__internal__n_chunk_extensions;
1561 case 21:
1562 goto s_n_llhttp__internal__n_pause_11;
1563 default:
1564 goto s_n_llhttp__internal__n_error_32;
1565 }
1566 /* UNREACHABLE */;
1567 abort();
1568 }
1569 case s_n_llhttp__internal__n_error_33:
1570 s_n_llhttp__internal__n_error_33: {
1571 state->error = 0x2;
1572 state->reason = "Invalid character in chunk extensions value";
1573 state->error_pos = (const char*) p;
1574 state->_current = (void*) (intptr_t) s_error;
1575 return s_error;
1576 /* UNREACHABLE */;
1577 abort();
1578 }
1579 case s_n_llhttp__internal__n_chunk_extension_value:
1580 s_n_llhttp__internal__n_chunk_extension_value: {
1581 static uint8_t lookup_table[] = {
1582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
1583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1584 0, 3, 4, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0,
1585 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 5, 0, 0, 0, 0,
1586 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1587 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3,
1588 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1589 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0,
1590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1594 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,
1596 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
1598 };
1599 if (p == endp) {
1600 return s_n_llhttp__internal__n_chunk_extension_value;
1601 }
1602 switch (lookup_table[(uint8_t) *p]) {
1603 case 1: {
1604 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value;
1605 }
1606 case 2: {
1607 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1;
1608 }
1609 case 3: {
1610 p++;
1611 goto s_n_llhttp__internal__n_chunk_extension_value;
1612 }
1613 case 4: {
1614 p++;
1615 goto s_n_llhttp__internal__n_chunk_extension_quoted_value;
1616 }
1617 case 5: {
1618 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5;
1619 }
1620 default: {
1621 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6;
1622 }
1623 }
1624 /* UNREACHABLE */;
1625 abort();
1626 }
1627 case s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value:
1628 s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value: {
1629 if (p == endp) {
1630 return s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value;
1631 }
1632 state->_span_pos0 = (void*) p;
1633 state->_span_cb0 = llhttp__on_chunk_extension_value;
1634 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3;
1635 /* UNREACHABLE */;
1636 abort();
1637 }
1638 case s_n_llhttp__internal__n_error_34:
1639 s_n_llhttp__internal__n_error_34: {
1640 state->error = 0x2;
1641 state->reason = "Invalid character in chunk extensions name";
1642 state->error_pos = (const char*) p;
1643 state->_current = (void*) (intptr_t) s_error;
1644 return s_error;
1645 /* UNREACHABLE */;
1646 abort();
1647 }
1648 case s_n_llhttp__internal__n_chunk_extension_name:
1649 s_n_llhttp__internal__n_chunk_extension_name: {
1650 static uint8_t lookup_table[] = {
1651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
1652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1653 0, 3, 0, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0,
1654 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 5, 0, 0,
1655 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1656 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3,
1657 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1658 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0,
1659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1663 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,
1665 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
1667 };
1668 if (p == endp) {
1669 return s_n_llhttp__internal__n_chunk_extension_name;
1670 }
1671 switch (lookup_table[(uint8_t) *p]) {
1672 case 1: {
1673 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name;
1674 }
1675 case 2: {
1676 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1;
1677 }
1678 case 3: {
1679 p++;
1680 goto s_n_llhttp__internal__n_chunk_extension_name;
1681 }
1682 case 4: {
1683 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2;
1684 }
1685 case 5: {
1686 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3;
1687 }
1688 default: {
1689 goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4;
1690 }
1691 }
1692 /* UNREACHABLE */;
1693 abort();
1694 }
1695 case s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name:
1696 s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name: {
1697 if (p == endp) {
1698 return s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name;
1699 }
1700 state->_span_pos0 = (void*) p;
1701 state->_span_cb0 = llhttp__on_chunk_extension_name;
1702 goto s_n_llhttp__internal__n_chunk_extension_name;
1703 /* UNREACHABLE */;
1704 abort();
1705 }
1706 case s_n_llhttp__internal__n_chunk_extensions:
1707 s_n_llhttp__internal__n_chunk_extensions: {
1708 if (p == endp) {
1709 return s_n_llhttp__internal__n_chunk_extensions;
1710 }
1711 switch (*p) {
1712 case 13: {
1713 p++;
1714 goto s_n_llhttp__internal__n_error_17;
1715 }
1716 case ' ': {
1717 p++;
1718 goto s_n_llhttp__internal__n_error_18;
1719 }
1720 default: {
1721 goto s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name;
1722 }
1723 }
1724 /* UNREACHABLE */;
1725 abort();
1726 }
1727 case s_n_llhttp__internal__n_chunk_size_otherwise:
1728 s_n_llhttp__internal__n_chunk_size_otherwise: {
1729 if (p == endp) {
1730 return s_n_llhttp__internal__n_chunk_size_otherwise;
1731 }
1732 switch (*p) {
1733 case 9: {
1734 p++;
1735 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4;
1736 }
1737 case 10: {
1738 p++;
1739 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_5;
1740 }
1741 case 13: {
1742 p++;
1743 goto s_n_llhttp__internal__n_chunk_size_almost_done;
1744 }
1745 case ' ': {
1746 p++;
1747 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4;
1748 }
1749 case ';': {
1750 p++;
1751 goto s_n_llhttp__internal__n_chunk_extensions;
1752 }
1753 default: {
1754 goto s_n_llhttp__internal__n_error_35;
1755 }
1756 }
1757 /* UNREACHABLE */;
1758 abort();
1759 }
1760 case s_n_llhttp__internal__n_chunk_size:
1761 s_n_llhttp__internal__n_chunk_size: {
1762 if (p == endp) {
1763 return s_n_llhttp__internal__n_chunk_size;
1764 }
1765 switch (*p) {
1766 case '0': {
1767 p++;
1768 match = 0;
1769 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1770 }
1771 case '1': {
1772 p++;
1773 match = 1;
1774 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1775 }
1776 case '2': {
1777 p++;
1778 match = 2;
1779 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1780 }
1781 case '3': {
1782 p++;
1783 match = 3;
1784 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1785 }
1786 case '4': {
1787 p++;
1788 match = 4;
1789 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1790 }
1791 case '5': {
1792 p++;
1793 match = 5;
1794 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1795 }
1796 case '6': {
1797 p++;
1798 match = 6;
1799 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1800 }
1801 case '7': {
1802 p++;
1803 match = 7;
1804 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1805 }
1806 case '8': {
1807 p++;
1808 match = 8;
1809 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1810 }
1811 case '9': {
1812 p++;
1813 match = 9;
1814 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1815 }
1816 case 'A': {
1817 p++;
1818 match = 10;
1819 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1820 }
1821 case 'B': {
1822 p++;
1823 match = 11;
1824 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1825 }
1826 case 'C': {
1827 p++;
1828 match = 12;
1829 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1830 }
1831 case 'D': {
1832 p++;
1833 match = 13;
1834 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1835 }
1836 case 'E': {
1837 p++;
1838 match = 14;
1839 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1840 }
1841 case 'F': {
1842 p++;
1843 match = 15;
1844 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1845 }
1846 case 'a': {
1847 p++;
1848 match = 10;
1849 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1850 }
1851 case 'b': {
1852 p++;
1853 match = 11;
1854 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1855 }
1856 case 'c': {
1857 p++;
1858 match = 12;
1859 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1860 }
1861 case 'd': {
1862 p++;
1863 match = 13;
1864 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1865 }
1866 case 'e': {
1867 p++;
1868 match = 14;
1869 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1870 }
1871 case 'f': {
1872 p++;
1873 match = 15;
1874 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1875 }
1876 default: {
1877 goto s_n_llhttp__internal__n_chunk_size_otherwise;
1878 }
1879 }
1880 /* UNREACHABLE */;
1881 abort();
1882 }
1883 case s_n_llhttp__internal__n_chunk_size_digit:
1884 s_n_llhttp__internal__n_chunk_size_digit: {
1885 if (p == endp) {
1886 return s_n_llhttp__internal__n_chunk_size_digit;
1887 }
1888 switch (*p) {
1889 case '0': {
1890 p++;
1891 match = 0;
1892 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1893 }
1894 case '1': {
1895 p++;
1896 match = 1;
1897 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1898 }
1899 case '2': {
1900 p++;
1901 match = 2;
1902 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1903 }
1904 case '3': {
1905 p++;
1906 match = 3;
1907 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1908 }
1909 case '4': {
1910 p++;
1911 match = 4;
1912 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1913 }
1914 case '5': {
1915 p++;
1916 match = 5;
1917 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1918 }
1919 case '6': {
1920 p++;
1921 match = 6;
1922 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1923 }
1924 case '7': {
1925 p++;
1926 match = 7;
1927 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1928 }
1929 case '8': {
1930 p++;
1931 match = 8;
1932 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1933 }
1934 case '9': {
1935 p++;
1936 match = 9;
1937 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1938 }
1939 case 'A': {
1940 p++;
1941 match = 10;
1942 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1943 }
1944 case 'B': {
1945 p++;
1946 match = 11;
1947 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1948 }
1949 case 'C': {
1950 p++;
1951 match = 12;
1952 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1953 }
1954 case 'D': {
1955 p++;
1956 match = 13;
1957 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1958 }
1959 case 'E': {
1960 p++;
1961 match = 14;
1962 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1963 }
1964 case 'F': {
1965 p++;
1966 match = 15;
1967 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1968 }
1969 case 'a': {
1970 p++;
1971 match = 10;
1972 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1973 }
1974 case 'b': {
1975 p++;
1976 match = 11;
1977 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1978 }
1979 case 'c': {
1980 p++;
1981 match = 12;
1982 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1983 }
1984 case 'd': {
1985 p++;
1986 match = 13;
1987 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1988 }
1989 case 'e': {
1990 p++;
1991 match = 14;
1992 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1993 }
1994 case 'f': {
1995 p++;
1996 match = 15;
1997 goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1998 }
1999 default: {
2000 goto s_n_llhttp__internal__n_error_37;
2001 }
2002 }
2003 /* UNREACHABLE */;
2004 abort();
2005 }
2006 case s_n_llhttp__internal__n_invoke_update_content_length_1:
2007 s_n_llhttp__internal__n_invoke_update_content_length_1: {
2008 switch (llhttp__internal__c_update_content_length(state, p, endp)) {
2009 default:
2010 goto s_n_llhttp__internal__n_chunk_size_digit;
2011 }
2012 /* UNREACHABLE */;
2013 abort();
2014 }
2015 case s_n_llhttp__internal__n_consume_content_length_1:
2016 s_n_llhttp__internal__n_consume_content_length_1: {
2017 size_t avail;
2018 uint64_t need;
2019
2020 avail = endp - p;
2021 need = state->content_length;
2022 if (avail >= need) {
2023 p += need;
2024 state->content_length = 0;
2025 goto s_n_llhttp__internal__n_span_end_llhttp__on_body_1;
2026 }
2027
2028 state->content_length -= avail;
2029 return s_n_llhttp__internal__n_consume_content_length_1;
2030 /* UNREACHABLE */;
2031 abort();
2032 }
2033 case s_n_llhttp__internal__n_span_start_llhttp__on_body_1:
2034 s_n_llhttp__internal__n_span_start_llhttp__on_body_1: {
2035 if (p == endp) {
2036 return s_n_llhttp__internal__n_span_start_llhttp__on_body_1;
2037 }
2038 state->_span_pos0 = (void*) p;
2039 state->_span_cb0 = llhttp__on_body;
2040 goto s_n_llhttp__internal__n_consume_content_length_1;
2041 /* UNREACHABLE */;
2042 abort();
2043 }
2044 case s_n_llhttp__internal__n_eof:
2045 s_n_llhttp__internal__n_eof: {
2046 if (p == endp) {
2047 return s_n_llhttp__internal__n_eof;
2048 }
2049 p++;
2050 goto s_n_llhttp__internal__n_eof;
2051 /* UNREACHABLE */;
2052 abort();
2053 }
2054 case s_n_llhttp__internal__n_span_start_llhttp__on_body_2:
2055 s_n_llhttp__internal__n_span_start_llhttp__on_body_2: {
2056 if (p == endp) {
2057 return s_n_llhttp__internal__n_span_start_llhttp__on_body_2;
2058 }
2059 state->_span_pos0 = (void*) p;
2060 state->_span_cb0 = llhttp__on_body;
2061 goto s_n_llhttp__internal__n_eof;
2062 /* UNREACHABLE */;
2063 abort();
2064 }
2065 case s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete:
2066 s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete: {
2067 switch (llhttp__after_headers_complete(state, p, endp)) {
2068 case 1:
2069 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1;
2070 case 2:
2071 goto s_n_llhttp__internal__n_invoke_update_content_length_1;
2072 case 3:
2073 goto s_n_llhttp__internal__n_span_start_llhttp__on_body_1;
2074 case 4:
2075 goto s_n_llhttp__internal__n_invoke_update_finish_3;
2076 case 5:
2077 goto s_n_llhttp__internal__n_error_39;
2078 default:
2079 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete;
2080 }
2081 /* UNREACHABLE */;
2082 abort();
2083 }
2084 case s_n_llhttp__internal__n_error_5:
2085 s_n_llhttp__internal__n_error_5: {
2086 state->error = 0xa;
2087 state->reason = "Invalid header field char";
2088 state->error_pos = (const char*) p;
2089 state->_current = (void*) (intptr_t) s_error;
2090 return s_error;
2091 /* UNREACHABLE */;
2092 abort();
2093 }
2094 case s_n_llhttp__internal__n_headers_almost_done:
2095 s_n_llhttp__internal__n_headers_almost_done: {
2096 if (p == endp) {
2097 return s_n_llhttp__internal__n_headers_almost_done;
2098 }
2099 switch (*p) {
2100 case 10: {
2101 p++;
2102 goto s_n_llhttp__internal__n_invoke_test_flags_1;
2103 }
2104 default: {
2105 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_12;
2106 }
2107 }
2108 /* UNREACHABLE */;
2109 abort();
2110 }
2111 case s_n_llhttp__internal__n_header_field_colon_discard_ws:
2112 s_n_llhttp__internal__n_header_field_colon_discard_ws: {
2113 if (p == endp) {
2114 return s_n_llhttp__internal__n_header_field_colon_discard_ws;
2115 }
2116 switch (*p) {
2117 case ' ': {
2118 p++;
2119 goto s_n_llhttp__internal__n_header_field_colon_discard_ws;
2120 }
2121 default: {
2122 goto s_n_llhttp__internal__n_header_field_colon;
2123 }
2124 }
2125 /* UNREACHABLE */;
2126 abort();
2127 }
2128 case s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete:
2129 s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: {
2130 switch (llhttp__on_header_value_complete(state, p, endp)) {
2131 case 0:
2132 goto s_n_llhttp__internal__n_header_field_start;
2133 case 21:
2134 goto s_n_llhttp__internal__n_pause_18;
2135 default:
2136 goto s_n_llhttp__internal__n_error_47;
2137 }
2138 /* UNREACHABLE */;
2139 abort();
2140 }
2141 case s_n_llhttp__internal__n_span_start_llhttp__on_header_value:
2142 s_n_llhttp__internal__n_span_start_llhttp__on_header_value: {
2143 if (p == endp) {
2144 return s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
2145 }
2146 state->_span_pos0 = (void*) p;
2147 state->_span_cb0 = llhttp__on_header_value;
2148 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value;
2149 /* UNREACHABLE */;
2150 abort();
2151 }
2152 case s_n_llhttp__internal__n_header_value_discard_lws:
2153 s_n_llhttp__internal__n_header_value_discard_lws: {
2154 if (p == endp) {
2155 return s_n_llhttp__internal__n_header_value_discard_lws;
2156 }
2157 switch (*p) {
2158 case 9: {
2159 p++;
2160 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15;
2161 }
2162 case ' ': {
2163 p++;
2164 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15;
2165 }
2166 default: {
2167 goto s_n_llhttp__internal__n_invoke_load_header_state_1;
2168 }
2169 }
2170 /* UNREACHABLE */;
2171 abort();
2172 }
2173 case s_n_llhttp__internal__n_header_value_discard_ws_almost_done:
2174 s_n_llhttp__internal__n_header_value_discard_ws_almost_done: {
2175 if (p == endp) {
2176 return s_n_llhttp__internal__n_header_value_discard_ws_almost_done;
2177 }
2178 switch (*p) {
2179 case 10: {
2180 p++;
2181 goto s_n_llhttp__internal__n_header_value_discard_lws;
2182 }
2183 default: {
2184 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_16;
2185 }
2186 }
2187 /* UNREACHABLE */;
2188 abort();
2189 }
2190 case s_n_llhttp__internal__n_header_value_lws:
2191 s_n_llhttp__internal__n_header_value_lws: {
2192 if (p == endp) {
2193 return s_n_llhttp__internal__n_header_value_lws;
2194 }
2195 switch (*p) {
2196 case 9: {
2197 goto s_n_llhttp__internal__n_invoke_load_header_state_4;
2198 }
2199 case ' ': {
2200 goto s_n_llhttp__internal__n_invoke_load_header_state_4;
2201 }
2202 default: {
2203 goto s_n_llhttp__internal__n_invoke_load_header_state_5;
2204 }
2205 }
2206 /* UNREACHABLE */;
2207 abort();
2208 }
2209 case s_n_llhttp__internal__n_header_value_almost_done:
2210 s_n_llhttp__internal__n_header_value_almost_done: {
2211 if (p == endp) {
2212 return s_n_llhttp__internal__n_header_value_almost_done;
2213 }
2214 switch (*p) {
2215 case 10: {
2216 p++;
2217 goto s_n_llhttp__internal__n_header_value_lws;
2218 }
2219 default: {
2220 goto s_n_llhttp__internal__n_error_51;
2221 }
2222 }
2223 /* UNREACHABLE */;
2224 abort();
2225 }
2226 case s_n_llhttp__internal__n_invoke_test_lenient_flags_17:
2227 s_n_llhttp__internal__n_invoke_test_lenient_flags_17: {
2228 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
2229 case 1:
2230 goto s_n_llhttp__internal__n_header_value_almost_done;
2231 default:
2232 goto s_n_llhttp__internal__n_error_50;
2233 }
2234 /* UNREACHABLE */;
2235 abort();
2236 }
2237 case s_n_llhttp__internal__n_header_value_lenient:
2238 s_n_llhttp__internal__n_header_value_lenient: {
2239 if (p == endp) {
2240 return s_n_llhttp__internal__n_header_value_lenient;
2241 }
2242 switch (*p) {
2243 case 10: {
2244 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
2245 }
2246 case 13: {
2247 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
2248 }
2249 default: {
2250 p++;
2251 goto s_n_llhttp__internal__n_header_value_lenient;
2252 }
2253 }
2254 /* UNREACHABLE */;
2255 abort();
2256 }
2257 case s_n_llhttp__internal__n_error_52:
2258 s_n_llhttp__internal__n_error_52: {
2259 state->error = 0xa;
2260 state->reason = "Invalid header value char";
2261 state->error_pos = (const char*) p;
2262 state->_current = (void*) (intptr_t) s_error;
2263 return s_error;
2264 /* UNREACHABLE */;
2265 abort();
2266 }
2267 case s_n_llhttp__internal__n_header_value_otherwise:
2268 s_n_llhttp__internal__n_header_value_otherwise: {
2269 if (p == endp) {
2270 return s_n_llhttp__internal__n_header_value_otherwise;
2271 }
2272 switch (*p) {
2273 case 10: {
2274 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
2275 }
2276 case 13: {
2277 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
2278 }
2279 default: {
2280 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_18;
2281 }
2282 }
2283 /* UNREACHABLE */;
2284 abort();
2285 }
2286 case s_n_llhttp__internal__n_header_value_connection_token:
2287 s_n_llhttp__internal__n_header_value_connection_token: {
2288 static uint8_t lookup_table[] = {
2289 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
2290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2291 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
2292 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2293 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2294 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2295 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2296 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2297 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2298 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2299 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2300 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2301 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2302 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2304 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2305 };
2306 if (p == endp) {
2307 return s_n_llhttp__internal__n_header_value_connection_token;
2308 }
2309 switch (lookup_table[(uint8_t) *p]) {
2310 case 1: {
2311 p++;
2312 goto s_n_llhttp__internal__n_header_value_connection_token;
2313 }
2314 case 2: {
2315 p++;
2316 goto s_n_llhttp__internal__n_header_value_connection;
2317 }
2318 default: {
2319 goto s_n_llhttp__internal__n_header_value_otherwise;
2320 }
2321 }
2322 /* UNREACHABLE */;
2323 abort();
2324 }
2325 case s_n_llhttp__internal__n_header_value_connection_ws:
2326 s_n_llhttp__internal__n_header_value_connection_ws: {
2327 if (p == endp) {
2328 return s_n_llhttp__internal__n_header_value_connection_ws;
2329 }
2330 switch (*p) {
2331 case 10: {
2332 goto s_n_llhttp__internal__n_header_value_otherwise;
2333 }
2334 case 13: {
2335 goto s_n_llhttp__internal__n_header_value_otherwise;
2336 }
2337 case ' ': {
2338 p++;
2339 goto s_n_llhttp__internal__n_header_value_connection_ws;
2340 }
2341 case ',': {
2342 p++;
2343 goto s_n_llhttp__internal__n_invoke_load_header_state_6;
2344 }
2345 default: {
2346 goto s_n_llhttp__internal__n_invoke_update_header_state_5;
2347 }
2348 }
2349 /* UNREACHABLE */;
2350 abort();
2351 }
2352 case s_n_llhttp__internal__n_header_value_connection_1:
2353 s_n_llhttp__internal__n_header_value_connection_1: {
2354 llparse_match_t match_seq;
2355
2356 if (p == endp) {
2357 return s_n_llhttp__internal__n_header_value_connection_1;
2358 }
2359 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 4);
2360 p = match_seq.current;
2361 switch (match_seq.status) {
2362 case kMatchComplete: {
2363 p++;
2364 goto s_n_llhttp__internal__n_invoke_update_header_state_3;
2365 }
2366 case kMatchPause: {
2367 return s_n_llhttp__internal__n_header_value_connection_1;
2368 }
2369 case kMatchMismatch: {
2370 goto s_n_llhttp__internal__n_header_value_connection_token;
2371 }
2372 }
2373 /* UNREACHABLE */;
2374 abort();
2375 }
2376 case s_n_llhttp__internal__n_header_value_connection_2:
2377 s_n_llhttp__internal__n_header_value_connection_2: {
2378 llparse_match_t match_seq;
2379
2380 if (p == endp) {
2381 return s_n_llhttp__internal__n_header_value_connection_2;
2382 }
2383 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 9);
2384 p = match_seq.current;
2385 switch (match_seq.status) {
2386 case kMatchComplete: {
2387 p++;
2388 goto s_n_llhttp__internal__n_invoke_update_header_state_6;
2389 }
2390 case kMatchPause: {
2391 return s_n_llhttp__internal__n_header_value_connection_2;
2392 }
2393 case kMatchMismatch: {
2394 goto s_n_llhttp__internal__n_header_value_connection_token;
2395 }
2396 }
2397 /* UNREACHABLE */;
2398 abort();
2399 }
2400 case s_n_llhttp__internal__n_header_value_connection_3:
2401 s_n_llhttp__internal__n_header_value_connection_3: {
2402 llparse_match_t match_seq;
2403
2404 if (p == endp) {
2405 return s_n_llhttp__internal__n_header_value_connection_3;
2406 }
2407 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 6);
2408 p = match_seq.current;
2409 switch (match_seq.status) {
2410 case kMatchComplete: {
2411 p++;
2412 goto s_n_llhttp__internal__n_invoke_update_header_state_7;
2413 }
2414 case kMatchPause: {
2415 return s_n_llhttp__internal__n_header_value_connection_3;
2416 }
2417 case kMatchMismatch: {
2418 goto s_n_llhttp__internal__n_header_value_connection_token;
2419 }
2420 }
2421 /* UNREACHABLE */;
2422 abort();
2423 }
2424 case s_n_llhttp__internal__n_header_value_connection:
2425 s_n_llhttp__internal__n_header_value_connection: {
2426 if (p == endp) {
2427 return s_n_llhttp__internal__n_header_value_connection;
2428 }
2429 switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) {
2430 case 9: {
2431 p++;
2432 goto s_n_llhttp__internal__n_header_value_connection;
2433 }
2434 case ' ': {
2435 p++;
2436 goto s_n_llhttp__internal__n_header_value_connection;
2437 }
2438 case 'c': {
2439 p++;
2440 goto s_n_llhttp__internal__n_header_value_connection_1;
2441 }
2442 case 'k': {
2443 p++;
2444 goto s_n_llhttp__internal__n_header_value_connection_2;
2445 }
2446 case 'u': {
2447 p++;
2448 goto s_n_llhttp__internal__n_header_value_connection_3;
2449 }
2450 default: {
2451 goto s_n_llhttp__internal__n_header_value_connection_token;
2452 }
2453 }
2454 /* UNREACHABLE */;
2455 abort();
2456 }
2457 case s_n_llhttp__internal__n_error_54:
2458 s_n_llhttp__internal__n_error_54: {
2459 state->error = 0xb;
2460 state->reason = "Content-Length overflow";
2461 state->error_pos = (const char*) p;
2462 state->_current = (void*) (intptr_t) s_error;
2463 return s_error;
2464 /* UNREACHABLE */;
2465 abort();
2466 }
2467 case s_n_llhttp__internal__n_error_55:
2468 s_n_llhttp__internal__n_error_55: {
2469 state->error = 0xb;
2470 state->reason = "Invalid character in Content-Length";
2471 state->error_pos = (const char*) p;
2472 state->_current = (void*) (intptr_t) s_error;
2473 return s_error;
2474 /* UNREACHABLE */;
2475 abort();
2476 }
2477 case s_n_llhttp__internal__n_header_value_content_length_ws:
2478 s_n_llhttp__internal__n_header_value_content_length_ws: {
2479 if (p == endp) {
2480 return s_n_llhttp__internal__n_header_value_content_length_ws;
2481 }
2482 switch (*p) {
2483 case 10: {
2484 goto s_n_llhttp__internal__n_invoke_or_flags_17;
2485 }
2486 case 13: {
2487 goto s_n_llhttp__internal__n_invoke_or_flags_17;
2488 }
2489 case ' ': {
2490 p++;
2491 goto s_n_llhttp__internal__n_header_value_content_length_ws;
2492 }
2493 default: {
2494 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7;
2495 }
2496 }
2497 /* UNREACHABLE */;
2498 abort();
2499 }
2500 case s_n_llhttp__internal__n_header_value_content_length:
2501 s_n_llhttp__internal__n_header_value_content_length: {
2502 if (p == endp) {
2503 return s_n_llhttp__internal__n_header_value_content_length;
2504 }
2505 switch (*p) {
2506 case '0': {
2507 p++;
2508 match = 0;
2509 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2510 }
2511 case '1': {
2512 p++;
2513 match = 1;
2514 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2515 }
2516 case '2': {
2517 p++;
2518 match = 2;
2519 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2520 }
2521 case '3': {
2522 p++;
2523 match = 3;
2524 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2525 }
2526 case '4': {
2527 p++;
2528 match = 4;
2529 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2530 }
2531 case '5': {
2532 p++;
2533 match = 5;
2534 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2535 }
2536 case '6': {
2537 p++;
2538 match = 6;
2539 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2540 }
2541 case '7': {
2542 p++;
2543 match = 7;
2544 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2545 }
2546 case '8': {
2547 p++;
2548 match = 8;
2549 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2550 }
2551 case '9': {
2552 p++;
2553 match = 9;
2554 goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
2555 }
2556 default: {
2557 goto s_n_llhttp__internal__n_header_value_content_length_ws;
2558 }
2559 }
2560 /* UNREACHABLE */;
2561 abort();
2562 }
2563 case s_n_llhttp__internal__n_error_57:
2564 s_n_llhttp__internal__n_error_57: {
2565 state->error = 0xf;
2566 state->reason = "Invalid `Transfer-Encoding` header value";
2567 state->error_pos = (const char*) p;
2568 state->_current = (void*) (intptr_t) s_error;
2569 return s_error;
2570 /* UNREACHABLE */;
2571 abort();
2572 }
2573 case s_n_llhttp__internal__n_error_56:
2574 s_n_llhttp__internal__n_error_56: {
2575 state->error = 0xf;
2576 state->reason = "Invalid `Transfer-Encoding` header value";
2577 state->error_pos = (const char*) p;
2578 state->_current = (void*) (intptr_t) s_error;
2579 return s_error;
2580 /* UNREACHABLE */;
2581 abort();
2582 }
2583 case s_n_llhttp__internal__n_header_value_te_token_ows:
2584 s_n_llhttp__internal__n_header_value_te_token_ows: {
2585 if (p == endp) {
2586 return s_n_llhttp__internal__n_header_value_te_token_ows;
2587 }
2588 switch (*p) {
2589 case 9: {
2590 p++;
2591 goto s_n_llhttp__internal__n_header_value_te_token_ows;
2592 }
2593 case ' ': {
2594 p++;
2595 goto s_n_llhttp__internal__n_header_value_te_token_ows;
2596 }
2597 default: {
2598 goto s_n_llhttp__internal__n_header_value_te_chunked;
2599 }
2600 }
2601 /* UNREACHABLE */;
2602 abort();
2603 }
2604 case s_n_llhttp__internal__n_header_value:
2605 s_n_llhttp__internal__n_header_value: {
2606 static uint8_t lookup_table[] = {
2607 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
2608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2610 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2611 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2612 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2613 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2614 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2615 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2616 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2617 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2618 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2619 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2621 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2622 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2623 };
2624 if (p == endp) {
2625 return s_n_llhttp__internal__n_header_value;
2626 }
2627 #ifdef __SSE4_2__
2628 if (endp - p >= 16) {
2629 __m128i ranges;
2630 __m128i input;
2631 int avail;
2632 int match_len;
2633
2634 /* Load input */
2635 input = _mm_loadu_si128((__m128i const*) p);
2636 ranges = _mm_loadu_si128((__m128i const*) llparse_blob6);
2637
2638 /* Find first character that does not match `ranges` */
2639 match_len = _mm_cmpestri(ranges, 6,
2640 input, 16,
2641 _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2642 _SIDD_NEGATIVE_POLARITY);
2643
2644 if (match_len != 0) {
2645 p += match_len;
2646 goto s_n_llhttp__internal__n_header_value;
2647 }
2648 goto s_n_llhttp__internal__n_header_value_otherwise;
2649 }
2650 #endif /* __SSE4_2__ */
2651 switch (lookup_table[(uint8_t) *p]) {
2652 case 1: {
2653 p++;
2654 goto s_n_llhttp__internal__n_header_value;
2655 }
2656 default: {
2657 goto s_n_llhttp__internal__n_header_value_otherwise;
2658 }
2659 }
2660 /* UNREACHABLE */;
2661 abort();
2662 }
2663 case s_n_llhttp__internal__n_header_value_te_token:
2664 s_n_llhttp__internal__n_header_value_te_token: {
2665 static uint8_t lookup_table[] = {
2666 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
2667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2668 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
2669 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2670 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2671 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2672 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2674 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2675 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2676 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2677 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2678 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2679 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2680 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2681 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2682 };
2683 if (p == endp) {
2684 return s_n_llhttp__internal__n_header_value_te_token;
2685 }
2686 switch (lookup_table[(uint8_t) *p]) {
2687 case 1: {
2688 p++;
2689 goto s_n_llhttp__internal__n_header_value_te_token;
2690 }
2691 case 2: {
2692 p++;
2693 goto s_n_llhttp__internal__n_header_value_te_token_ows;
2694 }
2695 default: {
2696 goto s_n_llhttp__internal__n_invoke_update_header_state_9;
2697 }
2698 }
2699 /* UNREACHABLE */;
2700 abort();
2701 }
2702 case s_n_llhttp__internal__n_header_value_te_chunked_last:
2703 s_n_llhttp__internal__n_header_value_te_chunked_last: {
2704 if (p == endp) {
2705 return s_n_llhttp__internal__n_header_value_te_chunked_last;
2706 }
2707 switch (*p) {
2708 case 10: {
2709 goto s_n_llhttp__internal__n_invoke_update_header_state_8;
2710 }
2711 case 13: {
2712 goto s_n_llhttp__internal__n_invoke_update_header_state_8;
2713 }
2714 case ' ': {
2715 p++;
2716 goto s_n_llhttp__internal__n_header_value_te_chunked_last;
2717 }
2718 case ',': {
2719 goto s_n_llhttp__internal__n_invoke_load_type_1;
2720 }
2721 default: {
2722 goto s_n_llhttp__internal__n_header_value_te_token;
2723 }
2724 }
2725 /* UNREACHABLE */;
2726 abort();
2727 }
2728 case s_n_llhttp__internal__n_header_value_te_chunked:
2729 s_n_llhttp__internal__n_header_value_te_chunked: {
2730 llparse_match_t match_seq;
2731
2732 if (p == endp) {
2733 return s_n_llhttp__internal__n_header_value_te_chunked;
2734 }
2735 match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob5, 7);
2736 p = match_seq.current;
2737 switch (match_seq.status) {
2738 case kMatchComplete: {
2739 p++;
2740 goto s_n_llhttp__internal__n_header_value_te_chunked_last;
2741 }
2742 case kMatchPause: {
2743 return s_n_llhttp__internal__n_header_value_te_chunked;
2744 }
2745 case kMatchMismatch: {
2746 goto s_n_llhttp__internal__n_header_value_te_token;
2747 }
2748 }
2749 /* UNREACHABLE */;
2750 abort();
2751 }
2752 case s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1:
2753 s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1: {
2754 if (p == endp) {
2755 return s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
2756 }
2757 state->_span_pos0 = (void*) p;
2758 state->_span_cb0 = llhttp__on_header_value;
2759 goto s_n_llhttp__internal__n_invoke_load_header_state_3;
2760 /* UNREACHABLE */;
2761 abort();
2762 }
2763 case s_n_llhttp__internal__n_header_value_discard_ws:
2764 s_n_llhttp__internal__n_header_value_discard_ws: {
2765 if (p == endp) {
2766 return s_n_llhttp__internal__n_header_value_discard_ws;
2767 }
2768 switch (*p) {
2769 case 9: {
2770 p++;
2771 goto s_n_llhttp__internal__n_header_value_discard_ws;
2772 }
2773 case 10: {
2774 p++;
2775 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_14;
2776 }
2777 case 13: {
2778 p++;
2779 goto s_n_llhttp__internal__n_header_value_discard_ws_almost_done;
2780 }
2781 case ' ': {
2782 p++;
2783 goto s_n_llhttp__internal__n_header_value_discard_ws;
2784 }
2785 default: {
2786 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
2787 }
2788 }
2789 /* UNREACHABLE */;
2790 abort();
2791 }
2792 case s_n_llhttp__internal__n_invoke_load_header_state:
2793 s_n_llhttp__internal__n_invoke_load_header_state: {
2794 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
2795 case 2:
2796 goto s_n_llhttp__internal__n_invoke_test_flags_4;
2797 case 3:
2798 goto s_n_llhttp__internal__n_invoke_test_flags_5;
2799 default:
2800 goto s_n_llhttp__internal__n_header_value_discard_ws;
2801 }
2802 /* UNREACHABLE */;
2803 abort();
2804 }
2805 case s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete:
2806 s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete: {
2807 switch (llhttp__on_header_field_complete(state, p, endp)) {
2808 case 0:
2809 goto s_n_llhttp__internal__n_invoke_load_header_state;
2810 case 21:
2811 goto s_n_llhttp__internal__n_pause_19;
2812 default:
2813 goto s_n_llhttp__internal__n_error_44;
2814 }
2815 /* UNREACHABLE */;
2816 abort();
2817 }
2818 case s_n_llhttp__internal__n_header_field_general_otherwise:
2819 s_n_llhttp__internal__n_header_field_general_otherwise: {
2820 if (p == endp) {
2821 return s_n_llhttp__internal__n_header_field_general_otherwise;
2822 }
2823 switch (*p) {
2824 case ':': {
2825 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2;
2826 }
2827 default: {
2828 goto s_n_llhttp__internal__n_error_60;
2829 }
2830 }
2831 /* UNREACHABLE */;
2832 abort();
2833 }
2834 case s_n_llhttp__internal__n_header_field_general:
2835 s_n_llhttp__internal__n_header_field_general: {
2836 static uint8_t lookup_table[] = {
2837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2839 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
2840 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
2841 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2842 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
2843 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2844 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
2845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2849 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,
2851 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
2853 };
2854 if (p == endp) {
2855 return s_n_llhttp__internal__n_header_field_general;
2856 }
2857 #ifdef __SSE4_2__
2858 if (endp - p >= 16) {
2859 __m128i ranges;
2860 __m128i input;
2861 int avail;
2862 int match_len;
2863
2864 /* Load input */
2865 input = _mm_loadu_si128((__m128i const*) p);
2866 ranges = _mm_loadu_si128((__m128i const*) llparse_blob7);
2867
2868 /* Find first character that does not match `ranges` */
2869 match_len = _mm_cmpestri(ranges, 16,
2870 input, 16,
2871 _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2872 _SIDD_NEGATIVE_POLARITY);
2873
2874 if (match_len != 0) {
2875 p += match_len;
2876 goto s_n_llhttp__internal__n_header_field_general;
2877 }
2878 ranges = _mm_loadu_si128((__m128i const*) llparse_blob8);
2879
2880 /* Find first character that does not match `ranges` */
2881 match_len = _mm_cmpestri(ranges, 2,
2882 input, 16,
2883 _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2884 _SIDD_NEGATIVE_POLARITY);
2885
2886 if (match_len != 0) {
2887 p += match_len;
2888 goto s_n_llhttp__internal__n_header_field_general;
2889 }
2890 goto s_n_llhttp__internal__n_header_field_general_otherwise;
2891 }
2892 #endif /* __SSE4_2__ */
2893 switch (lookup_table[(uint8_t) *p]) {
2894 case 1: {
2895 p++;
2896 goto s_n_llhttp__internal__n_header_field_general;
2897 }
2898 default: {
2899 goto s_n_llhttp__internal__n_header_field_general_otherwise;
2900 }
2901 }
2902 /* UNREACHABLE */;
2903 abort();
2904 }
2905 case s_n_llhttp__internal__n_header_field_colon:
2906 s_n_llhttp__internal__n_header_field_colon: {
2907 if (p == endp) {
2908 return s_n_llhttp__internal__n_header_field_colon;
2909 }
2910 switch (*p) {
2911 case ' ': {
2912 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_13;
2913 }
2914 case ':': {
2915 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1;
2916 }
2917 default: {
2918 goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2919 }
2920 }
2921 /* UNREACHABLE */;
2922 abort();
2923 }
2924 case s_n_llhttp__internal__n_header_field_3:
2925 s_n_llhttp__internal__n_header_field_3: {
2926 llparse_match_t match_seq;
2927
2928 if (p == endp) {
2929 return s_n_llhttp__internal__n_header_field_3;
2930 }
2931 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 6);
2932 p = match_seq.current;
2933 switch (match_seq.status) {
2934 case kMatchComplete: {
2935 p++;
2936 match = 1;
2937 goto s_n_llhttp__internal__n_invoke_store_header_state;
2938 }
2939 case kMatchPause: {
2940 return s_n_llhttp__internal__n_header_field_3;
2941 }
2942 case kMatchMismatch: {
2943 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
2944 }
2945 }
2946 /* UNREACHABLE */;
2947 abort();
2948 }
2949 case s_n_llhttp__internal__n_header_field_4:
2950 s_n_llhttp__internal__n_header_field_4: {
2951 llparse_match_t match_seq;
2952
2953 if (p == endp) {
2954 return s_n_llhttp__internal__n_header_field_4;
2955 }
2956 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob9, 10);
2957 p = match_seq.current;
2958 switch (match_seq.status) {
2959 case kMatchComplete: {
2960 p++;
2961 match = 2;
2962 goto s_n_llhttp__internal__n_invoke_store_header_state;
2963 }
2964 case kMatchPause: {
2965 return s_n_llhttp__internal__n_header_field_4;
2966 }
2967 case kMatchMismatch: {
2968 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
2969 }
2970 }
2971 /* UNREACHABLE */;
2972 abort();
2973 }
2974 case s_n_llhttp__internal__n_header_field_2:
2975 s_n_llhttp__internal__n_header_field_2: {
2976 if (p == endp) {
2977 return s_n_llhttp__internal__n_header_field_2;
2978 }
2979 switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) {
2980 case 'n': {
2981 p++;
2982 goto s_n_llhttp__internal__n_header_field_3;
2983 }
2984 case 't': {
2985 p++;
2986 goto s_n_llhttp__internal__n_header_field_4;
2987 }
2988 default: {
2989 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
2990 }
2991 }
2992 /* UNREACHABLE */;
2993 abort();
2994 }
2995 case s_n_llhttp__internal__n_header_field_1:
2996 s_n_llhttp__internal__n_header_field_1: {
2997 llparse_match_t match_seq;
2998
2999 if (p == endp) {
3000 return s_n_llhttp__internal__n_header_field_1;
3001 }
3002 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob0, 2);
3003 p = match_seq.current;
3004 switch (match_seq.status) {
3005 case kMatchComplete: {
3006 p++;
3007 goto s_n_llhttp__internal__n_header_field_2;
3008 }
3009 case kMatchPause: {
3010 return s_n_llhttp__internal__n_header_field_1;
3011 }
3012 case kMatchMismatch: {
3013 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
3014 }
3015 }
3016 /* UNREACHABLE */;
3017 abort();
3018 }
3019 case s_n_llhttp__internal__n_header_field_5:
3020 s_n_llhttp__internal__n_header_field_5: {
3021 llparse_match_t match_seq;
3022
3023 if (p == endp) {
3024 return s_n_llhttp__internal__n_header_field_5;
3025 }
3026 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 15);
3027 p = match_seq.current;
3028 switch (match_seq.status) {
3029 case kMatchComplete: {
3030 p++;
3031 match = 1;
3032 goto s_n_llhttp__internal__n_invoke_store_header_state;
3033 }
3034 case kMatchPause: {
3035 return s_n_llhttp__internal__n_header_field_5;
3036 }
3037 case kMatchMismatch: {
3038 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
3039 }
3040 }
3041 /* UNREACHABLE */;
3042 abort();
3043 }
3044 case s_n_llhttp__internal__n_header_field_6:
3045 s_n_llhttp__internal__n_header_field_6: {
3046 llparse_match_t match_seq;
3047
3048 if (p == endp) {
3049 return s_n_llhttp__internal__n_header_field_6;
3050 }
3051 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 16);
3052 p = match_seq.current;
3053 switch (match_seq.status) {
3054 case kMatchComplete: {
3055 p++;
3056 match = 3;
3057 goto s_n_llhttp__internal__n_invoke_store_header_state;
3058 }
3059 case kMatchPause: {
3060 return s_n_llhttp__internal__n_header_field_6;
3061 }
3062 case kMatchMismatch: {
3063 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
3064 }
3065 }
3066 /* UNREACHABLE */;
3067 abort();
3068 }
3069 case s_n_llhttp__internal__n_header_field_7:
3070 s_n_llhttp__internal__n_header_field_7: {
3071 llparse_match_t match_seq;
3072
3073 if (p == endp) {
3074 return s_n_llhttp__internal__n_header_field_7;
3075 }
3076 match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 6);
3077 p = match_seq.current;
3078 switch (match_seq.status) {
3079 case kMatchComplete: {
3080 p++;
3081 match = 4;
3082 goto s_n_llhttp__internal__n_invoke_store_header_state;
3083 }
3084 case kMatchPause: {
3085 return s_n_llhttp__internal__n_header_field_7;
3086 }
3087 case kMatchMismatch: {
3088 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
3089 }
3090 }
3091 /* UNREACHABLE */;
3092 abort();
3093 }
3094 case s_n_llhttp__internal__n_header_field:
3095 s_n_llhttp__internal__n_header_field: {
3096 if (p == endp) {
3097 return s_n_llhttp__internal__n_header_field;
3098 }
3099 switch (((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p))) {
3100 case 'c': {
3101 p++;
3102 goto s_n_llhttp__internal__n_header_field_1;
3103 }
3104 case 'p': {
3105 p++;
3106 goto s_n_llhttp__internal__n_header_field_5;
3107 }
3108 case 't': {
3109 p++;
3110 goto s_n_llhttp__internal__n_header_field_6;
3111 }
3112 case 'u': {
3113 p++;
3114 goto s_n_llhttp__internal__n_header_field_7;
3115 }
3116 default: {
3117 goto s_n_llhttp__internal__n_invoke_update_header_state_11;
3118 }
3119 }
3120 /* UNREACHABLE */;
3121 abort();
3122 }
3123 case s_n_llhttp__internal__n_span_start_llhttp__on_header_field:
3124 s_n_llhttp__internal__n_span_start_llhttp__on_header_field: {
3125 if (p == endp) {
3126 return s_n_llhttp__internal__n_span_start_llhttp__on_header_field;
3127 }
3128 state->_span_pos0 = (void*) p;
3129 state->_span_cb0 = llhttp__on_header_field;
3130 goto s_n_llhttp__internal__n_header_field;
3131 /* UNREACHABLE */;
3132 abort();
3133 }
3134 case s_n_llhttp__internal__n_header_field_start:
3135 s_n_llhttp__internal__n_header_field_start: {
3136 if (p == endp) {
3137 return s_n_llhttp__internal__n_header_field_start;
3138 }
3139 switch (*p) {
3140 case 10: {
3141 p++;
3142 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_1;
3143 }
3144 case 13: {
3145 p++;
3146 goto s_n_llhttp__internal__n_headers_almost_done;
3147 }
3148 default: {
3149 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_field;
3150 }
3151 }
3152 /* UNREACHABLE */;
3153 abort();
3154 }
3155 case s_n_llhttp__internal__n_headers_start:
3156 s_n_llhttp__internal__n_headers_start: {
3157 if (p == endp) {
3158 return s_n_llhttp__internal__n_headers_start;
3159 }
3160 switch (*p) {
3161 case ' ': {
3162 p++;
3163 goto s_n_llhttp__internal__n_invoke_test_lenient_flags;
3164 }
3165 default: {
3166 goto s_n_llhttp__internal__n_header_field_start;
3167 }
3168 }
3169 /* UNREACHABLE */;
3170 abort();
3171 }
3172 case s_n_llhttp__internal__n_url_to_http_09:
3173 s_n_llhttp__internal__n_url_to_http_09: {
3174 if (p == endp) {
3175 return s_n_llhttp__internal__n_url_to_http_09;
3176 }
3177 switch (*p) {
3178 case 9: {
3179 p++;
3180 goto s_n_llhttp__internal__n_error_2;
3181 }
3182 case 12: {
3183 p++;
3184 goto s_n_llhttp__internal__n_error_2;
3185 }
3186 default: {
3187 goto s_n_llhttp__internal__n_invoke_update_http_major;
3188 }
3189 }
3190 /* UNREACHABLE */;
3191 abort();
3192 }
3193 case s_n_llhttp__internal__n_url_skip_to_http09:
3194 s_n_llhttp__internal__n_url_skip_to_http09: {
3195 if (p == endp) {
3196 return s_n_llhttp__internal__n_url_skip_to_http09;
3197 }
3198 switch (*p) {
3199 case 9: {
3200 p++;
3201 goto s_n_llhttp__internal__n_error_2;
3202 }
3203 case 12: {
3204 p++;
3205 goto s_n_llhttp__internal__n_error_2;
3206 }
3207 default: {
3208 p++;
3209 goto s_n_llhttp__internal__n_url_to_http_09;
3210 }
3211 }
3212 /* UNREACHABLE */;
3213 abort();
3214 }
3215 case s_n_llhttp__internal__n_url_skip_lf_to_http09_1:
3216 s_n_llhttp__internal__n_url_skip_lf_to_http09_1: {
3217 if (p == endp) {
3218 return s_n_llhttp__internal__n_url_skip_lf_to_http09_1;
3219 }
3220 switch (*p) {
3221 case 10: {
3222 p++;
3223 goto s_n_llhttp__internal__n_url_to_http_09;
3224 }
3225 default: {
3226 goto s_n_llhttp__internal__n_error_61;
3227 }
3228 }
3229 /* UNREACHABLE */;
3230 abort();
3231 }
3232 case s_n_llhttp__internal__n_url_skip_lf_to_http09:
3233 s_n_llhttp__internal__n_url_skip_lf_to_http09: {
3234 if (p == endp) {
3235 return s_n_llhttp__internal__n_url_skip_lf_to_http09;
3236 }
3237 switch (*p) {
3238 case 9: {
3239 p++;
3240 goto s_n_llhttp__internal__n_error_2;
3241 }
3242 case 12: {
3243 p++;
3244 goto s_n_llhttp__internal__n_error_2;
3245 }
3246 case 13: {
3247 p++;
3248 goto s_n_llhttp__internal__n_url_skip_lf_to_http09_1;
3249 }
3250 default: {
3251 goto s_n_llhttp__internal__n_error_61;
3252 }
3253 }
3254 /* UNREACHABLE */;
3255 abort();
3256 }
3257 case s_n_llhttp__internal__n_req_pri_upgrade:
3258 s_n_llhttp__internal__n_req_pri_upgrade: {
3259 llparse_match_t match_seq;
3260
3261 if (p == endp) {
3262 return s_n_llhttp__internal__n_req_pri_upgrade;
3263 }
3264 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 10);
3265 p = match_seq.current;
3266 switch (match_seq.status) {
3267 case kMatchComplete: {
3268 p++;
3269 goto s_n_llhttp__internal__n_error_69;
3270 }
3271 case kMatchPause: {
3272 return s_n_llhttp__internal__n_req_pri_upgrade;
3273 }
3274 case kMatchMismatch: {
3275 goto s_n_llhttp__internal__n_error_70;
3276 }
3277 }
3278 /* UNREACHABLE */;
3279 abort();
3280 }
3281 case s_n_llhttp__internal__n_req_http_complete_crlf:
3282 s_n_llhttp__internal__n_req_http_complete_crlf: {
3283 if (p == endp) {
3284 return s_n_llhttp__internal__n_req_http_complete_crlf;
3285 }
3286 switch (*p) {
3287 case 10: {
3288 p++;
3289 goto s_n_llhttp__internal__n_headers_start;
3290 }
3291 default: {
3292 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_25;
3293 }
3294 }
3295 /* UNREACHABLE */;
3296 abort();
3297 }
3298 case s_n_llhttp__internal__n_req_http_complete:
3299 s_n_llhttp__internal__n_req_http_complete: {
3300 if (p == endp) {
3301 return s_n_llhttp__internal__n_req_http_complete;
3302 }
3303 switch (*p) {
3304 case 10: {
3305 p++;
3306 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_24;
3307 }
3308 case 13: {
3309 p++;
3310 goto s_n_llhttp__internal__n_req_http_complete_crlf;
3311 }
3312 default: {
3313 goto s_n_llhttp__internal__n_error_68;
3314 }
3315 }
3316 /* UNREACHABLE */;
3317 abort();
3318 }
3319 case s_n_llhttp__internal__n_invoke_load_method_1:
3320 s_n_llhttp__internal__n_invoke_load_method_1: {
3321 switch (llhttp__internal__c_load_method(state, p, endp)) {
3322 case 34:
3323 goto s_n_llhttp__internal__n_req_pri_upgrade;
3324 default:
3325 goto s_n_llhttp__internal__n_req_http_complete;
3326 }
3327 /* UNREACHABLE */;
3328 abort();
3329 }
3330 case s_n_llhttp__internal__n_invoke_llhttp__on_version_complete:
3331 s_n_llhttp__internal__n_invoke_llhttp__on_version_complete: {
3332 switch (llhttp__on_version_complete(state, p, endp)) {
3333 case 0:
3334 goto s_n_llhttp__internal__n_invoke_load_method_1;
3335 case 21:
3336 goto s_n_llhttp__internal__n_pause_21;
3337 default:
3338 goto s_n_llhttp__internal__n_error_65;
3339 }
3340 /* UNREACHABLE */;
3341 abort();
3342 }
3343 case s_n_llhttp__internal__n_error_64:
3344 s_n_llhttp__internal__n_error_64: {
3345 state->error = 0x9;
3346 state->reason = "Invalid HTTP version";
3347 state->error_pos = (const char*) p;
3348 state->_current = (void*) (intptr_t) s_error;
3349 return s_error;
3350 /* UNREACHABLE */;
3351 abort();
3352 }
3353 case s_n_llhttp__internal__n_error_71:
3354 s_n_llhttp__internal__n_error_71: {
3355 state->error = 0x9;
3356 state->reason = "Invalid minor version";
3357 state->error_pos = (const char*) p;
3358 state->_current = (void*) (intptr_t) s_error;
3359 return s_error;
3360 /* UNREACHABLE */;
3361 abort();
3362 }
3363 case s_n_llhttp__internal__n_req_http_minor:
3364 s_n_llhttp__internal__n_req_http_minor: {
3365 if (p == endp) {
3366 return s_n_llhttp__internal__n_req_http_minor;
3367 }
3368 switch (*p) {
3369 case '0': {
3370 p++;
3371 match = 0;
3372 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3373 }
3374 case '1': {
3375 p++;
3376 match = 1;
3377 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3378 }
3379 case '2': {
3380 p++;
3381 match = 2;
3382 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3383 }
3384 case '3': {
3385 p++;
3386 match = 3;
3387 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3388 }
3389 case '4': {
3390 p++;
3391 match = 4;
3392 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3393 }
3394 case '5': {
3395 p++;
3396 match = 5;
3397 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3398 }
3399 case '6': {
3400 p++;
3401 match = 6;
3402 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3403 }
3404 case '7': {
3405 p++;
3406 match = 7;
3407 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3408 }
3409 case '8': {
3410 p++;
3411 match = 8;
3412 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3413 }
3414 case '9': {
3415 p++;
3416 match = 9;
3417 goto s_n_llhttp__internal__n_invoke_store_http_minor;
3418 }
3419 default: {
3420 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_2;
3421 }
3422 }
3423 /* UNREACHABLE */;
3424 abort();
3425 }
3426 case s_n_llhttp__internal__n_error_72:
3427 s_n_llhttp__internal__n_error_72: {
3428 state->error = 0x9;
3429 state->reason = "Expected dot";
3430 state->error_pos = (const char*) p;
3431 state->_current = (void*) (intptr_t) s_error;
3432 return s_error;
3433 /* UNREACHABLE */;
3434 abort();
3435 }
3436 case s_n_llhttp__internal__n_req_http_dot:
3437 s_n_llhttp__internal__n_req_http_dot: {
3438 if (p == endp) {
3439 return s_n_llhttp__internal__n_req_http_dot;
3440 }
3441 switch (*p) {
3442 case '.': {
3443 p++;
3444 goto s_n_llhttp__internal__n_req_http_minor;
3445 }
3446 default: {
3447 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_3;
3448 }
3449 }
3450 /* UNREACHABLE */;
3451 abort();
3452 }
3453 case s_n_llhttp__internal__n_error_73:
3454 s_n_llhttp__internal__n_error_73: {
3455 state->error = 0x9;
3456 state->reason = "Invalid major version";
3457 state->error_pos = (const char*) p;
3458 state->_current = (void*) (intptr_t) s_error;
3459 return s_error;
3460 /* UNREACHABLE */;
3461 abort();
3462 }
3463 case s_n_llhttp__internal__n_req_http_major:
3464 s_n_llhttp__internal__n_req_http_major: {
3465 if (p == endp) {
3466 return s_n_llhttp__internal__n_req_http_major;
3467 }
3468 switch (*p) {
3469 case '0': {
3470 p++;
3471 match = 0;
3472 goto s_n_llhttp__internal__n_invoke_store_http_major;
3473 }
3474 case '1': {
3475 p++;
3476 match = 1;
3477 goto s_n_llhttp__internal__n_invoke_store_http_major;
3478 }
3479 case '2': {
3480 p++;
3481 match = 2;
3482 goto s_n_llhttp__internal__n_invoke_store_http_major;
3483 }
3484 case '3': {
3485 p++;
3486 match = 3;
3487 goto s_n_llhttp__internal__n_invoke_store_http_major;
3488 }
3489 case '4': {
3490 p++;
3491 match = 4;
3492 goto s_n_llhttp__internal__n_invoke_store_http_major;
3493 }
3494 case '5': {
3495 p++;
3496 match = 5;
3497 goto s_n_llhttp__internal__n_invoke_store_http_major;
3498 }
3499 case '6': {
3500 p++;
3501 match = 6;
3502 goto s_n_llhttp__internal__n_invoke_store_http_major;
3503 }
3504 case '7': {
3505 p++;
3506 match = 7;
3507 goto s_n_llhttp__internal__n_invoke_store_http_major;
3508 }
3509 case '8': {
3510 p++;
3511 match = 8;
3512 goto s_n_llhttp__internal__n_invoke_store_http_major;
3513 }
3514 case '9': {
3515 p++;
3516 match = 9;
3517 goto s_n_llhttp__internal__n_invoke_store_http_major;
3518 }
3519 default: {
3520 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_4;
3521 }
3522 }
3523 /* UNREACHABLE */;
3524 abort();
3525 }
3526 case s_n_llhttp__internal__n_span_start_llhttp__on_version:
3527 s_n_llhttp__internal__n_span_start_llhttp__on_version: {
3528 if (p == endp) {
3529 return s_n_llhttp__internal__n_span_start_llhttp__on_version;
3530 }
3531 state->_span_pos0 = (void*) p;
3532 state->_span_cb0 = llhttp__on_version;
3533 goto s_n_llhttp__internal__n_req_http_major;
3534 /* UNREACHABLE */;
3535 abort();
3536 }
3537 case s_n_llhttp__internal__n_req_http_start_1:
3538 s_n_llhttp__internal__n_req_http_start_1: {
3539 llparse_match_t match_seq;
3540
3541 if (p == endp) {
3542 return s_n_llhttp__internal__n_req_http_start_1;
3543 }
3544 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob13, 4);
3545 p = match_seq.current;
3546 switch (match_seq.status) {
3547 case kMatchComplete: {
3548 p++;
3549 goto s_n_llhttp__internal__n_invoke_load_method;
3550 }
3551 case kMatchPause: {
3552 return s_n_llhttp__internal__n_req_http_start_1;
3553 }
3554 case kMatchMismatch: {
3555 goto s_n_llhttp__internal__n_error_76;
3556 }
3557 }
3558 /* UNREACHABLE */;
3559 abort();
3560 }
3561 case s_n_llhttp__internal__n_req_http_start_2:
3562 s_n_llhttp__internal__n_req_http_start_2: {
3563 llparse_match_t match_seq;
3564
3565 if (p == endp) {
3566 return s_n_llhttp__internal__n_req_http_start_2;
3567 }
3568 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 3);
3569 p = match_seq.current;
3570 switch (match_seq.status) {
3571 case kMatchComplete: {
3572 p++;
3573 goto s_n_llhttp__internal__n_invoke_load_method_2;
3574 }
3575 case kMatchPause: {
3576 return s_n_llhttp__internal__n_req_http_start_2;
3577 }
3578 case kMatchMismatch: {
3579 goto s_n_llhttp__internal__n_error_76;
3580 }
3581 }
3582 /* UNREACHABLE */;
3583 abort();
3584 }
3585 case s_n_llhttp__internal__n_req_http_start_3:
3586 s_n_llhttp__internal__n_req_http_start_3: {
3587 llparse_match_t match_seq;
3588
3589 if (p == endp) {
3590 return s_n_llhttp__internal__n_req_http_start_3;
3591 }
3592 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 4);
3593 p = match_seq.current;
3594 switch (match_seq.status) {
3595 case kMatchComplete: {
3596 p++;
3597 goto s_n_llhttp__internal__n_invoke_load_method_3;
3598 }
3599 case kMatchPause: {
3600 return s_n_llhttp__internal__n_req_http_start_3;
3601 }
3602 case kMatchMismatch: {
3603 goto s_n_llhttp__internal__n_error_76;
3604 }
3605 }
3606 /* UNREACHABLE */;
3607 abort();
3608 }
3609 case s_n_llhttp__internal__n_req_http_start:
3610 s_n_llhttp__internal__n_req_http_start: {
3611 if (p == endp) {
3612 return s_n_llhttp__internal__n_req_http_start;
3613 }
3614 switch (*p) {
3615 case ' ': {
3616 p++;
3617 goto s_n_llhttp__internal__n_req_http_start;
3618 }
3619 case 'H': {
3620 p++;
3621 goto s_n_llhttp__internal__n_req_http_start_1;
3622 }
3623 case 'I': {
3624 p++;
3625 goto s_n_llhttp__internal__n_req_http_start_2;
3626 }
3627 case 'R': {
3628 p++;
3629 goto s_n_llhttp__internal__n_req_http_start_3;
3630 }
3631 default: {
3632 goto s_n_llhttp__internal__n_error_76;
3633 }
3634 }
3635 /* UNREACHABLE */;
3636 abort();
3637 }
3638 case s_n_llhttp__internal__n_url_to_http:
3639 s_n_llhttp__internal__n_url_to_http: {
3640 if (p == endp) {
3641 return s_n_llhttp__internal__n_url_to_http;
3642 }
3643 switch (*p) {
3644 case 9: {
3645 p++;
3646 goto s_n_llhttp__internal__n_error_2;
3647 }
3648 case 12: {
3649 p++;
3650 goto s_n_llhttp__internal__n_error_2;
3651 }
3652 default: {
3653 goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1;
3654 }
3655 }
3656 /* UNREACHABLE */;
3657 abort();
3658 }
3659 case s_n_llhttp__internal__n_url_skip_to_http:
3660 s_n_llhttp__internal__n_url_skip_to_http: {
3661 if (p == endp) {
3662 return s_n_llhttp__internal__n_url_skip_to_http;
3663 }
3664 switch (*p) {
3665 case 9: {
3666 p++;
3667 goto s_n_llhttp__internal__n_error_2;
3668 }
3669 case 12: {
3670 p++;
3671 goto s_n_llhttp__internal__n_error_2;
3672 }
3673 default: {
3674 p++;
3675 goto s_n_llhttp__internal__n_url_to_http;
3676 }
3677 }
3678 /* UNREACHABLE */;
3679 abort();
3680 }
3681 case s_n_llhttp__internal__n_url_fragment:
3682 s_n_llhttp__internal__n_url_fragment: {
3683 static uint8_t lookup_table[] = {
3684 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
3685 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3686 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3687 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3688 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3689 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3690 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3691 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
3692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3700 };
3701 if (p == endp) {
3702 return s_n_llhttp__internal__n_url_fragment;
3703 }
3704 switch (lookup_table[(uint8_t) *p]) {
3705 case 1: {
3706 p++;
3707 goto s_n_llhttp__internal__n_error_2;
3708 }
3709 case 2: {
3710 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_6;
3711 }
3712 case 3: {
3713 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_7;
3714 }
3715 case 4: {
3716 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8;
3717 }
3718 case 5: {
3719 p++;
3720 goto s_n_llhttp__internal__n_url_fragment;
3721 }
3722 default: {
3723 goto s_n_llhttp__internal__n_error_77;
3724 }
3725 }
3726 /* UNREACHABLE */;
3727 abort();
3728 }
3729 case s_n_llhttp__internal__n_span_end_stub_query_3:
3730 s_n_llhttp__internal__n_span_end_stub_query_3: {
3731 if (p == endp) {
3732 return s_n_llhttp__internal__n_span_end_stub_query_3;
3733 }
3734 p++;
3735 goto s_n_llhttp__internal__n_url_fragment;
3736 /* UNREACHABLE */;
3737 abort();
3738 }
3739 case s_n_llhttp__internal__n_url_query:
3740 s_n_llhttp__internal__n_url_query: {
3741 static uint8_t lookup_table[] = {
3742 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
3743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3744 4, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3745 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3746 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3747 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3748 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3749 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
3750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3757 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3758 };
3759 if (p == endp) {
3760 return s_n_llhttp__internal__n_url_query;
3761 }
3762 switch (lookup_table[(uint8_t) *p]) {
3763 case 1: {
3764 p++;
3765 goto s_n_llhttp__internal__n_error_2;
3766 }
3767 case 2: {
3768 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_9;
3769 }
3770 case 3: {
3771 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_10;
3772 }
3773 case 4: {
3774 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_11;
3775 }
3776 case 5: {
3777 p++;
3778 goto s_n_llhttp__internal__n_url_query;
3779 }
3780 case 6: {
3781 goto s_n_llhttp__internal__n_span_end_stub_query_3;
3782 }
3783 default: {
3784 goto s_n_llhttp__internal__n_error_78;
3785 }
3786 }
3787 /* UNREACHABLE */;
3788 abort();
3789 }
3790 case s_n_llhttp__internal__n_url_query_or_fragment:
3791 s_n_llhttp__internal__n_url_query_or_fragment: {
3792 if (p == endp) {
3793 return s_n_llhttp__internal__n_url_query_or_fragment;
3794 }
3795 switch (*p) {
3796 case 9: {
3797 p++;
3798 goto s_n_llhttp__internal__n_error_2;
3799 }
3800 case 10: {
3801 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_3;
3802 }
3803 case 12: {
3804 p++;
3805 goto s_n_llhttp__internal__n_error_2;
3806 }
3807 case 13: {
3808 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_4;
3809 }
3810 case ' ': {
3811 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_5;
3812 }
3813 case '#': {
3814 p++;
3815 goto s_n_llhttp__internal__n_url_fragment;
3816 }
3817 case '?': {
3818 p++;
3819 goto s_n_llhttp__internal__n_url_query;
3820 }
3821 default: {
3822 goto s_n_llhttp__internal__n_error_79;
3823 }
3824 }
3825 /* UNREACHABLE */;
3826 abort();
3827 }
3828 case s_n_llhttp__internal__n_url_path:
3829 s_n_llhttp__internal__n_url_path: {
3830 static uint8_t lookup_table[] = {
3831 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
3832 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3833 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3834 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
3835 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3836 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
3839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3843 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3847 };
3848 if (p == endp) {
3849 return s_n_llhttp__internal__n_url_path;
3850 }
3851 switch (lookup_table[(uint8_t) *p]) {
3852 case 1: {
3853 p++;
3854 goto s_n_llhttp__internal__n_error_2;
3855 }
3856 case 2: {
3857 p++;
3858 goto s_n_llhttp__internal__n_url_path;
3859 }
3860 default: {
3861 goto s_n_llhttp__internal__n_url_query_or_fragment;
3862 }
3863 }
3864 /* UNREACHABLE */;
3865 abort();
3866 }
3867 case s_n_llhttp__internal__n_span_start_stub_path_2:
3868 s_n_llhttp__internal__n_span_start_stub_path_2: {
3869 if (p == endp) {
3870 return s_n_llhttp__internal__n_span_start_stub_path_2;
3871 }
3872 p++;
3873 goto s_n_llhttp__internal__n_url_path;
3874 /* UNREACHABLE */;
3875 abort();
3876 }
3877 case s_n_llhttp__internal__n_span_start_stub_path:
3878 s_n_llhttp__internal__n_span_start_stub_path: {
3879 if (p == endp) {
3880 return s_n_llhttp__internal__n_span_start_stub_path;
3881 }
3882 p++;
3883 goto s_n_llhttp__internal__n_url_path;
3884 /* UNREACHABLE */;
3885 abort();
3886 }
3887 case s_n_llhttp__internal__n_span_start_stub_path_1:
3888 s_n_llhttp__internal__n_span_start_stub_path_1: {
3889 if (p == endp) {
3890 return s_n_llhttp__internal__n_span_start_stub_path_1;
3891 }
3892 p++;
3893 goto s_n_llhttp__internal__n_url_path;
3894 /* UNREACHABLE */;
3895 abort();
3896 }
3897 case s_n_llhttp__internal__n_url_server_with_at:
3898 s_n_llhttp__internal__n_url_server_with_at: {
3899 static uint8_t lookup_table[] = {
3900 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
3901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3902 4, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6,
3903 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 7,
3904 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3905 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5,
3906 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3907 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 0,
3908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3916 };
3917 if (p == endp) {
3918 return s_n_llhttp__internal__n_url_server_with_at;
3919 }
3920 switch (lookup_table[(uint8_t) *p]) {
3921 case 1: {
3922 p++;
3923 goto s_n_llhttp__internal__n_error_2;
3924 }
3925 case 2: {
3926 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_12;
3927 }
3928 case 3: {
3929 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_13;
3930 }
3931 case 4: {
3932 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_14;
3933 }
3934 case 5: {
3935 p++;
3936 goto s_n_llhttp__internal__n_url_server;
3937 }
3938 case 6: {
3939 goto s_n_llhttp__internal__n_span_start_stub_path_1;
3940 }
3941 case 7: {
3942 p++;
3943 goto s_n_llhttp__internal__n_url_query;
3944 }
3945 case 8: {
3946 p++;
3947 goto s_n_llhttp__internal__n_error_80;
3948 }
3949 default: {
3950 goto s_n_llhttp__internal__n_error_81;
3951 }
3952 }
3953 /* UNREACHABLE */;
3954 abort();
3955 }
3956 case s_n_llhttp__internal__n_url_server:
3957 s_n_llhttp__internal__n_url_server: {
3958 static uint8_t lookup_table[] = {
3959 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
3960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3961 4, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6,
3962 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 7,
3963 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3964 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5,
3965 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
3966 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 0,
3967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3975 };
3976 if (p == endp) {
3977 return s_n_llhttp__internal__n_url_server;
3978 }
3979 switch (lookup_table[(uint8_t) *p]) {
3980 case 1: {
3981 p++;
3982 goto s_n_llhttp__internal__n_error_2;
3983 }
3984 case 2: {
3985 goto s_n_llhttp__internal__n_span_end_llhttp__on_url;
3986 }
3987 case 3: {
3988 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_1;
3989 }
3990 case 4: {
3991 goto s_n_llhttp__internal__n_span_end_llhttp__on_url_2;
3992 }
3993 case 5: {
3994 p++;
3995 goto s_n_llhttp__internal__n_url_server;
3996 }
3997 case 6: {
3998 goto s_n_llhttp__internal__n_span_start_stub_path;
3999 }
4000 case 7: {
4001 p++;
4002 goto s_n_llhttp__internal__n_url_query;
4003 }
4004 case 8: {
4005 p++;
4006 goto s_n_llhttp__internal__n_url_server_with_at;
4007 }
4008 default: {
4009 goto s_n_llhttp__internal__n_error_82;
4010 }
4011 }
4012 /* UNREACHABLE */;
4013 abort();
4014 }
4015 case s_n_llhttp__internal__n_url_schema_delim_1:
4016 s_n_llhttp__internal__n_url_schema_delim_1: {
4017 if (p == endp) {
4018 return s_n_llhttp__internal__n_url_schema_delim_1;
4019 }
4020 switch (*p) {
4021 case '/': {
4022 p++;
4023 goto s_n_llhttp__internal__n_url_server;
4024 }
4025 default: {
4026 goto s_n_llhttp__internal__n_error_83;
4027 }
4028 }
4029 /* UNREACHABLE */;
4030 abort();
4031 }
4032 case s_n_llhttp__internal__n_url_schema_delim:
4033 s_n_llhttp__internal__n_url_schema_delim: {
4034 if (p == endp) {
4035 return s_n_llhttp__internal__n_url_schema_delim;
4036 }
4037 switch (*p) {
4038 case 9: {
4039 p++;
4040 goto s_n_llhttp__internal__n_error_2;
4041 }
4042 case 10: {
4043 p++;
4044 goto s_n_llhttp__internal__n_error_2;
4045 }
4046 case 12: {
4047 p++;
4048 goto s_n_llhttp__internal__n_error_2;
4049 }
4050 case 13: {
4051 p++;
4052 goto s_n_llhttp__internal__n_error_2;
4053 }
4054 case ' ': {
4055 p++;
4056 goto s_n_llhttp__internal__n_error_2;
4057 }
4058 case '/': {
4059 p++;
4060 goto s_n_llhttp__internal__n_url_schema_delim_1;
4061 }
4062 default: {
4063 goto s_n_llhttp__internal__n_error_83;
4064 }
4065 }
4066 /* UNREACHABLE */;
4067 abort();
4068 }
4069 case s_n_llhttp__internal__n_span_end_stub_schema:
4070 s_n_llhttp__internal__n_span_end_stub_schema: {
4071 if (p == endp) {
4072 return s_n_llhttp__internal__n_span_end_stub_schema;
4073 }
4074 p++;
4075 goto s_n_llhttp__internal__n_url_schema_delim;
4076 /* UNREACHABLE */;
4077 abort();
4078 }
4079 case s_n_llhttp__internal__n_url_schema:
4080 s_n_llhttp__internal__n_url_schema: {
4081 static uint8_t lookup_table[] = {
4082 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
4083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4084 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
4086 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4087 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
4088 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4089 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
4090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4091 0, 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, 0, 0, 0, 0, 0,
4093 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4094 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4097 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
4098 };
4099 if (p == endp) {
4100 return s_n_llhttp__internal__n_url_schema;
4101 }
4102 switch (lookup_table[(uint8_t) *p]) {
4103 case 1: {
4104 p++;
4105 goto s_n_llhttp__internal__n_error_2;
4106 }
4107 case 2: {
4108 goto s_n_llhttp__internal__n_span_end_stub_schema;
4109 }
4110 case 3: {
4111 p++;
4112 goto s_n_llhttp__internal__n_url_schema;
4113 }
4114 default: {
4115 goto s_n_llhttp__internal__n_error_84;
4116 }
4117 }
4118 /* UNREACHABLE */;
4119 abort();
4120 }
4121 case s_n_llhttp__internal__n_url_start:
4122 s_n_llhttp__internal__n_url_start: {
4123 static uint8_t lookup_table[] = {
4124 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0,
4125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4126 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2,
4127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4128 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4129 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
4130 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4131 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
4132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
4140 };
4141 if (p == endp) {
4142 return s_n_llhttp__internal__n_url_start;
4143 }
4144 switch (lookup_table[(uint8_t) *p]) {
4145 case 1: {
4146 p++;
4147 goto s_n_llhttp__internal__n_error_2;
4148 }
4149 case 2: {
4150 goto s_n_llhttp__internal__n_span_start_stub_path_2;
4151 }
4152 case 3: {
4153 goto s_n_llhttp__internal__n_url_schema;
4154 }
4155 default: {
4156 goto s_n_llhttp__internal__n_error_85;
4157 }
4158 }
4159 /* UNREACHABLE */;
4160 abort();
4161 }
4162 case s_n_llhttp__internal__n_span_start_llhttp__on_url_1:
4163 s_n_llhttp__internal__n_span_start_llhttp__on_url_1: {
4164 if (p == endp) {
4165 return s_n_llhttp__internal__n_span_start_llhttp__on_url_1;
4166 }
4167 state->_span_pos0 = (void*) p;
4168 state->_span_cb0 = llhttp__on_url;
4169 goto s_n_llhttp__internal__n_url_start;
4170 /* UNREACHABLE */;
4171 abort();
4172 }
4173 case s_n_llhttp__internal__n_url_entry_normal:
4174 s_n_llhttp__internal__n_url_entry_normal: {
4175 if (p == endp) {
4176 return s_n_llhttp__internal__n_url_entry_normal;
4177 }
4178 switch (*p) {
4179 case 9: {
4180 p++;
4181 goto s_n_llhttp__internal__n_error_2;
4182 }
4183 case 12: {
4184 p++;
4185 goto s_n_llhttp__internal__n_error_2;
4186 }
4187 default: {
4188 goto s_n_llhttp__internal__n_span_start_llhttp__on_url_1;
4189 }
4190 }
4191 /* UNREACHABLE */;
4192 abort();
4193 }
4194 case s_n_llhttp__internal__n_span_start_llhttp__on_url:
4195 s_n_llhttp__internal__n_span_start_llhttp__on_url: {
4196 if (p == endp) {
4197 return s_n_llhttp__internal__n_span_start_llhttp__on_url;
4198 }
4199 state->_span_pos0 = (void*) p;
4200 state->_span_cb0 = llhttp__on_url;
4201 goto s_n_llhttp__internal__n_url_server;
4202 /* UNREACHABLE */;
4203 abort();
4204 }
4205 case s_n_llhttp__internal__n_url_entry_connect:
4206 s_n_llhttp__internal__n_url_entry_connect: {
4207 if (p == endp) {
4208 return s_n_llhttp__internal__n_url_entry_connect;
4209 }
4210 switch (*p) {
4211 case 9: {
4212 p++;
4213 goto s_n_llhttp__internal__n_error_2;
4214 }
4215 case 12: {
4216 p++;
4217 goto s_n_llhttp__internal__n_error_2;
4218 }
4219 default: {
4220 goto s_n_llhttp__internal__n_span_start_llhttp__on_url;
4221 }
4222 }
4223 /* UNREACHABLE */;
4224 abort();
4225 }
4226 case s_n_llhttp__internal__n_req_spaces_before_url:
4227 s_n_llhttp__internal__n_req_spaces_before_url: {
4228 if (p == endp) {
4229 return s_n_llhttp__internal__n_req_spaces_before_url;
4230 }
4231 switch (*p) {
4232 case ' ': {
4233 p++;
4234 goto s_n_llhttp__internal__n_req_spaces_before_url;
4235 }
4236 default: {
4237 goto s_n_llhttp__internal__n_invoke_is_equal_method;
4238 }
4239 }
4240 /* UNREACHABLE */;
4241 abort();
4242 }
4243 case s_n_llhttp__internal__n_req_first_space_before_url:
4244 s_n_llhttp__internal__n_req_first_space_before_url: {
4245 if (p == endp) {
4246 return s_n_llhttp__internal__n_req_first_space_before_url;
4247 }
4248 switch (*p) {
4249 case ' ': {
4250 p++;
4251 goto s_n_llhttp__internal__n_req_spaces_before_url;
4252 }
4253 default: {
4254 goto s_n_llhttp__internal__n_error_86;
4255 }
4256 }
4257 /* UNREACHABLE */;
4258 abort();
4259 }
4260 case s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1:
4261 s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1: {
4262 switch (llhttp__on_method_complete(state, p, endp)) {
4263 case 0:
4264 goto s_n_llhttp__internal__n_req_first_space_before_url;
4265 case 21:
4266 goto s_n_llhttp__internal__n_pause_26;
4267 default:
4268 goto s_n_llhttp__internal__n_error_105;
4269 }
4270 /* UNREACHABLE */;
4271 abort();
4272 }
4273 case s_n_llhttp__internal__n_after_start_req_2:
4274 s_n_llhttp__internal__n_after_start_req_2: {
4275 if (p == endp) {
4276 return s_n_llhttp__internal__n_after_start_req_2;
4277 }
4278 switch (*p) {
4279 case 'L': {
4280 p++;
4281 match = 19;
4282 goto s_n_llhttp__internal__n_invoke_store_method_1;
4283 }
4284 default: {
4285 goto s_n_llhttp__internal__n_error_106;
4286 }
4287 }
4288 /* UNREACHABLE */;
4289 abort();
4290 }
4291 case s_n_llhttp__internal__n_after_start_req_3:
4292 s_n_llhttp__internal__n_after_start_req_3: {
4293 llparse_match_t match_seq;
4294
4295 if (p == endp) {
4296 return s_n_llhttp__internal__n_after_start_req_3;
4297 }
4298 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 6);
4299 p = match_seq.current;
4300 switch (match_seq.status) {
4301 case kMatchComplete: {
4302 p++;
4303 match = 36;
4304 goto s_n_llhttp__internal__n_invoke_store_method_1;
4305 }
4306 case kMatchPause: {
4307 return s_n_llhttp__internal__n_after_start_req_3;
4308 }
4309 case kMatchMismatch: {
4310 goto s_n_llhttp__internal__n_error_106;
4311 }
4312 }
4313 /* UNREACHABLE */;
4314 abort();
4315 }
4316 case s_n_llhttp__internal__n_after_start_req_1:
4317 s_n_llhttp__internal__n_after_start_req_1: {
4318 if (p == endp) {
4319 return s_n_llhttp__internal__n_after_start_req_1;
4320 }
4321 switch (*p) {
4322 case 'C': {
4323 p++;
4324 goto s_n_llhttp__internal__n_after_start_req_2;
4325 }
4326 case 'N': {
4327 p++;
4328 goto s_n_llhttp__internal__n_after_start_req_3;
4329 }
4330 default: {
4331 goto s_n_llhttp__internal__n_error_106;
4332 }
4333 }
4334 /* UNREACHABLE */;
4335 abort();
4336 }
4337 case s_n_llhttp__internal__n_after_start_req_4:
4338 s_n_llhttp__internal__n_after_start_req_4: {
4339 llparse_match_t match_seq;
4340
4341 if (p == endp) {
4342 return s_n_llhttp__internal__n_after_start_req_4;
4343 }
4344 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 3);
4345 p = match_seq.current;
4346 switch (match_seq.status) {
4347 case kMatchComplete: {
4348 p++;
4349 match = 16;
4350 goto s_n_llhttp__internal__n_invoke_store_method_1;
4351 }
4352 case kMatchPause: {
4353 return s_n_llhttp__internal__n_after_start_req_4;
4354 }
4355 case kMatchMismatch: {
4356 goto s_n_llhttp__internal__n_error_106;
4357 }
4358 }
4359 /* UNREACHABLE */;
4360 abort();
4361 }
4362 case s_n_llhttp__internal__n_after_start_req_6:
4363 s_n_llhttp__internal__n_after_start_req_6: {
4364 llparse_match_t match_seq;
4365
4366 if (p == endp) {
4367 return s_n_llhttp__internal__n_after_start_req_6;
4368 }
4369 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6);
4370 p = match_seq.current;
4371 switch (match_seq.status) {
4372 case kMatchComplete: {
4373 p++;
4374 match = 22;
4375 goto s_n_llhttp__internal__n_invoke_store_method_1;
4376 }
4377 case kMatchPause: {
4378 return s_n_llhttp__internal__n_after_start_req_6;
4379 }
4380 case kMatchMismatch: {
4381 goto s_n_llhttp__internal__n_error_106;
4382 }
4383 }
4384 /* UNREACHABLE */;
4385 abort();
4386 }
4387 case s_n_llhttp__internal__n_after_start_req_8:
4388 s_n_llhttp__internal__n_after_start_req_8: {
4389 llparse_match_t match_seq;
4390
4391 if (p == endp) {
4392 return s_n_llhttp__internal__n_after_start_req_8;
4393 }
4394 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 4);
4395 p = match_seq.current;
4396 switch (match_seq.status) {
4397 case kMatchComplete: {
4398 p++;
4399 match = 5;
4400 goto s_n_llhttp__internal__n_invoke_store_method_1;
4401 }
4402 case kMatchPause: {
4403 return s_n_llhttp__internal__n_after_start_req_8;
4404 }
4405 case kMatchMismatch: {
4406 goto s_n_llhttp__internal__n_error_106;
4407 }
4408 }
4409 /* UNREACHABLE */;
4410 abort();
4411 }
4412 case s_n_llhttp__internal__n_after_start_req_9:
4413 s_n_llhttp__internal__n_after_start_req_9: {
4414 if (p == endp) {
4415 return s_n_llhttp__internal__n_after_start_req_9;
4416 }
4417 switch (*p) {
4418 case 'Y': {
4419 p++;
4420 match = 8;
4421 goto s_n_llhttp__internal__n_invoke_store_method_1;
4422 }
4423 default: {
4424 goto s_n_llhttp__internal__n_error_106;
4425 }
4426 }
4427 /* UNREACHABLE */;
4428 abort();
4429 }
4430 case s_n_llhttp__internal__n_after_start_req_7:
4431 s_n_llhttp__internal__n_after_start_req_7: {
4432 if (p == endp) {
4433 return s_n_llhttp__internal__n_after_start_req_7;
4434 }
4435 switch (*p) {
4436 case 'N': {
4437 p++;
4438 goto s_n_llhttp__internal__n_after_start_req_8;
4439 }
4440 case 'P': {
4441 p++;
4442 goto s_n_llhttp__internal__n_after_start_req_9;
4443 }
4444 default: {
4445 goto s_n_llhttp__internal__n_error_106;
4446 }
4447 }
4448 /* UNREACHABLE */;
4449 abort();
4450 }
4451 case s_n_llhttp__internal__n_after_start_req_5:
4452 s_n_llhttp__internal__n_after_start_req_5: {
4453 if (p == endp) {
4454 return s_n_llhttp__internal__n_after_start_req_5;
4455 }
4456 switch (*p) {
4457 case 'H': {
4458 p++;
4459 goto s_n_llhttp__internal__n_after_start_req_6;
4460 }
4461 case 'O': {
4462 p++;
4463 goto s_n_llhttp__internal__n_after_start_req_7;
4464 }
4465 default: {
4466 goto s_n_llhttp__internal__n_error_106;
4467 }
4468 }
4469 /* UNREACHABLE */;
4470 abort();
4471 }
4472 case s_n_llhttp__internal__n_after_start_req_12:
4473 s_n_llhttp__internal__n_after_start_req_12: {
4474 llparse_match_t match_seq;
4475
4476 if (p == endp) {
4477 return s_n_llhttp__internal__n_after_start_req_12;
4478 }
4479 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 3);
4480 p = match_seq.current;
4481 switch (match_seq.status) {
4482 case kMatchComplete: {
4483 p++;
4484 match = 0;
4485 goto s_n_llhttp__internal__n_invoke_store_method_1;
4486 }
4487 case kMatchPause: {
4488 return s_n_llhttp__internal__n_after_start_req_12;
4489 }
4490 case kMatchMismatch: {
4491 goto s_n_llhttp__internal__n_error_106;
4492 }
4493 }
4494 /* UNREACHABLE */;
4495 abort();
4496 }
4497 case s_n_llhttp__internal__n_after_start_req_13:
4498 s_n_llhttp__internal__n_after_start_req_13: {
4499 llparse_match_t match_seq;
4500
4501 if (p == endp) {
4502 return s_n_llhttp__internal__n_after_start_req_13;
4503 }
4504 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 5);
4505 p = match_seq.current;
4506 switch (match_seq.status) {
4507 case kMatchComplete: {
4508 p++;
4509 match = 35;
4510 goto s_n_llhttp__internal__n_invoke_store_method_1;
4511 }
4512 case kMatchPause: {
4513 return s_n_llhttp__internal__n_after_start_req_13;
4514 }
4515 case kMatchMismatch: {
4516 goto s_n_llhttp__internal__n_error_106;
4517 }
4518 }
4519 /* UNREACHABLE */;
4520 abort();
4521 }
4522 case s_n_llhttp__internal__n_after_start_req_11:
4523 s_n_llhttp__internal__n_after_start_req_11: {
4524 if (p == endp) {
4525 return s_n_llhttp__internal__n_after_start_req_11;
4526 }
4527 switch (*p) {
4528 case 'L': {
4529 p++;
4530 goto s_n_llhttp__internal__n_after_start_req_12;
4531 }
4532 case 'S': {
4533 p++;
4534 goto s_n_llhttp__internal__n_after_start_req_13;
4535 }
4536 default: {
4537 goto s_n_llhttp__internal__n_error_106;
4538 }
4539 }
4540 /* UNREACHABLE */;
4541 abort();
4542 }
4543 case s_n_llhttp__internal__n_after_start_req_10:
4544 s_n_llhttp__internal__n_after_start_req_10: {
4545 if (p == endp) {
4546 return s_n_llhttp__internal__n_after_start_req_10;
4547 }
4548 switch (*p) {
4549 case 'E': {
4550 p++;
4551 goto s_n_llhttp__internal__n_after_start_req_11;
4552 }
4553 default: {
4554 goto s_n_llhttp__internal__n_error_106;
4555 }
4556 }
4557 /* UNREACHABLE */;
4558 abort();
4559 }
4560 case s_n_llhttp__internal__n_after_start_req_14:
4561 s_n_llhttp__internal__n_after_start_req_14: {
4562 llparse_match_t match_seq;
4563
4564 if (p == endp) {
4565 return s_n_llhttp__internal__n_after_start_req_14;
4566 }
4567 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 4);
4568 p = match_seq.current;
4569 switch (match_seq.status) {
4570 case kMatchComplete: {
4571 p++;
4572 match = 45;
4573 goto s_n_llhttp__internal__n_invoke_store_method_1;
4574 }
4575 case kMatchPause: {
4576 return s_n_llhttp__internal__n_after_start_req_14;
4577 }
4578 case kMatchMismatch: {
4579 goto s_n_llhttp__internal__n_error_106;
4580 }
4581 }
4582 /* UNREACHABLE */;
4583 abort();
4584 }
4585 case s_n_llhttp__internal__n_after_start_req_17:
4586 s_n_llhttp__internal__n_after_start_req_17: {
4587 llparse_match_t match_seq;
4588
4589 if (p == endp) {
4590 return s_n_llhttp__internal__n_after_start_req_17;
4591 }
4592 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 9);
4593 p = match_seq.current;
4594 switch (match_seq.status) {
4595 case kMatchComplete: {
4596 p++;
4597 match = 41;
4598 goto s_n_llhttp__internal__n_invoke_store_method_1;
4599 }
4600 case kMatchPause: {
4601 return s_n_llhttp__internal__n_after_start_req_17;
4602 }
4603 case kMatchMismatch: {
4604 goto s_n_llhttp__internal__n_error_106;
4605 }
4606 }
4607 /* UNREACHABLE */;
4608 abort();
4609 }
4610 case s_n_llhttp__internal__n_after_start_req_16:
4611 s_n_llhttp__internal__n_after_start_req_16: {
4612 if (p == endp) {
4613 return s_n_llhttp__internal__n_after_start_req_16;
4614 }
4615 switch (*p) {
4616 case '_': {
4617 p++;
4618 goto s_n_llhttp__internal__n_after_start_req_17;
4619 }
4620 default: {
4621 match = 1;
4622 goto s_n_llhttp__internal__n_invoke_store_method_1;
4623 }
4624 }
4625 /* UNREACHABLE */;
4626 abort();
4627 }
4628 case s_n_llhttp__internal__n_after_start_req_15:
4629 s_n_llhttp__internal__n_after_start_req_15: {
4630 llparse_match_t match_seq;
4631
4632 if (p == endp) {
4633 return s_n_llhttp__internal__n_after_start_req_15;
4634 }
4635 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2);
4636 p = match_seq.current;
4637 switch (match_seq.status) {
4638 case kMatchComplete: {
4639 p++;
4640 goto s_n_llhttp__internal__n_after_start_req_16;
4641 }
4642 case kMatchPause: {
4643 return s_n_llhttp__internal__n_after_start_req_15;
4644 }
4645 case kMatchMismatch: {
4646 goto s_n_llhttp__internal__n_error_106;
4647 }
4648 }
4649 /* UNREACHABLE */;
4650 abort();
4651 }
4652 case s_n_llhttp__internal__n_after_start_req_18:
4653 s_n_llhttp__internal__n_after_start_req_18: {
4654 llparse_match_t match_seq;
4655
4656 if (p == endp) {
4657 return s_n_llhttp__internal__n_after_start_req_18;
4658 }
4659 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 3);
4660 p = match_seq.current;
4661 switch (match_seq.status) {
4662 case kMatchComplete: {
4663 p++;
4664 match = 2;
4665 goto s_n_llhttp__internal__n_invoke_store_method_1;
4666 }
4667 case kMatchPause: {
4668 return s_n_llhttp__internal__n_after_start_req_18;
4669 }
4670 case kMatchMismatch: {
4671 goto s_n_llhttp__internal__n_error_106;
4672 }
4673 }
4674 /* UNREACHABLE */;
4675 abort();
4676 }
4677 case s_n_llhttp__internal__n_after_start_req_20:
4678 s_n_llhttp__internal__n_after_start_req_20: {
4679 llparse_match_t match_seq;
4680
4681 if (p == endp) {
4682 return s_n_llhttp__internal__n_after_start_req_20;
4683 }
4684 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 2);
4685 p = match_seq.current;
4686 switch (match_seq.status) {
4687 case kMatchComplete: {
4688 p++;
4689 match = 31;
4690 goto s_n_llhttp__internal__n_invoke_store_method_1;
4691 }
4692 case kMatchPause: {
4693 return s_n_llhttp__internal__n_after_start_req_20;
4694 }
4695 case kMatchMismatch: {
4696 goto s_n_llhttp__internal__n_error_106;
4697 }
4698 }
4699 /* UNREACHABLE */;
4700 abort();
4701 }
4702 case s_n_llhttp__internal__n_after_start_req_21:
4703 s_n_llhttp__internal__n_after_start_req_21: {
4704 llparse_match_t match_seq;
4705
4706 if (p == endp) {
4707 return s_n_llhttp__internal__n_after_start_req_21;
4708 }
4709 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 2);
4710 p = match_seq.current;
4711 switch (match_seq.status) {
4712 case kMatchComplete: {
4713 p++;
4714 match = 9;
4715 goto s_n_llhttp__internal__n_invoke_store_method_1;
4716 }
4717 case kMatchPause: {
4718 return s_n_llhttp__internal__n_after_start_req_21;
4719 }
4720 case kMatchMismatch: {
4721 goto s_n_llhttp__internal__n_error_106;
4722 }
4723 }
4724 /* UNREACHABLE */;
4725 abort();
4726 }
4727 case s_n_llhttp__internal__n_after_start_req_19:
4728 s_n_llhttp__internal__n_after_start_req_19: {
4729 if (p == endp) {
4730 return s_n_llhttp__internal__n_after_start_req_19;
4731 }
4732 switch (*p) {
4733 case 'I': {
4734 p++;
4735 goto s_n_llhttp__internal__n_after_start_req_20;
4736 }
4737 case 'O': {
4738 p++;
4739 goto s_n_llhttp__internal__n_after_start_req_21;
4740 }
4741 default: {
4742 goto s_n_llhttp__internal__n_error_106;
4743 }
4744 }
4745 /* UNREACHABLE */;
4746 abort();
4747 }
4748 case s_n_llhttp__internal__n_after_start_req_23:
4749 s_n_llhttp__internal__n_after_start_req_23: {
4750 llparse_match_t match_seq;
4751
4752 if (p == endp) {
4753 return s_n_llhttp__internal__n_after_start_req_23;
4754 }
4755 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 6);
4756 p = match_seq.current;
4757 switch (match_seq.status) {
4758 case kMatchComplete: {
4759 p++;
4760 match = 24;
4761 goto s_n_llhttp__internal__n_invoke_store_method_1;
4762 }
4763 case kMatchPause: {
4764 return s_n_llhttp__internal__n_after_start_req_23;
4765 }
4766 case kMatchMismatch: {
4767 goto s_n_llhttp__internal__n_error_106;
4768 }
4769 }
4770 /* UNREACHABLE */;
4771 abort();
4772 }
4773 case s_n_llhttp__internal__n_after_start_req_24:
4774 s_n_llhttp__internal__n_after_start_req_24: {
4775 llparse_match_t match_seq;
4776
4777 if (p == endp) {
4778 return s_n_llhttp__internal__n_after_start_req_24;
4779 }
4780 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 3);
4781 p = match_seq.current;
4782 switch (match_seq.status) {
4783 case kMatchComplete: {
4784 p++;
4785 match = 23;
4786 goto s_n_llhttp__internal__n_invoke_store_method_1;
4787 }
4788 case kMatchPause: {
4789 return s_n_llhttp__internal__n_after_start_req_24;
4790 }
4791 case kMatchMismatch: {
4792 goto s_n_llhttp__internal__n_error_106;
4793 }
4794 }
4795 /* UNREACHABLE */;
4796 abort();
4797 }
4798 case s_n_llhttp__internal__n_after_start_req_26:
4799 s_n_llhttp__internal__n_after_start_req_26: {
4800 llparse_match_t match_seq;
4801
4802 if (p == endp) {
4803 return s_n_llhttp__internal__n_after_start_req_26;
4804 }
4805 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 7);
4806 p = match_seq.current;
4807 switch (match_seq.status) {
4808 case kMatchComplete: {
4809 p++;
4810 match = 21;
4811 goto s_n_llhttp__internal__n_invoke_store_method_1;
4812 }
4813 case kMatchPause: {
4814 return s_n_llhttp__internal__n_after_start_req_26;
4815 }
4816 case kMatchMismatch: {
4817 goto s_n_llhttp__internal__n_error_106;
4818 }
4819 }
4820 /* UNREACHABLE */;
4821 abort();
4822 }
4823 case s_n_llhttp__internal__n_after_start_req_28:
4824 s_n_llhttp__internal__n_after_start_req_28: {
4825 llparse_match_t match_seq;
4826
4827 if (p == endp) {
4828 return s_n_llhttp__internal__n_after_start_req_28;
4829 }
4830 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 6);
4831 p = match_seq.current;
4832 switch (match_seq.status) {
4833 case kMatchComplete: {
4834 p++;
4835 match = 30;
4836 goto s_n_llhttp__internal__n_invoke_store_method_1;
4837 }
4838 case kMatchPause: {
4839 return s_n_llhttp__internal__n_after_start_req_28;
4840 }
4841 case kMatchMismatch: {
4842 goto s_n_llhttp__internal__n_error_106;
4843 }
4844 }
4845 /* UNREACHABLE */;
4846 abort();
4847 }
4848 case s_n_llhttp__internal__n_after_start_req_29:
4849 s_n_llhttp__internal__n_after_start_req_29: {
4850 if (p == endp) {
4851 return s_n_llhttp__internal__n_after_start_req_29;
4852 }
4853 switch (*p) {
4854 case 'L': {
4855 p++;
4856 match = 10;
4857 goto s_n_llhttp__internal__n_invoke_store_method_1;
4858 }
4859 default: {
4860 goto s_n_llhttp__internal__n_error_106;
4861 }
4862 }
4863 /* UNREACHABLE */;
4864 abort();
4865 }
4866 case s_n_llhttp__internal__n_after_start_req_27:
4867 s_n_llhttp__internal__n_after_start_req_27: {
4868 if (p == endp) {
4869 return s_n_llhttp__internal__n_after_start_req_27;
4870 }
4871 switch (*p) {
4872 case 'A': {
4873 p++;
4874 goto s_n_llhttp__internal__n_after_start_req_28;
4875 }
4876 case 'O': {
4877 p++;
4878 goto s_n_llhttp__internal__n_after_start_req_29;
4879 }
4880 default: {
4881 goto s_n_llhttp__internal__n_error_106;
4882 }
4883 }
4884 /* UNREACHABLE */;
4885 abort();
4886 }
4887 case s_n_llhttp__internal__n_after_start_req_25:
4888 s_n_llhttp__internal__n_after_start_req_25: {
4889 if (p == endp) {
4890 return s_n_llhttp__internal__n_after_start_req_25;
4891 }
4892 switch (*p) {
4893 case 'A': {
4894 p++;
4895 goto s_n_llhttp__internal__n_after_start_req_26;
4896 }
4897 case 'C': {
4898 p++;
4899 goto s_n_llhttp__internal__n_after_start_req_27;
4900 }
4901 default: {
4902 goto s_n_llhttp__internal__n_error_106;
4903 }
4904 }
4905 /* UNREACHABLE */;
4906 abort();
4907 }
4908 case s_n_llhttp__internal__n_after_start_req_30:
4909 s_n_llhttp__internal__n_after_start_req_30: {
4910 llparse_match_t match_seq;
4911
4912 if (p == endp) {
4913 return s_n_llhttp__internal__n_after_start_req_30;
4914 }
4915 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 2);
4916 p = match_seq.current;
4917 switch (match_seq.status) {
4918 case kMatchComplete: {
4919 p++;
4920 match = 11;
4921 goto s_n_llhttp__internal__n_invoke_store_method_1;
4922 }
4923 case kMatchPause: {
4924 return s_n_llhttp__internal__n_after_start_req_30;
4925 }
4926 case kMatchMismatch: {
4927 goto s_n_llhttp__internal__n_error_106;
4928 }
4929 }
4930 /* UNREACHABLE */;
4931 abort();
4932 }
4933 case s_n_llhttp__internal__n_after_start_req_22:
4934 s_n_llhttp__internal__n_after_start_req_22: {
4935 if (p == endp) {
4936 return s_n_llhttp__internal__n_after_start_req_22;
4937 }
4938 switch (*p) {
4939 case '-': {
4940 p++;
4941 goto s_n_llhttp__internal__n_after_start_req_23;
4942 }
4943 case 'E': {
4944 p++;
4945 goto s_n_llhttp__internal__n_after_start_req_24;
4946 }
4947 case 'K': {
4948 p++;
4949 goto s_n_llhttp__internal__n_after_start_req_25;
4950 }
4951 case 'O': {
4952 p++;
4953 goto s_n_llhttp__internal__n_after_start_req_30;
4954 }
4955 default: {
4956 goto s_n_llhttp__internal__n_error_106;
4957 }
4958 }
4959 /* UNREACHABLE */;
4960 abort();
4961 }
4962 case s_n_llhttp__internal__n_after_start_req_31:
4963 s_n_llhttp__internal__n_after_start_req_31: {
4964 llparse_match_t match_seq;
4965
4966 if (p == endp) {
4967 return s_n_llhttp__internal__n_after_start_req_31;
4968 }
4969 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 5);
4970 p = match_seq.current;
4971 switch (match_seq.status) {
4972 case kMatchComplete: {
4973 p++;
4974 match = 25;
4975 goto s_n_llhttp__internal__n_invoke_store_method_1;
4976 }
4977 case kMatchPause: {
4978 return s_n_llhttp__internal__n_after_start_req_31;
4979 }
4980 case kMatchMismatch: {
4981 goto s_n_llhttp__internal__n_error_106;
4982 }
4983 }
4984 /* UNREACHABLE */;
4985 abort();
4986 }
4987 case s_n_llhttp__internal__n_after_start_req_32:
4988 s_n_llhttp__internal__n_after_start_req_32: {
4989 llparse_match_t match_seq;
4990
4991 if (p == endp) {
4992 return s_n_llhttp__internal__n_after_start_req_32;
4993 }
4994 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 6);
4995 p = match_seq.current;
4996 switch (match_seq.status) {
4997 case kMatchComplete: {
4998 p++;
4999 match = 6;
5000 goto s_n_llhttp__internal__n_invoke_store_method_1;
5001 }
5002 case kMatchPause: {
5003 return s_n_llhttp__internal__n_after_start_req_32;
5004 }
5005 case kMatchMismatch: {
5006 goto s_n_llhttp__internal__n_error_106;
5007 }
5008 }
5009 /* UNREACHABLE */;
5010 abort();
5011 }
5012 case s_n_llhttp__internal__n_after_start_req_35:
5013 s_n_llhttp__internal__n_after_start_req_35: {
5014 llparse_match_t match_seq;
5015
5016 if (p == endp) {
5017 return s_n_llhttp__internal__n_after_start_req_35;
5018 }
5019 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 2);
5020 p = match_seq.current;
5021 switch (match_seq.status) {
5022 case kMatchComplete: {
5023 p++;
5024 match = 28;
5025 goto s_n_llhttp__internal__n_invoke_store_method_1;
5026 }
5027 case kMatchPause: {
5028 return s_n_llhttp__internal__n_after_start_req_35;
5029 }
5030 case kMatchMismatch: {
5031 goto s_n_llhttp__internal__n_error_106;
5032 }
5033 }
5034 /* UNREACHABLE */;
5035 abort();
5036 }
5037 case s_n_llhttp__internal__n_after_start_req_36:
5038 s_n_llhttp__internal__n_after_start_req_36: {
5039 llparse_match_t match_seq;
5040
5041 if (p == endp) {
5042 return s_n_llhttp__internal__n_after_start_req_36;
5043 }
5044 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2);
5045 p = match_seq.current;
5046 switch (match_seq.status) {
5047 case kMatchComplete: {
5048 p++;
5049 match = 39;
5050 goto s_n_llhttp__internal__n_invoke_store_method_1;
5051 }
5052 case kMatchPause: {
5053 return s_n_llhttp__internal__n_after_start_req_36;
5054 }
5055 case kMatchMismatch: {
5056 goto s_n_llhttp__internal__n_error_106;
5057 }
5058 }
5059 /* UNREACHABLE */;
5060 abort();
5061 }
5062 case s_n_llhttp__internal__n_after_start_req_34:
5063 s_n_llhttp__internal__n_after_start_req_34: {
5064 if (p == endp) {
5065 return s_n_llhttp__internal__n_after_start_req_34;
5066 }
5067 switch (*p) {
5068 case 'T': {
5069 p++;
5070 goto s_n_llhttp__internal__n_after_start_req_35;
5071 }
5072 case 'U': {
5073 p++;
5074 goto s_n_llhttp__internal__n_after_start_req_36;
5075 }
5076 default: {
5077 goto s_n_llhttp__internal__n_error_106;
5078 }
5079 }
5080 /* UNREACHABLE */;
5081 abort();
5082 }
5083 case s_n_llhttp__internal__n_after_start_req_37:
5084 s_n_llhttp__internal__n_after_start_req_37: {
5085 llparse_match_t match_seq;
5086
5087 if (p == endp) {
5088 return s_n_llhttp__internal__n_after_start_req_37;
5089 }
5090 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2);
5091 p = match_seq.current;
5092 switch (match_seq.status) {
5093 case kMatchComplete: {
5094 p++;
5095 match = 38;
5096 goto s_n_llhttp__internal__n_invoke_store_method_1;
5097 }
5098 case kMatchPause: {
5099 return s_n_llhttp__internal__n_after_start_req_37;
5100 }
5101 case kMatchMismatch: {
5102 goto s_n_llhttp__internal__n_error_106;
5103 }
5104 }
5105 /* UNREACHABLE */;
5106 abort();
5107 }
5108 case s_n_llhttp__internal__n_after_start_req_38:
5109 s_n_llhttp__internal__n_after_start_req_38: {
5110 llparse_match_t match_seq;
5111
5112 if (p == endp) {
5113 return s_n_llhttp__internal__n_after_start_req_38;
5114 }
5115 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2);
5116 p = match_seq.current;
5117 switch (match_seq.status) {
5118 case kMatchComplete: {
5119 p++;
5120 match = 3;
5121 goto s_n_llhttp__internal__n_invoke_store_method_1;
5122 }
5123 case kMatchPause: {
5124 return s_n_llhttp__internal__n_after_start_req_38;
5125 }
5126 case kMatchMismatch: {
5127 goto s_n_llhttp__internal__n_error_106;
5128 }
5129 }
5130 /* UNREACHABLE */;
5131 abort();
5132 }
5133 case s_n_llhttp__internal__n_after_start_req_42:
5134 s_n_llhttp__internal__n_after_start_req_42: {
5135 llparse_match_t match_seq;
5136
5137 if (p == endp) {
5138 return s_n_llhttp__internal__n_after_start_req_42;
5139 }
5140 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 3);
5141 p = match_seq.current;
5142 switch (match_seq.status) {
5143 case kMatchComplete: {
5144 p++;
5145 match = 12;
5146 goto s_n_llhttp__internal__n_invoke_store_method_1;
5147 }
5148 case kMatchPause: {
5149 return s_n_llhttp__internal__n_after_start_req_42;
5150 }
5151 case kMatchMismatch: {
5152 goto s_n_llhttp__internal__n_error_106;
5153 }
5154 }
5155 /* UNREACHABLE */;
5156 abort();
5157 }
5158 case s_n_llhttp__internal__n_after_start_req_43:
5159 s_n_llhttp__internal__n_after_start_req_43: {
5160 llparse_match_t match_seq;
5161
5162 if (p == endp) {
5163 return s_n_llhttp__internal__n_after_start_req_43;
5164 }
5165 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 4);
5166 p = match_seq.current;
5167 switch (match_seq.status) {
5168 case kMatchComplete: {
5169 p++;
5170 match = 13;
5171 goto s_n_llhttp__internal__n_invoke_store_method_1;
5172 }
5173 case kMatchPause: {
5174 return s_n_llhttp__internal__n_after_start_req_43;
5175 }
5176 case kMatchMismatch: {
5177 goto s_n_llhttp__internal__n_error_106;
5178 }
5179 }
5180 /* UNREACHABLE */;
5181 abort();
5182 }
5183 case s_n_llhttp__internal__n_after_start_req_41:
5184 s_n_llhttp__internal__n_after_start_req_41: {
5185 if (p == endp) {
5186 return s_n_llhttp__internal__n_after_start_req_41;
5187 }
5188 switch (*p) {
5189 case 'F': {
5190 p++;
5191 goto s_n_llhttp__internal__n_after_start_req_42;
5192 }
5193 case 'P': {
5194 p++;
5195 goto s_n_llhttp__internal__n_after_start_req_43;
5196 }
5197 default: {
5198 goto s_n_llhttp__internal__n_error_106;
5199 }
5200 }
5201 /* UNREACHABLE */;
5202 abort();
5203 }
5204 case s_n_llhttp__internal__n_after_start_req_40:
5205 s_n_llhttp__internal__n_after_start_req_40: {
5206 if (p == endp) {
5207 return s_n_llhttp__internal__n_after_start_req_40;
5208 }
5209 switch (*p) {
5210 case 'P': {
5211 p++;
5212 goto s_n_llhttp__internal__n_after_start_req_41;
5213 }
5214 default: {
5215 goto s_n_llhttp__internal__n_error_106;
5216 }
5217 }
5218 /* UNREACHABLE */;
5219 abort();
5220 }
5221 case s_n_llhttp__internal__n_after_start_req_39:
5222 s_n_llhttp__internal__n_after_start_req_39: {
5223 if (p == endp) {
5224 return s_n_llhttp__internal__n_after_start_req_39;
5225 }
5226 switch (*p) {
5227 case 'I': {
5228 p++;
5229 match = 34;
5230 goto s_n_llhttp__internal__n_invoke_store_method_1;
5231 }
5232 case 'O': {
5233 p++;
5234 goto s_n_llhttp__internal__n_after_start_req_40;
5235 }
5236 default: {
5237 goto s_n_llhttp__internal__n_error_106;
5238 }
5239 }
5240 /* UNREACHABLE */;
5241 abort();
5242 }
5243 case s_n_llhttp__internal__n_after_start_req_45:
5244 s_n_llhttp__internal__n_after_start_req_45: {
5245 llparse_match_t match_seq;
5246
5247 if (p == endp) {
5248 return s_n_llhttp__internal__n_after_start_req_45;
5249 }
5250 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 2);
5251 p = match_seq.current;
5252 switch (match_seq.status) {
5253 case kMatchComplete: {
5254 p++;
5255 match = 29;
5256 goto s_n_llhttp__internal__n_invoke_store_method_1;
5257 }
5258 case kMatchPause: {
5259 return s_n_llhttp__internal__n_after_start_req_45;
5260 }
5261 case kMatchMismatch: {
5262 goto s_n_llhttp__internal__n_error_106;
5263 }
5264 }
5265 /* UNREACHABLE */;
5266 abort();
5267 }
5268 case s_n_llhttp__internal__n_after_start_req_44:
5269 s_n_llhttp__internal__n_after_start_req_44: {
5270 if (p == endp) {
5271 return s_n_llhttp__internal__n_after_start_req_44;
5272 }
5273 switch (*p) {
5274 case 'R': {
5275 p++;
5276 goto s_n_llhttp__internal__n_after_start_req_45;
5277 }
5278 case 'T': {
5279 p++;
5280 match = 4;
5281 goto s_n_llhttp__internal__n_invoke_store_method_1;
5282 }
5283 default: {
5284 goto s_n_llhttp__internal__n_error_106;
5285 }
5286 }
5287 /* UNREACHABLE */;
5288 abort();
5289 }
5290 case s_n_llhttp__internal__n_after_start_req_33:
5291 s_n_llhttp__internal__n_after_start_req_33: {
5292 if (p == endp) {
5293 return s_n_llhttp__internal__n_after_start_req_33;
5294 }
5295 switch (*p) {
5296 case 'A': {
5297 p++;
5298 goto s_n_llhttp__internal__n_after_start_req_34;
5299 }
5300 case 'L': {
5301 p++;
5302 goto s_n_llhttp__internal__n_after_start_req_37;
5303 }
5304 case 'O': {
5305 p++;
5306 goto s_n_llhttp__internal__n_after_start_req_38;
5307 }
5308 case 'R': {
5309 p++;
5310 goto s_n_llhttp__internal__n_after_start_req_39;
5311 }
5312 case 'U': {
5313 p++;
5314 goto s_n_llhttp__internal__n_after_start_req_44;
5315 }
5316 default: {
5317 goto s_n_llhttp__internal__n_error_106;
5318 }
5319 }
5320 /* UNREACHABLE */;
5321 abort();
5322 }
5323 case s_n_llhttp__internal__n_after_start_req_48:
5324 s_n_llhttp__internal__n_after_start_req_48: {
5325 llparse_match_t match_seq;
5326
5327 if (p == endp) {
5328 return s_n_llhttp__internal__n_after_start_req_48;
5329 }
5330 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 3);
5331 p = match_seq.current;
5332 switch (match_seq.status) {
5333 case kMatchComplete: {
5334 p++;
5335 match = 17;
5336 goto s_n_llhttp__internal__n_invoke_store_method_1;
5337 }
5338 case kMatchPause: {
5339 return s_n_llhttp__internal__n_after_start_req_48;
5340 }
5341 case kMatchMismatch: {
5342 goto s_n_llhttp__internal__n_error_106;
5343 }
5344 }
5345 /* UNREACHABLE */;
5346 abort();
5347 }
5348 case s_n_llhttp__internal__n_after_start_req_49:
5349 s_n_llhttp__internal__n_after_start_req_49: {
5350 llparse_match_t match_seq;
5351
5352 if (p == endp) {
5353 return s_n_llhttp__internal__n_after_start_req_49;
5354 }
5355 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3);
5356 p = match_seq.current;
5357 switch (match_seq.status) {
5358 case kMatchComplete: {
5359 p++;
5360 match = 44;
5361 goto s_n_llhttp__internal__n_invoke_store_method_1;
5362 }
5363 case kMatchPause: {
5364 return s_n_llhttp__internal__n_after_start_req_49;
5365 }
5366 case kMatchMismatch: {
5367 goto s_n_llhttp__internal__n_error_106;
5368 }
5369 }
5370 /* UNREACHABLE */;
5371 abort();
5372 }
5373 case s_n_llhttp__internal__n_after_start_req_50:
5374 s_n_llhttp__internal__n_after_start_req_50: {
5375 llparse_match_t match_seq;
5376
5377 if (p == endp) {
5378 return s_n_llhttp__internal__n_after_start_req_50;
5379 }
5380 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 5);
5381 p = match_seq.current;
5382 switch (match_seq.status) {
5383 case kMatchComplete: {
5384 p++;
5385 match = 43;
5386 goto s_n_llhttp__internal__n_invoke_store_method_1;
5387 }
5388 case kMatchPause: {
5389 return s_n_llhttp__internal__n_after_start_req_50;
5390 }
5391 case kMatchMismatch: {
5392 goto s_n_llhttp__internal__n_error_106;
5393 }
5394 }
5395 /* UNREACHABLE */;
5396 abort();
5397 }
5398 case s_n_llhttp__internal__n_after_start_req_51:
5399 s_n_llhttp__internal__n_after_start_req_51: {
5400 llparse_match_t match_seq;
5401
5402 if (p == endp) {
5403 return s_n_llhttp__internal__n_after_start_req_51;
5404 }
5405 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 3);
5406 p = match_seq.current;
5407 switch (match_seq.status) {
5408 case kMatchComplete: {
5409 p++;
5410 match = 20;
5411 goto s_n_llhttp__internal__n_invoke_store_method_1;
5412 }
5413 case kMatchPause: {
5414 return s_n_llhttp__internal__n_after_start_req_51;
5415 }
5416 case kMatchMismatch: {
5417 goto s_n_llhttp__internal__n_error_106;
5418 }
5419 }
5420 /* UNREACHABLE */;
5421 abort();
5422 }
5423 case s_n_llhttp__internal__n_after_start_req_47:
5424 s_n_llhttp__internal__n_after_start_req_47: {
5425 if (p == endp) {
5426 return s_n_llhttp__internal__n_after_start_req_47;
5427 }
5428 switch (*p) {
5429 case 'B': {
5430 p++;
5431 goto s_n_llhttp__internal__n_after_start_req_48;
5432 }
5433 case 'C': {
5434 p++;
5435 goto s_n_llhttp__internal__n_after_start_req_49;
5436 }
5437 case 'D': {
5438 p++;
5439 goto s_n_llhttp__internal__n_after_start_req_50;
5440 }
5441 case 'P': {
5442 p++;
5443 goto s_n_llhttp__internal__n_after_start_req_51;
5444 }
5445 default: {
5446 goto s_n_llhttp__internal__n_error_106;
5447 }
5448 }
5449 /* UNREACHABLE */;
5450 abort();
5451 }
5452 case s_n_llhttp__internal__n_after_start_req_46:
5453 s_n_llhttp__internal__n_after_start_req_46: {
5454 if (p == endp) {
5455 return s_n_llhttp__internal__n_after_start_req_46;
5456 }
5457 switch (*p) {
5458 case 'E': {
5459 p++;
5460 goto s_n_llhttp__internal__n_after_start_req_47;
5461 }
5462 default: {
5463 goto s_n_llhttp__internal__n_error_106;
5464 }
5465 }
5466 /* UNREACHABLE */;
5467 abort();
5468 }
5469 case s_n_llhttp__internal__n_after_start_req_54:
5470 s_n_llhttp__internal__n_after_start_req_54: {
5471 llparse_match_t match_seq;
5472
5473 if (p == endp) {
5474 return s_n_llhttp__internal__n_after_start_req_54;
5475 }
5476 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 3);
5477 p = match_seq.current;
5478 switch (match_seq.status) {
5479 case kMatchComplete: {
5480 p++;
5481 match = 14;
5482 goto s_n_llhttp__internal__n_invoke_store_method_1;
5483 }
5484 case kMatchPause: {
5485 return s_n_llhttp__internal__n_after_start_req_54;
5486 }
5487 case kMatchMismatch: {
5488 goto s_n_llhttp__internal__n_error_106;
5489 }
5490 }
5491 /* UNREACHABLE */;
5492 abort();
5493 }
5494 case s_n_llhttp__internal__n_after_start_req_56:
5495 s_n_llhttp__internal__n_after_start_req_56: {
5496 if (p == endp) {
5497 return s_n_llhttp__internal__n_after_start_req_56;
5498 }
5499 switch (*p) {
5500 case 'P': {
5501 p++;
5502 match = 37;
5503 goto s_n_llhttp__internal__n_invoke_store_method_1;
5504 }
5505 default: {
5506 goto s_n_llhttp__internal__n_error_106;
5507 }
5508 }
5509 /* UNREACHABLE */;
5510 abort();
5511 }
5512 case s_n_llhttp__internal__n_after_start_req_57:
5513 s_n_llhttp__internal__n_after_start_req_57: {
5514 llparse_match_t match_seq;
5515
5516 if (p == endp) {
5517 return s_n_llhttp__internal__n_after_start_req_57;
5518 }
5519 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 9);
5520 p = match_seq.current;
5521 switch (match_seq.status) {
5522 case kMatchComplete: {
5523 p++;
5524 match = 42;
5525 goto s_n_llhttp__internal__n_invoke_store_method_1;
5526 }
5527 case kMatchPause: {
5528 return s_n_llhttp__internal__n_after_start_req_57;
5529 }
5530 case kMatchMismatch: {
5531 goto s_n_llhttp__internal__n_error_106;
5532 }
5533 }
5534 /* UNREACHABLE */;
5535 abort();
5536 }
5537 case s_n_llhttp__internal__n_after_start_req_55:
5538 s_n_llhttp__internal__n_after_start_req_55: {
5539 if (p == endp) {
5540 return s_n_llhttp__internal__n_after_start_req_55;
5541 }
5542 switch (*p) {
5543 case 'U': {
5544 p++;
5545 goto s_n_llhttp__internal__n_after_start_req_56;
5546 }
5547 case '_': {
5548 p++;
5549 goto s_n_llhttp__internal__n_after_start_req_57;
5550 }
5551 default: {
5552 goto s_n_llhttp__internal__n_error_106;
5553 }
5554 }
5555 /* UNREACHABLE */;
5556 abort();
5557 }
5558 case s_n_llhttp__internal__n_after_start_req_53:
5559 s_n_llhttp__internal__n_after_start_req_53: {
5560 if (p == endp) {
5561 return s_n_llhttp__internal__n_after_start_req_53;
5562 }
5563 switch (*p) {
5564 case 'A': {
5565 p++;
5566 goto s_n_llhttp__internal__n_after_start_req_54;
5567 }
5568 case 'T': {
5569 p++;
5570 goto s_n_llhttp__internal__n_after_start_req_55;
5571 }
5572 default: {
5573 goto s_n_llhttp__internal__n_error_106;
5574 }
5575 }
5576 /* UNREACHABLE */;
5577 abort();
5578 }
5579 case s_n_llhttp__internal__n_after_start_req_58:
5580 s_n_llhttp__internal__n_after_start_req_58: {
5581 llparse_match_t match_seq;
5582
5583 if (p == endp) {
5584 return s_n_llhttp__internal__n_after_start_req_58;
5585 }
5586 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 4);
5587 p = match_seq.current;
5588 switch (match_seq.status) {
5589 case kMatchComplete: {
5590 p++;
5591 match = 33;
5592 goto s_n_llhttp__internal__n_invoke_store_method_1;
5593 }
5594 case kMatchPause: {
5595 return s_n_llhttp__internal__n_after_start_req_58;
5596 }
5597 case kMatchMismatch: {
5598 goto s_n_llhttp__internal__n_error_106;
5599 }
5600 }
5601 /* UNREACHABLE */;
5602 abort();
5603 }
5604 case s_n_llhttp__internal__n_after_start_req_59:
5605 s_n_llhttp__internal__n_after_start_req_59: {
5606 llparse_match_t match_seq;
5607
5608 if (p == endp) {
5609 return s_n_llhttp__internal__n_after_start_req_59;
5610 }
5611 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 7);
5612 p = match_seq.current;
5613 switch (match_seq.status) {
5614 case kMatchComplete: {
5615 p++;
5616 match = 26;
5617 goto s_n_llhttp__internal__n_invoke_store_method_1;
5618 }
5619 case kMatchPause: {
5620 return s_n_llhttp__internal__n_after_start_req_59;
5621 }
5622 case kMatchMismatch: {
5623 goto s_n_llhttp__internal__n_error_106;
5624 }
5625 }
5626 /* UNREACHABLE */;
5627 abort();
5628 }
5629 case s_n_llhttp__internal__n_after_start_req_52:
5630 s_n_llhttp__internal__n_after_start_req_52: {
5631 if (p == endp) {
5632 return s_n_llhttp__internal__n_after_start_req_52;
5633 }
5634 switch (*p) {
5635 case 'E': {
5636 p++;
5637 goto s_n_llhttp__internal__n_after_start_req_53;
5638 }
5639 case 'O': {
5640 p++;
5641 goto s_n_llhttp__internal__n_after_start_req_58;
5642 }
5643 case 'U': {
5644 p++;
5645 goto s_n_llhttp__internal__n_after_start_req_59;
5646 }
5647 default: {
5648 goto s_n_llhttp__internal__n_error_106;
5649 }
5650 }
5651 /* UNREACHABLE */;
5652 abort();
5653 }
5654 case s_n_llhttp__internal__n_after_start_req_61:
5655 s_n_llhttp__internal__n_after_start_req_61: {
5656 llparse_match_t match_seq;
5657
5658 if (p == endp) {
5659 return s_n_llhttp__internal__n_after_start_req_61;
5660 }
5661 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 6);
5662 p = match_seq.current;
5663 switch (match_seq.status) {
5664 case kMatchComplete: {
5665 p++;
5666 match = 40;
5667 goto s_n_llhttp__internal__n_invoke_store_method_1;
5668 }
5669 case kMatchPause: {
5670 return s_n_llhttp__internal__n_after_start_req_61;
5671 }
5672 case kMatchMismatch: {
5673 goto s_n_llhttp__internal__n_error_106;
5674 }
5675 }
5676 /* UNREACHABLE */;
5677 abort();
5678 }
5679 case s_n_llhttp__internal__n_after_start_req_62:
5680 s_n_llhttp__internal__n_after_start_req_62: {
5681 llparse_match_t match_seq;
5682
5683 if (p == endp) {
5684 return s_n_llhttp__internal__n_after_start_req_62;
5685 }
5686 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob52, 3);
5687 p = match_seq.current;
5688 switch (match_seq.status) {
5689 case kMatchComplete: {
5690 p++;
5691 match = 7;
5692 goto s_n_llhttp__internal__n_invoke_store_method_1;
5693 }
5694 case kMatchPause: {
5695 return s_n_llhttp__internal__n_after_start_req_62;
5696 }
5697 case kMatchMismatch: {
5698 goto s_n_llhttp__internal__n_error_106;
5699 }
5700 }
5701 /* UNREACHABLE */;
5702 abort();
5703 }
5704 case s_n_llhttp__internal__n_after_start_req_60:
5705 s_n_llhttp__internal__n_after_start_req_60: {
5706 if (p == endp) {
5707 return s_n_llhttp__internal__n_after_start_req_60;
5708 }
5709 switch (*p) {
5710 case 'E': {
5711 p++;
5712 goto s_n_llhttp__internal__n_after_start_req_61;
5713 }
5714 case 'R': {
5715 p++;
5716 goto s_n_llhttp__internal__n_after_start_req_62;
5717 }
5718 default: {
5719 goto s_n_llhttp__internal__n_error_106;
5720 }
5721 }
5722 /* UNREACHABLE */;
5723 abort();
5724 }
5725 case s_n_llhttp__internal__n_after_start_req_65:
5726 s_n_llhttp__internal__n_after_start_req_65: {
5727 llparse_match_t match_seq;
5728
5729 if (p == endp) {
5730 return s_n_llhttp__internal__n_after_start_req_65;
5731 }
5732 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob53, 3);
5733 p = match_seq.current;
5734 switch (match_seq.status) {
5735 case kMatchComplete: {
5736 p++;
5737 match = 18;
5738 goto s_n_llhttp__internal__n_invoke_store_method_1;
5739 }
5740 case kMatchPause: {
5741 return s_n_llhttp__internal__n_after_start_req_65;
5742 }
5743 case kMatchMismatch: {
5744 goto s_n_llhttp__internal__n_error_106;
5745 }
5746 }
5747 /* UNREACHABLE */;
5748 abort();
5749 }
5750 case s_n_llhttp__internal__n_after_start_req_67:
5751 s_n_llhttp__internal__n_after_start_req_67: {
5752 llparse_match_t match_seq;
5753
5754 if (p == endp) {
5755 return s_n_llhttp__internal__n_after_start_req_67;
5756 }
5757 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob54, 2);
5758 p = match_seq.current;
5759 switch (match_seq.status) {
5760 case kMatchComplete: {
5761 p++;
5762 match = 32;
5763 goto s_n_llhttp__internal__n_invoke_store_method_1;
5764 }
5765 case kMatchPause: {
5766 return s_n_llhttp__internal__n_after_start_req_67;
5767 }
5768 case kMatchMismatch: {
5769 goto s_n_llhttp__internal__n_error_106;
5770 }
5771 }
5772 /* UNREACHABLE */;
5773 abort();
5774 }
5775 case s_n_llhttp__internal__n_after_start_req_68:
5776 s_n_llhttp__internal__n_after_start_req_68: {
5777 llparse_match_t match_seq;
5778
5779 if (p == endp) {
5780 return s_n_llhttp__internal__n_after_start_req_68;
5781 }
5782 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob55, 2);
5783 p = match_seq.current;
5784 switch (match_seq.status) {
5785 case kMatchComplete: {
5786 p++;
5787 match = 15;
5788 goto s_n_llhttp__internal__n_invoke_store_method_1;
5789 }
5790 case kMatchPause: {
5791 return s_n_llhttp__internal__n_after_start_req_68;
5792 }
5793 case kMatchMismatch: {
5794 goto s_n_llhttp__internal__n_error_106;
5795 }
5796 }
5797 /* UNREACHABLE */;
5798 abort();
5799 }
5800 case s_n_llhttp__internal__n_after_start_req_66:
5801 s_n_llhttp__internal__n_after_start_req_66: {
5802 if (p == endp) {
5803 return s_n_llhttp__internal__n_after_start_req_66;
5804 }
5805 switch (*p) {
5806 case 'I': {
5807 p++;
5808 goto s_n_llhttp__internal__n_after_start_req_67;
5809 }
5810 case 'O': {
5811 p++;
5812 goto s_n_llhttp__internal__n_after_start_req_68;
5813 }
5814 default: {
5815 goto s_n_llhttp__internal__n_error_106;
5816 }
5817 }
5818 /* UNREACHABLE */;
5819 abort();
5820 }
5821 case s_n_llhttp__internal__n_after_start_req_69:
5822 s_n_llhttp__internal__n_after_start_req_69: {
5823 llparse_match_t match_seq;
5824
5825 if (p == endp) {
5826 return s_n_llhttp__internal__n_after_start_req_69;
5827 }
5828 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob56, 8);
5829 p = match_seq.current;
5830 switch (match_seq.status) {
5831 case kMatchComplete: {
5832 p++;
5833 match = 27;
5834 goto s_n_llhttp__internal__n_invoke_store_method_1;
5835 }
5836 case kMatchPause: {
5837 return s_n_llhttp__internal__n_after_start_req_69;
5838 }
5839 case kMatchMismatch: {
5840 goto s_n_llhttp__internal__n_error_106;
5841 }
5842 }
5843 /* UNREACHABLE */;
5844 abort();
5845 }
5846 case s_n_llhttp__internal__n_after_start_req_64:
5847 s_n_llhttp__internal__n_after_start_req_64: {
5848 if (p == endp) {
5849 return s_n_llhttp__internal__n_after_start_req_64;
5850 }
5851 switch (*p) {
5852 case 'B': {
5853 p++;
5854 goto s_n_llhttp__internal__n_after_start_req_65;
5855 }
5856 case 'L': {
5857 p++;
5858 goto s_n_llhttp__internal__n_after_start_req_66;
5859 }
5860 case 'S': {
5861 p++;
5862 goto s_n_llhttp__internal__n_after_start_req_69;
5863 }
5864 default: {
5865 goto s_n_llhttp__internal__n_error_106;
5866 }
5867 }
5868 /* UNREACHABLE */;
5869 abort();
5870 }
5871 case s_n_llhttp__internal__n_after_start_req_63:
5872 s_n_llhttp__internal__n_after_start_req_63: {
5873 if (p == endp) {
5874 return s_n_llhttp__internal__n_after_start_req_63;
5875 }
5876 switch (*p) {
5877 case 'N': {
5878 p++;
5879 goto s_n_llhttp__internal__n_after_start_req_64;
5880 }
5881 default: {
5882 goto s_n_llhttp__internal__n_error_106;
5883 }
5884 }
5885 /* UNREACHABLE */;
5886 abort();
5887 }
5888 case s_n_llhttp__internal__n_after_start_req:
5889 s_n_llhttp__internal__n_after_start_req: {
5890 if (p == endp) {
5891 return s_n_llhttp__internal__n_after_start_req;
5892 }
5893 switch (*p) {
5894 case 'A': {
5895 p++;
5896 goto s_n_llhttp__internal__n_after_start_req_1;
5897 }
5898 case 'B': {
5899 p++;
5900 goto s_n_llhttp__internal__n_after_start_req_4;
5901 }
5902 case 'C': {
5903 p++;
5904 goto s_n_llhttp__internal__n_after_start_req_5;
5905 }
5906 case 'D': {
5907 p++;
5908 goto s_n_llhttp__internal__n_after_start_req_10;
5909 }
5910 case 'F': {
5911 p++;
5912 goto s_n_llhttp__internal__n_after_start_req_14;
5913 }
5914 case 'G': {
5915 p++;
5916 goto s_n_llhttp__internal__n_after_start_req_15;
5917 }
5918 case 'H': {
5919 p++;
5920 goto s_n_llhttp__internal__n_after_start_req_18;
5921 }
5922 case 'L': {
5923 p++;
5924 goto s_n_llhttp__internal__n_after_start_req_19;
5925 }
5926 case 'M': {
5927 p++;
5928 goto s_n_llhttp__internal__n_after_start_req_22;
5929 }
5930 case 'N': {
5931 p++;
5932 goto s_n_llhttp__internal__n_after_start_req_31;
5933 }
5934 case 'O': {
5935 p++;
5936 goto s_n_llhttp__internal__n_after_start_req_32;
5937 }
5938 case 'P': {
5939 p++;
5940 goto s_n_llhttp__internal__n_after_start_req_33;
5941 }
5942 case 'R': {
5943 p++;
5944 goto s_n_llhttp__internal__n_after_start_req_46;
5945 }
5946 case 'S': {
5947 p++;
5948 goto s_n_llhttp__internal__n_after_start_req_52;
5949 }
5950 case 'T': {
5951 p++;
5952 goto s_n_llhttp__internal__n_after_start_req_60;
5953 }
5954 case 'U': {
5955 p++;
5956 goto s_n_llhttp__internal__n_after_start_req_63;
5957 }
5958 default: {
5959 goto s_n_llhttp__internal__n_error_106;
5960 }
5961 }
5962 /* UNREACHABLE */;
5963 abort();
5964 }
5965 case s_n_llhttp__internal__n_span_start_llhttp__on_method_1:
5966 s_n_llhttp__internal__n_span_start_llhttp__on_method_1: {
5967 if (p == endp) {
5968 return s_n_llhttp__internal__n_span_start_llhttp__on_method_1;
5969 }
5970 state->_span_pos0 = (void*) p;
5971 state->_span_cb0 = llhttp__on_method;
5972 goto s_n_llhttp__internal__n_after_start_req;
5973 /* UNREACHABLE */;
5974 abort();
5975 }
5976 case s_n_llhttp__internal__n_res_line_almost_done:
5977 s_n_llhttp__internal__n_res_line_almost_done: {
5978 if (p == endp) {
5979 return s_n_llhttp__internal__n_res_line_almost_done;
5980 }
5981 switch (*p) {
5982 case 10: {
5983 p++;
5984 goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete;
5985 }
5986 case 13: {
5987 p++;
5988 goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete;
5989 }
5990 default: {
5991 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_28;
5992 }
5993 }
5994 /* UNREACHABLE */;
5995 abort();
5996 }
5997 case s_n_llhttp__internal__n_invoke_test_lenient_flags_29:
5998 s_n_llhttp__internal__n_invoke_test_lenient_flags_29: {
5999 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
6000 case 1:
6001 goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete;
6002 default:
6003 goto s_n_llhttp__internal__n_error_92;
6004 }
6005 /* UNREACHABLE */;
6006 abort();
6007 }
6008 case s_n_llhttp__internal__n_res_status:
6009 s_n_llhttp__internal__n_res_status: {
6010 if (p == endp) {
6011 return s_n_llhttp__internal__n_res_status;
6012 }
6013 switch (*p) {
6014 case 10: {
6015 goto s_n_llhttp__internal__n_span_end_llhttp__on_status;
6016 }
6017 case 13: {
6018 goto s_n_llhttp__internal__n_span_end_llhttp__on_status_1;
6019 }
6020 default: {
6021 p++;
6022 goto s_n_llhttp__internal__n_res_status;
6023 }
6024 }
6025 /* UNREACHABLE */;
6026 abort();
6027 }
6028 case s_n_llhttp__internal__n_span_start_llhttp__on_status:
6029 s_n_llhttp__internal__n_span_start_llhttp__on_status: {
6030 if (p == endp) {
6031 return s_n_llhttp__internal__n_span_start_llhttp__on_status;
6032 }
6033 state->_span_pos0 = (void*) p;
6034 state->_span_cb0 = llhttp__on_status;
6035 goto s_n_llhttp__internal__n_res_status;
6036 /* UNREACHABLE */;
6037 abort();
6038 }
6039 case s_n_llhttp__internal__n_res_status_code_otherwise:
6040 s_n_llhttp__internal__n_res_status_code_otherwise: {
6041 if (p == endp) {
6042 return s_n_llhttp__internal__n_res_status_code_otherwise;
6043 }
6044 switch (*p) {
6045 case 10: {
6046 p++;
6047 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_27;
6048 }
6049 case 13: {
6050 p++;
6051 goto s_n_llhttp__internal__n_res_line_almost_done;
6052 }
6053 case ' ': {
6054 p++;
6055 goto s_n_llhttp__internal__n_span_start_llhttp__on_status;
6056 }
6057 default: {
6058 goto s_n_llhttp__internal__n_error_93;
6059 }
6060 }
6061 /* UNREACHABLE */;
6062 abort();
6063 }
6064 case s_n_llhttp__internal__n_res_status_code_digit_3:
6065 s_n_llhttp__internal__n_res_status_code_digit_3: {
6066 if (p == endp) {
6067 return s_n_llhttp__internal__n_res_status_code_digit_3;
6068 }
6069 switch (*p) {
6070 case '0': {
6071 p++;
6072 match = 0;
6073 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6074 }
6075 case '1': {
6076 p++;
6077 match = 1;
6078 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6079 }
6080 case '2': {
6081 p++;
6082 match = 2;
6083 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6084 }
6085 case '3': {
6086 p++;
6087 match = 3;
6088 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6089 }
6090 case '4': {
6091 p++;
6092 match = 4;
6093 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6094 }
6095 case '5': {
6096 p++;
6097 match = 5;
6098 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6099 }
6100 case '6': {
6101 p++;
6102 match = 6;
6103 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6104 }
6105 case '7': {
6106 p++;
6107 match = 7;
6108 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6109 }
6110 case '8': {
6111 p++;
6112 match = 8;
6113 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6114 }
6115 case '9': {
6116 p++;
6117 match = 9;
6118 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2;
6119 }
6120 default: {
6121 goto s_n_llhttp__internal__n_error_95;
6122 }
6123 }
6124 /* UNREACHABLE */;
6125 abort();
6126 }
6127 case s_n_llhttp__internal__n_res_status_code_digit_2:
6128 s_n_llhttp__internal__n_res_status_code_digit_2: {
6129 if (p == endp) {
6130 return s_n_llhttp__internal__n_res_status_code_digit_2;
6131 }
6132 switch (*p) {
6133 case '0': {
6134 p++;
6135 match = 0;
6136 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6137 }
6138 case '1': {
6139 p++;
6140 match = 1;
6141 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6142 }
6143 case '2': {
6144 p++;
6145 match = 2;
6146 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6147 }
6148 case '3': {
6149 p++;
6150 match = 3;
6151 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6152 }
6153 case '4': {
6154 p++;
6155 match = 4;
6156 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6157 }
6158 case '5': {
6159 p++;
6160 match = 5;
6161 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6162 }
6163 case '6': {
6164 p++;
6165 match = 6;
6166 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6167 }
6168 case '7': {
6169 p++;
6170 match = 7;
6171 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6172 }
6173 case '8': {
6174 p++;
6175 match = 8;
6176 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6177 }
6178 case '9': {
6179 p++;
6180 match = 9;
6181 goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1;
6182 }
6183 default: {
6184 goto s_n_llhttp__internal__n_error_97;
6185 }
6186 }
6187 /* UNREACHABLE */;
6188 abort();
6189 }
6190 case s_n_llhttp__internal__n_res_status_code_digit_1:
6191 s_n_llhttp__internal__n_res_status_code_digit_1: {
6192 if (p == endp) {
6193 return s_n_llhttp__internal__n_res_status_code_digit_1;
6194 }
6195 switch (*p) {
6196 case '0': {
6197 p++;
6198 match = 0;
6199 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6200 }
6201 case '1': {
6202 p++;
6203 match = 1;
6204 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6205 }
6206 case '2': {
6207 p++;
6208 match = 2;
6209 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6210 }
6211 case '3': {
6212 p++;
6213 match = 3;
6214 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6215 }
6216 case '4': {
6217 p++;
6218 match = 4;
6219 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6220 }
6221 case '5': {
6222 p++;
6223 match = 5;
6224 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6225 }
6226 case '6': {
6227 p++;
6228 match = 6;
6229 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6230 }
6231 case '7': {
6232 p++;
6233 match = 7;
6234 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6235 }
6236 case '8': {
6237 p++;
6238 match = 8;
6239 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6240 }
6241 case '9': {
6242 p++;
6243 match = 9;
6244 goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
6245 }
6246 default: {
6247 goto s_n_llhttp__internal__n_error_99;
6248 }
6249 }
6250 /* UNREACHABLE */;
6251 abort();
6252 }
6253 case s_n_llhttp__internal__n_res_after_version:
6254 s_n_llhttp__internal__n_res_after_version: {
6255 if (p == endp) {
6256 return s_n_llhttp__internal__n_res_after_version;
6257 }
6258 switch (*p) {
6259 case ' ': {
6260 p++;
6261 goto s_n_llhttp__internal__n_invoke_update_status_code;
6262 }
6263 default: {
6264 goto s_n_llhttp__internal__n_error_100;
6265 }
6266 }
6267 /* UNREACHABLE */;
6268 abort();
6269 }
6270 case s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1:
6271 s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1: {
6272 switch (llhttp__on_version_complete(state, p, endp)) {
6273 case 0:
6274 goto s_n_llhttp__internal__n_res_after_version;
6275 case 21:
6276 goto s_n_llhttp__internal__n_pause_25;
6277 default:
6278 goto s_n_llhttp__internal__n_error_88;
6279 }
6280 /* UNREACHABLE */;
6281 abort();
6282 }
6283 case s_n_llhttp__internal__n_error_87:
6284 s_n_llhttp__internal__n_error_87: {
6285 state->error = 0x9;
6286 state->reason = "Invalid HTTP version";
6287 state->error_pos = (const char*) p;
6288 state->_current = (void*) (intptr_t) s_error;
6289 return s_error;
6290 /* UNREACHABLE */;
6291 abort();
6292 }
6293 case s_n_llhttp__internal__n_error_101:
6294 s_n_llhttp__internal__n_error_101: {
6295 state->error = 0x9;
6296 state->reason = "Invalid minor version";
6297 state->error_pos = (const char*) p;
6298 state->_current = (void*) (intptr_t) s_error;
6299 return s_error;
6300 /* UNREACHABLE */;
6301 abort();
6302 }
6303 case s_n_llhttp__internal__n_res_http_minor:
6304 s_n_llhttp__internal__n_res_http_minor: {
6305 if (p == endp) {
6306 return s_n_llhttp__internal__n_res_http_minor;
6307 }
6308 switch (*p) {
6309 case '0': {
6310 p++;
6311 match = 0;
6312 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6313 }
6314 case '1': {
6315 p++;
6316 match = 1;
6317 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6318 }
6319 case '2': {
6320 p++;
6321 match = 2;
6322 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6323 }
6324 case '3': {
6325 p++;
6326 match = 3;
6327 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6328 }
6329 case '4': {
6330 p++;
6331 match = 4;
6332 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6333 }
6334 case '5': {
6335 p++;
6336 match = 5;
6337 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6338 }
6339 case '6': {
6340 p++;
6341 match = 6;
6342 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6343 }
6344 case '7': {
6345 p++;
6346 match = 7;
6347 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6348 }
6349 case '8': {
6350 p++;
6351 match = 8;
6352 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6353 }
6354 case '9': {
6355 p++;
6356 match = 9;
6357 goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
6358 }
6359 default: {
6360 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_7;
6361 }
6362 }
6363 /* UNREACHABLE */;
6364 abort();
6365 }
6366 case s_n_llhttp__internal__n_error_102:
6367 s_n_llhttp__internal__n_error_102: {
6368 state->error = 0x9;
6369 state->reason = "Expected dot";
6370 state->error_pos = (const char*) p;
6371 state->_current = (void*) (intptr_t) s_error;
6372 return s_error;
6373 /* UNREACHABLE */;
6374 abort();
6375 }
6376 case s_n_llhttp__internal__n_res_http_dot:
6377 s_n_llhttp__internal__n_res_http_dot: {
6378 if (p == endp) {
6379 return s_n_llhttp__internal__n_res_http_dot;
6380 }
6381 switch (*p) {
6382 case '.': {
6383 p++;
6384 goto s_n_llhttp__internal__n_res_http_minor;
6385 }
6386 default: {
6387 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_8;
6388 }
6389 }
6390 /* UNREACHABLE */;
6391 abort();
6392 }
6393 case s_n_llhttp__internal__n_error_103:
6394 s_n_llhttp__internal__n_error_103: {
6395 state->error = 0x9;
6396 state->reason = "Invalid major version";
6397 state->error_pos = (const char*) p;
6398 state->_current = (void*) (intptr_t) s_error;
6399 return s_error;
6400 /* UNREACHABLE */;
6401 abort();
6402 }
6403 case s_n_llhttp__internal__n_res_http_major:
6404 s_n_llhttp__internal__n_res_http_major: {
6405 if (p == endp) {
6406 return s_n_llhttp__internal__n_res_http_major;
6407 }
6408 switch (*p) {
6409 case '0': {
6410 p++;
6411 match = 0;
6412 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6413 }
6414 case '1': {
6415 p++;
6416 match = 1;
6417 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6418 }
6419 case '2': {
6420 p++;
6421 match = 2;
6422 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6423 }
6424 case '3': {
6425 p++;
6426 match = 3;
6427 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6428 }
6429 case '4': {
6430 p++;
6431 match = 4;
6432 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6433 }
6434 case '5': {
6435 p++;
6436 match = 5;
6437 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6438 }
6439 case '6': {
6440 p++;
6441 match = 6;
6442 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6443 }
6444 case '7': {
6445 p++;
6446 match = 7;
6447 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6448 }
6449 case '8': {
6450 p++;
6451 match = 8;
6452 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6453 }
6454 case '9': {
6455 p++;
6456 match = 9;
6457 goto s_n_llhttp__internal__n_invoke_store_http_major_1;
6458 }
6459 default: {
6460 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_9;
6461 }
6462 }
6463 /* UNREACHABLE */;
6464 abort();
6465 }
6466 case s_n_llhttp__internal__n_span_start_llhttp__on_version_1:
6467 s_n_llhttp__internal__n_span_start_llhttp__on_version_1: {
6468 if (p == endp) {
6469 return s_n_llhttp__internal__n_span_start_llhttp__on_version_1;
6470 }
6471 state->_span_pos0 = (void*) p;
6472 state->_span_cb0 = llhttp__on_version;
6473 goto s_n_llhttp__internal__n_res_http_major;
6474 /* UNREACHABLE */;
6475 abort();
6476 }
6477 case s_n_llhttp__internal__n_start_res:
6478 s_n_llhttp__internal__n_start_res: {
6479 llparse_match_t match_seq;
6480
6481 if (p == endp) {
6482 return s_n_llhttp__internal__n_start_res;
6483 }
6484 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob57, 5);
6485 p = match_seq.current;
6486 switch (match_seq.status) {
6487 case kMatchComplete: {
6488 p++;
6489 goto s_n_llhttp__internal__n_span_start_llhttp__on_version_1;
6490 }
6491 case kMatchPause: {
6492 return s_n_llhttp__internal__n_start_res;
6493 }
6494 case kMatchMismatch: {
6495 goto s_n_llhttp__internal__n_error_107;
6496 }
6497 }
6498 /* UNREACHABLE */;
6499 abort();
6500 }
6501 case s_n_llhttp__internal__n_invoke_llhttp__on_method_complete:
6502 s_n_llhttp__internal__n_invoke_llhttp__on_method_complete: {
6503 switch (llhttp__on_method_complete(state, p, endp)) {
6504 case 0:
6505 goto s_n_llhttp__internal__n_req_first_space_before_url;
6506 case 21:
6507 goto s_n_llhttp__internal__n_pause_23;
6508 default:
6509 goto s_n_llhttp__internal__n_error_1;
6510 }
6511 /* UNREACHABLE */;
6512 abort();
6513 }
6514 case s_n_llhttp__internal__n_req_or_res_method_2:
6515 s_n_llhttp__internal__n_req_or_res_method_2: {
6516 llparse_match_t match_seq;
6517
6518 if (p == endp) {
6519 return s_n_llhttp__internal__n_req_or_res_method_2;
6520 }
6521 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob58, 2);
6522 p = match_seq.current;
6523 switch (match_seq.status) {
6524 case kMatchComplete: {
6525 p++;
6526 match = 2;
6527 goto s_n_llhttp__internal__n_invoke_store_method;
6528 }
6529 case kMatchPause: {
6530 return s_n_llhttp__internal__n_req_or_res_method_2;
6531 }
6532 case kMatchMismatch: {
6533 goto s_n_llhttp__internal__n_error_104;
6534 }
6535 }
6536 /* UNREACHABLE */;
6537 abort();
6538 }
6539 case s_n_llhttp__internal__n_invoke_update_type_1:
6540 s_n_llhttp__internal__n_invoke_update_type_1: {
6541 switch (llhttp__internal__c_update_type_1(state, p, endp)) {
6542 default:
6543 goto s_n_llhttp__internal__n_span_start_llhttp__on_version_1;
6544 }
6545 /* UNREACHABLE */;
6546 abort();
6547 }
6548 case s_n_llhttp__internal__n_req_or_res_method_3:
6549 s_n_llhttp__internal__n_req_or_res_method_3: {
6550 llparse_match_t match_seq;
6551
6552 if (p == endp) {
6553 return s_n_llhttp__internal__n_req_or_res_method_3;
6554 }
6555 match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob59, 3);
6556 p = match_seq.current;
6557 switch (match_seq.status) {
6558 case kMatchComplete: {
6559 p++;
6560 goto s_n_llhttp__internal__n_span_end_llhttp__on_method_1;
6561 }
6562 case kMatchPause: {
6563 return s_n_llhttp__internal__n_req_or_res_method_3;
6564 }
6565 case kMatchMismatch: {
6566 goto s_n_llhttp__internal__n_error_104;
6567 }
6568 }
6569 /* UNREACHABLE */;
6570 abort();
6571 }
6572 case s_n_llhttp__internal__n_req_or_res_method_1:
6573 s_n_llhttp__internal__n_req_or_res_method_1: {
6574 if (p == endp) {
6575 return s_n_llhttp__internal__n_req_or_res_method_1;
6576 }
6577 switch (*p) {
6578 case 'E': {
6579 p++;
6580 goto s_n_llhttp__internal__n_req_or_res_method_2;
6581 }
6582 case 'T': {
6583 p++;
6584 goto s_n_llhttp__internal__n_req_or_res_method_3;
6585 }
6586 default: {
6587 goto s_n_llhttp__internal__n_error_104;
6588 }
6589 }
6590 /* UNREACHABLE */;
6591 abort();
6592 }
6593 case s_n_llhttp__internal__n_req_or_res_method:
6594 s_n_llhttp__internal__n_req_or_res_method: {
6595 if (p == endp) {
6596 return s_n_llhttp__internal__n_req_or_res_method;
6597 }
6598 switch (*p) {
6599 case 'H': {
6600 p++;
6601 goto s_n_llhttp__internal__n_req_or_res_method_1;
6602 }
6603 default: {
6604 goto s_n_llhttp__internal__n_error_104;
6605 }
6606 }
6607 /* UNREACHABLE */;
6608 abort();
6609 }
6610 case s_n_llhttp__internal__n_span_start_llhttp__on_method:
6611 s_n_llhttp__internal__n_span_start_llhttp__on_method: {
6612 if (p == endp) {
6613 return s_n_llhttp__internal__n_span_start_llhttp__on_method;
6614 }
6615 state->_span_pos0 = (void*) p;
6616 state->_span_cb0 = llhttp__on_method;
6617 goto s_n_llhttp__internal__n_req_or_res_method;
6618 /* UNREACHABLE */;
6619 abort();
6620 }
6621 case s_n_llhttp__internal__n_start_req_or_res:
6622 s_n_llhttp__internal__n_start_req_or_res: {
6623 if (p == endp) {
6624 return s_n_llhttp__internal__n_start_req_or_res;
6625 }
6626 switch (*p) {
6627 case 'H': {
6628 goto s_n_llhttp__internal__n_span_start_llhttp__on_method;
6629 }
6630 default: {
6631 goto s_n_llhttp__internal__n_invoke_update_type_2;
6632 }
6633 }
6634 /* UNREACHABLE */;
6635 abort();
6636 }
6637 case s_n_llhttp__internal__n_invoke_load_type:
6638 s_n_llhttp__internal__n_invoke_load_type: {
6639 switch (llhttp__internal__c_load_type(state, p, endp)) {
6640 case 1:
6641 goto s_n_llhttp__internal__n_span_start_llhttp__on_method_1;
6642 case 2:
6643 goto s_n_llhttp__internal__n_start_res;
6644 default:
6645 goto s_n_llhttp__internal__n_start_req_or_res;
6646 }
6647 /* UNREACHABLE */;
6648 abort();
6649 }
6650 case s_n_llhttp__internal__n_invoke_update_finish:
6651 s_n_llhttp__internal__n_invoke_update_finish: {
6652 switch (llhttp__internal__c_update_finish(state, p, endp)) {
6653 default:
6654 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_begin;
6655 }
6656 /* UNREACHABLE */;
6657 abort();
6658 }
6659 case s_n_llhttp__internal__n_start:
6660 s_n_llhttp__internal__n_start: {
6661 if (p == endp) {
6662 return s_n_llhttp__internal__n_start;
6663 }
6664 switch (*p) {
6665 case 10: {
6666 p++;
6667 goto s_n_llhttp__internal__n_start;
6668 }
6669 case 13: {
6670 p++;
6671 goto s_n_llhttp__internal__n_start;
6672 }
6673 default: {
6674 goto s_n_llhttp__internal__n_invoke_load_initial_message_completed;
6675 }
6676 }
6677 /* UNREACHABLE */;
6678 abort();
6679 }
6680 default:
6681 /* UNREACHABLE */
6682 abort();
6683 }
6684 s_n_llhttp__internal__n_error_2: {
6685 state->error = 0x7;
6686 state->reason = "Invalid characters in url";
6687 state->error_pos = (const char*) p;
6688 state->_current = (void*) (intptr_t) s_error;
6689 return s_error;
6690 /* UNREACHABLE */;
6691 abort();
6692 }
6693 s_n_llhttp__internal__n_invoke_update_finish_2: {
6694 switch (llhttp__internal__c_update_finish_1(state, p, endp)) {
6695 default:
6696 goto s_n_llhttp__internal__n_start;
6697 }
6698 /* UNREACHABLE */;
6699 abort();
6700 }
6701 s_n_llhttp__internal__n_invoke_update_initial_message_completed: {
6702 switch (llhttp__internal__c_update_initial_message_completed(state, p, endp)) {
6703 default:
6704 goto s_n_llhttp__internal__n_invoke_update_finish_2;
6705 }
6706 /* UNREACHABLE */;
6707 abort();
6708 }
6709 s_n_llhttp__internal__n_invoke_update_content_length: {
6710 switch (llhttp__internal__c_update_content_length(state, p, endp)) {
6711 default:
6712 goto s_n_llhttp__internal__n_invoke_update_initial_message_completed;
6713 }
6714 /* UNREACHABLE */;
6715 abort();
6716 }
6717 s_n_llhttp__internal__n_error_8: {
6718 state->error = 0x5;
6719 state->reason = "Data after `Connection: close`";
6720 state->error_pos = (const char*) p;
6721 state->_current = (void*) (intptr_t) s_error;
6722 return s_error;
6723 /* UNREACHABLE */;
6724 abort();
6725 }
6726 s_n_llhttp__internal__n_invoke_test_lenient_flags_3: {
6727 switch (llhttp__internal__c_test_lenient_flags_3(state, p, endp)) {
6728 case 1:
6729 goto s_n_llhttp__internal__n_closed;
6730 default:
6731 goto s_n_llhttp__internal__n_error_8;
6732 }
6733 /* UNREACHABLE */;
6734 abort();
6735 }
6736 s_n_llhttp__internal__n_invoke_test_lenient_flags_2: {
6737 switch (llhttp__internal__c_test_lenient_flags_2(state, p, endp)) {
6738 case 1:
6739 goto s_n_llhttp__internal__n_invoke_update_initial_message_completed;
6740 default:
6741 goto s_n_llhttp__internal__n_closed;
6742 }
6743 /* UNREACHABLE */;
6744 abort();
6745 }
6746 s_n_llhttp__internal__n_invoke_update_finish_1: {
6747 switch (llhttp__internal__c_update_finish_1(state, p, endp)) {
6748 default:
6749 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_2;
6750 }
6751 /* UNREACHABLE */;
6752 abort();
6753 }
6754 s_n_llhttp__internal__n_pause_13: {
6755 state->error = 0x15;
6756 state->reason = "on_message_complete pause";
6757 state->error_pos = (const char*) p;
6758 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_upgrade;
6759 return s_error;
6760 /* UNREACHABLE */;
6761 abort();
6762 }
6763 s_n_llhttp__internal__n_error_38: {
6764 state->error = 0x12;
6765 state->reason = "`on_message_complete` callback error";
6766 state->error_pos = (const char*) p;
6767 state->_current = (void*) (intptr_t) s_error;
6768 return s_error;
6769 /* UNREACHABLE */;
6770 abort();
6771 }
6772 s_n_llhttp__internal__n_pause_15: {
6773 state->error = 0x15;
6774 state->reason = "on_chunk_complete pause";
6775 state->error_pos = (const char*) p;
6776 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
6777 return s_error;
6778 /* UNREACHABLE */;
6779 abort();
6780 }
6781 s_n_llhttp__internal__n_error_40: {
6782 state->error = 0x14;
6783 state->reason = "`on_chunk_complete` callback error";
6784 state->error_pos = (const char*) p;
6785 state->_current = (void*) (intptr_t) s_error;
6786 return s_error;
6787 /* UNREACHABLE */;
6788 abort();
6789 }
6790 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1: {
6791 switch (llhttp__on_chunk_complete(state, p, endp)) {
6792 case 0:
6793 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
6794 case 21:
6795 goto s_n_llhttp__internal__n_pause_15;
6796 default:
6797 goto s_n_llhttp__internal__n_error_40;
6798 }
6799 /* UNREACHABLE */;
6800 abort();
6801 }
6802 s_n_llhttp__internal__n_pause_2: {
6803 state->error = 0x15;
6804 state->reason = "on_message_complete pause";
6805 state->error_pos = (const char*) p;
6806 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_pause_1;
6807 return s_error;
6808 /* UNREACHABLE */;
6809 abort();
6810 }
6811 s_n_llhttp__internal__n_error_9: {
6812 state->error = 0x12;
6813 state->reason = "`on_message_complete` callback error";
6814 state->error_pos = (const char*) p;
6815 state->_current = (void*) (intptr_t) s_error;
6816 return s_error;
6817 /* UNREACHABLE */;
6818 abort();
6819 }
6820 s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1: {
6821 switch (llhttp__on_message_complete(state, p, endp)) {
6822 case 0:
6823 goto s_n_llhttp__internal__n_pause_1;
6824 case 21:
6825 goto s_n_llhttp__internal__n_pause_2;
6826 default:
6827 goto s_n_llhttp__internal__n_error_9;
6828 }
6829 /* UNREACHABLE */;
6830 abort();
6831 }
6832 s_n_llhttp__internal__n_error_36: {
6833 state->error = 0xc;
6834 state->reason = "Chunk size overflow";
6835 state->error_pos = (const char*) p;
6836 state->_current = (void*) (intptr_t) s_error;
6837 return s_error;
6838 /* UNREACHABLE */;
6839 abort();
6840 }
6841 s_n_llhttp__internal__n_error_10: {
6842 state->error = 0xc;
6843 state->reason = "Invalid character in chunk size";
6844 state->error_pos = (const char*) p;
6845 state->_current = (void*) (intptr_t) s_error;
6846 return s_error;
6847 /* UNREACHABLE */;
6848 abort();
6849 }
6850 s_n_llhttp__internal__n_invoke_test_lenient_flags_4: {
6851 switch (llhttp__internal__c_test_lenient_flags_4(state, p, endp)) {
6852 case 1:
6853 goto s_n_llhttp__internal__n_chunk_size_otherwise;
6854 default:
6855 goto s_n_llhttp__internal__n_error_10;
6856 }
6857 /* UNREACHABLE */;
6858 abort();
6859 }
6860 s_n_llhttp__internal__n_pause_3: {
6861 state->error = 0x15;
6862 state->reason = "on_chunk_complete pause";
6863 state->error_pos = (const char*) p;
6864 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_content_length_1;
6865 return s_error;
6866 /* UNREACHABLE */;
6867 abort();
6868 }
6869 s_n_llhttp__internal__n_error_14: {
6870 state->error = 0x14;
6871 state->reason = "`on_chunk_complete` callback error";
6872 state->error_pos = (const char*) p;
6873 state->_current = (void*) (intptr_t) s_error;
6874 return s_error;
6875 /* UNREACHABLE */;
6876 abort();
6877 }
6878 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete: {
6879 switch (llhttp__on_chunk_complete(state, p, endp)) {
6880 case 0:
6881 goto s_n_llhttp__internal__n_invoke_update_content_length_1;
6882 case 21:
6883 goto s_n_llhttp__internal__n_pause_3;
6884 default:
6885 goto s_n_llhttp__internal__n_error_14;
6886 }
6887 /* UNREACHABLE */;
6888 abort();
6889 }
6890 s_n_llhttp__internal__n_error_13: {
6891 state->error = 0x19;
6892 state->reason = "Missing expected CR after chunk data";
6893 state->error_pos = (const char*) p;
6894 state->_current = (void*) (intptr_t) s_error;
6895 return s_error;
6896 /* UNREACHABLE */;
6897 abort();
6898 }
6899 s_n_llhttp__internal__n_invoke_test_lenient_flags_6: {
6900 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
6901 case 1:
6902 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete;
6903 default:
6904 goto s_n_llhttp__internal__n_error_13;
6905 }
6906 /* UNREACHABLE */;
6907 abort();
6908 }
6909 s_n_llhttp__internal__n_error_15: {
6910 state->error = 0x2;
6911 state->reason = "Expected LF after chunk data";
6912 state->error_pos = (const char*) p;
6913 state->_current = (void*) (intptr_t) s_error;
6914 return s_error;
6915 /* UNREACHABLE */;
6916 abort();
6917 }
6918 s_n_llhttp__internal__n_invoke_test_lenient_flags_7: {
6919 switch (llhttp__internal__c_test_lenient_flags_7(state, p, endp)) {
6920 case 1:
6921 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete;
6922 default:
6923 goto s_n_llhttp__internal__n_error_15;
6924 }
6925 /* UNREACHABLE */;
6926 abort();
6927 }
6928 s_n_llhttp__internal__n_span_end_llhttp__on_body: {
6929 const unsigned char* start;
6930 int err;
6931
6932 start = state->_span_pos0;
6933 state->_span_pos0 = NULL;
6934 err = llhttp__on_body(state, start, p);
6935 if (err != 0) {
6936 state->error = err;
6937 state->error_pos = (const char*) p;
6938 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_data_almost_done;
6939 return s_error;
6940 }
6941 goto s_n_llhttp__internal__n_chunk_data_almost_done;
6942 /* UNREACHABLE */;
6943 abort();
6944 }
6945 s_n_llhttp__internal__n_invoke_or_flags: {
6946 switch (llhttp__internal__c_or_flags(state, p, endp)) {
6947 default:
6948 goto s_n_llhttp__internal__n_header_field_start;
6949 }
6950 /* UNREACHABLE */;
6951 abort();
6952 }
6953 s_n_llhttp__internal__n_pause_4: {
6954 state->error = 0x15;
6955 state->reason = "on_chunk_header pause";
6956 state->error_pos = (const char*) p;
6957 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_content_length;
6958 return s_error;
6959 /* UNREACHABLE */;
6960 abort();
6961 }
6962 s_n_llhttp__internal__n_error_12: {
6963 state->error = 0x13;
6964 state->reason = "`on_chunk_header` callback error";
6965 state->error_pos = (const char*) p;
6966 state->_current = (void*) (intptr_t) s_error;
6967 return s_error;
6968 /* UNREACHABLE */;
6969 abort();
6970 }
6971 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header: {
6972 switch (llhttp__on_chunk_header(state, p, endp)) {
6973 case 0:
6974 goto s_n_llhttp__internal__n_invoke_is_equal_content_length;
6975 case 21:
6976 goto s_n_llhttp__internal__n_pause_4;
6977 default:
6978 goto s_n_llhttp__internal__n_error_12;
6979 }
6980 /* UNREACHABLE */;
6981 abort();
6982 }
6983 s_n_llhttp__internal__n_error_16: {
6984 state->error = 0x2;
6985 state->reason = "Expected LF after chunk size";
6986 state->error_pos = (const char*) p;
6987 state->_current = (void*) (intptr_t) s_error;
6988 return s_error;
6989 /* UNREACHABLE */;
6990 abort();
6991 }
6992 s_n_llhttp__internal__n_invoke_test_lenient_flags_8: {
6993 switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) {
6994 case 1:
6995 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header;
6996 default:
6997 goto s_n_llhttp__internal__n_error_16;
6998 }
6999 /* UNREACHABLE */;
7000 abort();
7001 }
7002 s_n_llhttp__internal__n_error_11: {
7003 state->error = 0x19;
7004 state->reason = "Missing expected CR after chunk size";
7005 state->error_pos = (const char*) p;
7006 state->_current = (void*) (intptr_t) s_error;
7007 return s_error;
7008 /* UNREACHABLE */;
7009 abort();
7010 }
7011 s_n_llhttp__internal__n_invoke_test_lenient_flags_5: {
7012 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
7013 case 1:
7014 goto s_n_llhttp__internal__n_chunk_size_almost_done;
7015 default:
7016 goto s_n_llhttp__internal__n_error_11;
7017 }
7018 /* UNREACHABLE */;
7019 abort();
7020 }
7021 s_n_llhttp__internal__n_error_17: {
7022 state->error = 0x2;
7023 state->reason = "Invalid character in chunk extensions";
7024 state->error_pos = (const char*) p;
7025 state->_current = (void*) (intptr_t) s_error;
7026 return s_error;
7027 /* UNREACHABLE */;
7028 abort();
7029 }
7030 s_n_llhttp__internal__n_error_18: {
7031 state->error = 0x2;
7032 state->reason = "Invalid character in chunk extensions";
7033 state->error_pos = (const char*) p;
7034 state->_current = (void*) (intptr_t) s_error;
7035 return s_error;
7036 /* UNREACHABLE */;
7037 abort();
7038 }
7039 s_n_llhttp__internal__n_error_20: {
7040 state->error = 0x19;
7041 state->reason = "Missing expected CR after chunk extension name";
7042 state->error_pos = (const char*) p;
7043 state->_current = (void*) (intptr_t) s_error;
7044 return s_error;
7045 /* UNREACHABLE */;
7046 abort();
7047 }
7048 s_n_llhttp__internal__n_pause_5: {
7049 state->error = 0x15;
7050 state->reason = "on_chunk_extension_name pause";
7051 state->error_pos = (const char*) p;
7052 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_9;
7053 return s_error;
7054 /* UNREACHABLE */;
7055 abort();
7056 }
7057 s_n_llhttp__internal__n_error_19: {
7058 state->error = 0x22;
7059 state->reason = "`on_chunk_extension_name` callback error";
7060 state->error_pos = (const char*) p;
7061 state->_current = (void*) (intptr_t) s_error;
7062 return s_error;
7063 /* UNREACHABLE */;
7064 abort();
7065 }
7066 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name: {
7067 const unsigned char* start;
7068 int err;
7069
7070 start = state->_span_pos0;
7071 state->_span_pos0 = NULL;
7072 err = llhttp__on_chunk_extension_name(state, start, p);
7073 if (err != 0) {
7074 state->error = err;
7075 state->error_pos = (const char*) p;
7076 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete;
7077 return s_error;
7078 }
7079 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete;
7080 /* UNREACHABLE */;
7081 abort();
7082 }
7083 s_n_llhttp__internal__n_pause_6: {
7084 state->error = 0x15;
7085 state->reason = "on_chunk_extension_name pause";
7086 state->error_pos = (const char*) p;
7087 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done;
7088 return s_error;
7089 /* UNREACHABLE */;
7090 abort();
7091 }
7092 s_n_llhttp__internal__n_error_21: {
7093 state->error = 0x22;
7094 state->reason = "`on_chunk_extension_name` callback error";
7095 state->error_pos = (const char*) p;
7096 state->_current = (void*) (intptr_t) s_error;
7097 return s_error;
7098 /* UNREACHABLE */;
7099 abort();
7100 }
7101 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1: {
7102 const unsigned char* start;
7103 int err;
7104
7105 start = state->_span_pos0;
7106 state->_span_pos0 = NULL;
7107 err = llhttp__on_chunk_extension_name(state, start, p);
7108 if (err != 0) {
7109 state->error = err;
7110 state->error_pos = (const char*) (p + 1);
7111 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1;
7112 return s_error;
7113 }
7114 p++;
7115 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1;
7116 /* UNREACHABLE */;
7117 abort();
7118 }
7119 s_n_llhttp__internal__n_pause_7: {
7120 state->error = 0x15;
7121 state->reason = "on_chunk_extension_name pause";
7122 state->error_pos = (const char*) p;
7123 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions;
7124 return s_error;
7125 /* UNREACHABLE */;
7126 abort();
7127 }
7128 s_n_llhttp__internal__n_error_22: {
7129 state->error = 0x22;
7130 state->reason = "`on_chunk_extension_name` callback error";
7131 state->error_pos = (const char*) p;
7132 state->_current = (void*) (intptr_t) s_error;
7133 return s_error;
7134 /* UNREACHABLE */;
7135 abort();
7136 }
7137 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2: {
7138 const unsigned char* start;
7139 int err;
7140
7141 start = state->_span_pos0;
7142 state->_span_pos0 = NULL;
7143 err = llhttp__on_chunk_extension_name(state, start, p);
7144 if (err != 0) {
7145 state->error = err;
7146 state->error_pos = (const char*) (p + 1);
7147 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2;
7148 return s_error;
7149 }
7150 p++;
7151 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2;
7152 /* UNREACHABLE */;
7153 abort();
7154 }
7155 s_n_llhttp__internal__n_error_25: {
7156 state->error = 0x19;
7157 state->reason = "Missing expected CR after chunk extension value";
7158 state->error_pos = (const char*) p;
7159 state->_current = (void*) (intptr_t) s_error;
7160 return s_error;
7161 /* UNREACHABLE */;
7162 abort();
7163 }
7164 s_n_llhttp__internal__n_pause_8: {
7165 state->error = 0x15;
7166 state->reason = "on_chunk_extension_value pause";
7167 state->error_pos = (const char*) p;
7168 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_10;
7169 return s_error;
7170 /* UNREACHABLE */;
7171 abort();
7172 }
7173 s_n_llhttp__internal__n_error_24: {
7174 state->error = 0x23;
7175 state->reason = "`on_chunk_extension_value` callback error";
7176 state->error_pos = (const char*) p;
7177 state->_current = (void*) (intptr_t) s_error;
7178 return s_error;
7179 /* UNREACHABLE */;
7180 abort();
7181 }
7182 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value: {
7183 const unsigned char* start;
7184 int err;
7185
7186 start = state->_span_pos0;
7187 state->_span_pos0 = NULL;
7188 err = llhttp__on_chunk_extension_value(state, start, p);
7189 if (err != 0) {
7190 state->error = err;
7191 state->error_pos = (const char*) p;
7192 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete;
7193 return s_error;
7194 }
7195 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete;
7196 /* UNREACHABLE */;
7197 abort();
7198 }
7199 s_n_llhttp__internal__n_pause_9: {
7200 state->error = 0x15;
7201 state->reason = "on_chunk_extension_value pause";
7202 state->error_pos = (const char*) p;
7203 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done;
7204 return s_error;
7205 /* UNREACHABLE */;
7206 abort();
7207 }
7208 s_n_llhttp__internal__n_error_26: {
7209 state->error = 0x23;
7210 state->reason = "`on_chunk_extension_value` callback error";
7211 state->error_pos = (const char*) p;
7212 state->_current = (void*) (intptr_t) s_error;
7213 return s_error;
7214 /* UNREACHABLE */;
7215 abort();
7216 }
7217 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1: {
7218 const unsigned char* start;
7219 int err;
7220
7221 start = state->_span_pos0;
7222 state->_span_pos0 = NULL;
7223 err = llhttp__on_chunk_extension_value(state, start, p);
7224 if (err != 0) {
7225 state->error = err;
7226 state->error_pos = (const char*) (p + 1);
7227 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1;
7228 return s_error;
7229 }
7230 p++;
7231 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1;
7232 /* UNREACHABLE */;
7233 abort();
7234 }
7235 s_n_llhttp__internal__n_error_28: {
7236 state->error = 0x19;
7237 state->reason = "Missing expected CR after chunk extension value";
7238 state->error_pos = (const char*) p;
7239 state->_current = (void*) (intptr_t) s_error;
7240 return s_error;
7241 /* UNREACHABLE */;
7242 abort();
7243 }
7244 s_n_llhttp__internal__n_invoke_test_lenient_flags_11: {
7245 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
7246 case 1:
7247 goto s_n_llhttp__internal__n_chunk_size_almost_done;
7248 default:
7249 goto s_n_llhttp__internal__n_error_28;
7250 }
7251 /* UNREACHABLE */;
7252 abort();
7253 }
7254 s_n_llhttp__internal__n_error_29: {
7255 state->error = 0x2;
7256 state->reason = "Invalid character in chunk extensions quote value";
7257 state->error_pos = (const char*) p;
7258 state->_current = (void*) (intptr_t) s_error;
7259 return s_error;
7260 /* UNREACHABLE */;
7261 abort();
7262 }
7263 s_n_llhttp__internal__n_pause_10: {
7264 state->error = 0x15;
7265 state->reason = "on_chunk_extension_value pause";
7266 state->error_pos = (const char*) p;
7267 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extension_quoted_value_done;
7268 return s_error;
7269 /* UNREACHABLE */;
7270 abort();
7271 }
7272 s_n_llhttp__internal__n_error_27: {
7273 state->error = 0x23;
7274 state->reason = "`on_chunk_extension_value` callback error";
7275 state->error_pos = (const char*) p;
7276 state->_current = (void*) (intptr_t) s_error;
7277 return s_error;
7278 /* UNREACHABLE */;
7279 abort();
7280 }
7281 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2: {
7282 const unsigned char* start;
7283 int err;
7284
7285 start = state->_span_pos0;
7286 state->_span_pos0 = NULL;
7287 err = llhttp__on_chunk_extension_value(state, start, p);
7288 if (err != 0) {
7289 state->error = err;
7290 state->error_pos = (const char*) p;
7291 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2;
7292 return s_error;
7293 }
7294 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2;
7295 /* UNREACHABLE */;
7296 abort();
7297 }
7298 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3: {
7299 const unsigned char* start;
7300 int err;
7301
7302 start = state->_span_pos0;
7303 state->_span_pos0 = NULL;
7304 err = llhttp__on_chunk_extension_value(state, start, p);
7305 if (err != 0) {
7306 state->error = err;
7307 state->error_pos = (const char*) (p + 1);
7308 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30;
7309 return s_error;
7310 }
7311 p++;
7312 goto s_n_llhttp__internal__n_error_30;
7313 /* UNREACHABLE */;
7314 abort();
7315 }
7316 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4: {
7317 const unsigned char* start;
7318 int err;
7319
7320 start = state->_span_pos0;
7321 state->_span_pos0 = NULL;
7322 err = llhttp__on_chunk_extension_value(state, start, p);
7323 if (err != 0) {
7324 state->error = err;
7325 state->error_pos = (const char*) (p + 1);
7326 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_31;
7327 return s_error;
7328 }
7329 p++;
7330 goto s_n_llhttp__internal__n_error_31;
7331 /* UNREACHABLE */;
7332 abort();
7333 }
7334 s_n_llhttp__internal__n_pause_11: {
7335 state->error = 0x15;
7336 state->reason = "on_chunk_extension_value pause";
7337 state->error_pos = (const char*) p;
7338 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions;
7339 return s_error;
7340 /* UNREACHABLE */;
7341 abort();
7342 }
7343 s_n_llhttp__internal__n_error_32: {
7344 state->error = 0x23;
7345 state->reason = "`on_chunk_extension_value` callback error";
7346 state->error_pos = (const char*) p;
7347 state->_current = (void*) (intptr_t) s_error;
7348 return s_error;
7349 /* UNREACHABLE */;
7350 abort();
7351 }
7352 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5: {
7353 const unsigned char* start;
7354 int err;
7355
7356 start = state->_span_pos0;
7357 state->_span_pos0 = NULL;
7358 err = llhttp__on_chunk_extension_value(state, start, p);
7359 if (err != 0) {
7360 state->error = err;
7361 state->error_pos = (const char*) (p + 1);
7362 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3;
7363 return s_error;
7364 }
7365 p++;
7366 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3;
7367 /* UNREACHABLE */;
7368 abort();
7369 }
7370 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6: {
7371 const unsigned char* start;
7372 int err;
7373
7374 start = state->_span_pos0;
7375 state->_span_pos0 = NULL;
7376 err = llhttp__on_chunk_extension_value(state, start, p);
7377 if (err != 0) {
7378 state->error = err;
7379 state->error_pos = (const char*) (p + 1);
7380 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_33;
7381 return s_error;
7382 }
7383 p++;
7384 goto s_n_llhttp__internal__n_error_33;
7385 /* UNREACHABLE */;
7386 abort();
7387 }
7388 s_n_llhttp__internal__n_pause_12: {
7389 state->error = 0x15;
7390 state->reason = "on_chunk_extension_name pause";
7391 state->error_pos = (const char*) p;
7392 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extension_value;
7393 return s_error;
7394 /* UNREACHABLE */;
7395 abort();
7396 }
7397 s_n_llhttp__internal__n_error_23: {
7398 state->error = 0x22;
7399 state->reason = "`on_chunk_extension_name` callback error";
7400 state->error_pos = (const char*) p;
7401 state->_current = (void*) (intptr_t) s_error;
7402 return s_error;
7403 /* UNREACHABLE */;
7404 abort();
7405 }
7406 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3: {
7407 switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) {
7408 case 0:
7409 goto s_n_llhttp__internal__n_chunk_extension_value;
7410 case 21:
7411 goto s_n_llhttp__internal__n_pause_12;
7412 default:
7413 goto s_n_llhttp__internal__n_error_23;
7414 }
7415 /* UNREACHABLE */;
7416 abort();
7417 }
7418 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3: {
7419 const unsigned char* start;
7420 int err;
7421
7422 start = state->_span_pos0;
7423 state->_span_pos0 = NULL;
7424 err = llhttp__on_chunk_extension_name(state, start, p);
7425 if (err != 0) {
7426 state->error = err;
7427 state->error_pos = (const char*) (p + 1);
7428 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value;
7429 return s_error;
7430 }
7431 p++;
7432 goto s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value;
7433 /* UNREACHABLE */;
7434 abort();
7435 }
7436 s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4: {
7437 const unsigned char* start;
7438 int err;
7439
7440 start = state->_span_pos0;
7441 state->_span_pos0 = NULL;
7442 err = llhttp__on_chunk_extension_name(state, start, p);
7443 if (err != 0) {
7444 state->error = err;
7445 state->error_pos = (const char*) (p + 1);
7446 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_34;
7447 return s_error;
7448 }
7449 p++;
7450 goto s_n_llhttp__internal__n_error_34;
7451 /* UNREACHABLE */;
7452 abort();
7453 }
7454 s_n_llhttp__internal__n_error_35: {
7455 state->error = 0xc;
7456 state->reason = "Invalid character in chunk size";
7457 state->error_pos = (const char*) p;
7458 state->_current = (void*) (intptr_t) s_error;
7459 return s_error;
7460 /* UNREACHABLE */;
7461 abort();
7462 }
7463 s_n_llhttp__internal__n_invoke_mul_add_content_length: {
7464 switch (llhttp__internal__c_mul_add_content_length(state, p, endp, match)) {
7465 case 1:
7466 goto s_n_llhttp__internal__n_error_36;
7467 default:
7468 goto s_n_llhttp__internal__n_chunk_size;
7469 }
7470 /* UNREACHABLE */;
7471 abort();
7472 }
7473 s_n_llhttp__internal__n_error_37: {
7474 state->error = 0xc;
7475 state->reason = "Invalid character in chunk size";
7476 state->error_pos = (const char*) p;
7477 state->_current = (void*) (intptr_t) s_error;
7478 return s_error;
7479 /* UNREACHABLE */;
7480 abort();
7481 }
7482 s_n_llhttp__internal__n_span_end_llhttp__on_body_1: {
7483 const unsigned char* start;
7484 int err;
7485
7486 start = state->_span_pos0;
7487 state->_span_pos0 = NULL;
7488 err = llhttp__on_body(state, start, p);
7489 if (err != 0) {
7490 state->error = err;
7491 state->error_pos = (const char*) p;
7492 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
7493 return s_error;
7494 }
7495 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
7496 /* UNREACHABLE */;
7497 abort();
7498 }
7499 s_n_llhttp__internal__n_invoke_update_finish_3: {
7500 switch (llhttp__internal__c_update_finish_3(state, p, endp)) {
7501 default:
7502 goto s_n_llhttp__internal__n_span_start_llhttp__on_body_2;
7503 }
7504 /* UNREACHABLE */;
7505 abort();
7506 }
7507 s_n_llhttp__internal__n_error_39: {
7508 state->error = 0xf;
7509 state->reason = "Request has invalid `Transfer-Encoding`";
7510 state->error_pos = (const char*) p;
7511 state->_current = (void*) (intptr_t) s_error;
7512 return s_error;
7513 /* UNREACHABLE */;
7514 abort();
7515 }
7516 s_n_llhttp__internal__n_pause: {
7517 state->error = 0x15;
7518 state->reason = "on_message_complete pause";
7519 state->error_pos = (const char*) p;
7520 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
7521 return s_error;
7522 /* UNREACHABLE */;
7523 abort();
7524 }
7525 s_n_llhttp__internal__n_error_7: {
7526 state->error = 0x12;
7527 state->reason = "`on_message_complete` callback error";
7528 state->error_pos = (const char*) p;
7529 state->_current = (void*) (intptr_t) s_error;
7530 return s_error;
7531 /* UNREACHABLE */;
7532 abort();
7533 }
7534 s_n_llhttp__internal__n_invoke_llhttp__on_message_complete: {
7535 switch (llhttp__on_message_complete(state, p, endp)) {
7536 case 0:
7537 goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
7538 case 21:
7539 goto s_n_llhttp__internal__n_pause;
7540 default:
7541 goto s_n_llhttp__internal__n_error_7;
7542 }
7543 /* UNREACHABLE */;
7544 abort();
7545 }
7546 s_n_llhttp__internal__n_invoke_or_flags_1: {
7547 switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
7548 default:
7549 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7550 }
7551 /* UNREACHABLE */;
7552 abort();
7553 }
7554 s_n_llhttp__internal__n_invoke_or_flags_2: {
7555 switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
7556 default:
7557 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7558 }
7559 /* UNREACHABLE */;
7560 abort();
7561 }
7562 s_n_llhttp__internal__n_invoke_update_upgrade: {
7563 switch (llhttp__internal__c_update_upgrade(state, p, endp)) {
7564 default:
7565 goto s_n_llhttp__internal__n_invoke_or_flags_2;
7566 }
7567 /* UNREACHABLE */;
7568 abort();
7569 }
7570 s_n_llhttp__internal__n_pause_14: {
7571 state->error = 0x15;
7572 state->reason = "Paused by on_headers_complete";
7573 state->error_pos = (const char*) p;
7574 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7575 return s_error;
7576 /* UNREACHABLE */;
7577 abort();
7578 }
7579 s_n_llhttp__internal__n_error_6: {
7580 state->error = 0x11;
7581 state->reason = "User callback error";
7582 state->error_pos = (const char*) p;
7583 state->_current = (void*) (intptr_t) s_error;
7584 return s_error;
7585 /* UNREACHABLE */;
7586 abort();
7587 }
7588 s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete: {
7589 switch (llhttp__on_headers_complete(state, p, endp)) {
7590 case 0:
7591 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7592 case 1:
7593 goto s_n_llhttp__internal__n_invoke_or_flags_1;
7594 case 2:
7595 goto s_n_llhttp__internal__n_invoke_update_upgrade;
7596 case 21:
7597 goto s_n_llhttp__internal__n_pause_14;
7598 default:
7599 goto s_n_llhttp__internal__n_error_6;
7600 }
7601 /* UNREACHABLE */;
7602 abort();
7603 }
7604 s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete: {
7605 switch (llhttp__before_headers_complete(state, p, endp)) {
7606 default:
7607 goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete;
7608 }
7609 /* UNREACHABLE */;
7610 abort();
7611 }
7612 s_n_llhttp__internal__n_invoke_test_flags: {
7613 switch (llhttp__internal__c_test_flags(state, p, endp)) {
7614 case 1:
7615 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1;
7616 default:
7617 goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete;
7618 }
7619 /* UNREACHABLE */;
7620 abort();
7621 }
7622 s_n_llhttp__internal__n_invoke_test_lenient_flags_1: {
7623 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
7624 case 1:
7625 goto s_n_llhttp__internal__n_invoke_test_flags;
7626 default:
7627 goto s_n_llhttp__internal__n_error_5;
7628 }
7629 /* UNREACHABLE */;
7630 abort();
7631 }
7632 s_n_llhttp__internal__n_pause_17: {
7633 state->error = 0x15;
7634 state->reason = "on_chunk_complete pause";
7635 state->error_pos = (const char*) p;
7636 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
7637 return s_error;
7638 /* UNREACHABLE */;
7639 abort();
7640 }
7641 s_n_llhttp__internal__n_error_42: {
7642 state->error = 0x14;
7643 state->reason = "`on_chunk_complete` callback error";
7644 state->error_pos = (const char*) p;
7645 state->_current = (void*) (intptr_t) s_error;
7646 return s_error;
7647 /* UNREACHABLE */;
7648 abort();
7649 }
7650 s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2: {
7651 switch (llhttp__on_chunk_complete(state, p, endp)) {
7652 case 0:
7653 goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
7654 case 21:
7655 goto s_n_llhttp__internal__n_pause_17;
7656 default:
7657 goto s_n_llhttp__internal__n_error_42;
7658 }
7659 /* UNREACHABLE */;
7660 abort();
7661 }
7662 s_n_llhttp__internal__n_invoke_or_flags_3: {
7663 switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
7664 default:
7665 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7666 }
7667 /* UNREACHABLE */;
7668 abort();
7669 }
7670 s_n_llhttp__internal__n_invoke_or_flags_4: {
7671 switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
7672 default:
7673 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7674 }
7675 /* UNREACHABLE */;
7676 abort();
7677 }
7678 s_n_llhttp__internal__n_invoke_update_upgrade_1: {
7679 switch (llhttp__internal__c_update_upgrade(state, p, endp)) {
7680 default:
7681 goto s_n_llhttp__internal__n_invoke_or_flags_4;
7682 }
7683 /* UNREACHABLE */;
7684 abort();
7685 }
7686 s_n_llhttp__internal__n_pause_16: {
7687 state->error = 0x15;
7688 state->reason = "Paused by on_headers_complete";
7689 state->error_pos = (const char*) p;
7690 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7691 return s_error;
7692 /* UNREACHABLE */;
7693 abort();
7694 }
7695 s_n_llhttp__internal__n_error_41: {
7696 state->error = 0x11;
7697 state->reason = "User callback error";
7698 state->error_pos = (const char*) p;
7699 state->_current = (void*) (intptr_t) s_error;
7700 return s_error;
7701 /* UNREACHABLE */;
7702 abort();
7703 }
7704 s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1: {
7705 switch (llhttp__on_headers_complete(state, p, endp)) {
7706 case 0:
7707 goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
7708 case 1:
7709 goto s_n_llhttp__internal__n_invoke_or_flags_3;
7710 case 2:
7711 goto s_n_llhttp__internal__n_invoke_update_upgrade_1;
7712 case 21:
7713 goto s_n_llhttp__internal__n_pause_16;
7714 default:
7715 goto s_n_llhttp__internal__n_error_41;
7716 }
7717 /* UNREACHABLE */;
7718 abort();
7719 }
7720 s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1: {
7721 switch (llhttp__before_headers_complete(state, p, endp)) {
7722 default:
7723 goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1;
7724 }
7725 /* UNREACHABLE */;
7726 abort();
7727 }
7728 s_n_llhttp__internal__n_invoke_test_flags_1: {
7729 switch (llhttp__internal__c_test_flags(state, p, endp)) {
7730 case 1:
7731 goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2;
7732 default:
7733 goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1;
7734 }
7735 /* UNREACHABLE */;
7736 abort();
7737 }
7738 s_n_llhttp__internal__n_error_43: {
7739 state->error = 0x2;
7740 state->reason = "Expected LF after headers";
7741 state->error_pos = (const char*) p;
7742 state->_current = (void*) (intptr_t) s_error;
7743 return s_error;
7744 /* UNREACHABLE */;
7745 abort();
7746 }
7747 s_n_llhttp__internal__n_invoke_test_lenient_flags_12: {
7748 switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) {
7749 case 1:
7750 goto s_n_llhttp__internal__n_invoke_test_flags_1;
7751 default:
7752 goto s_n_llhttp__internal__n_error_43;
7753 }
7754 /* UNREACHABLE */;
7755 abort();
7756 }
7757 s_n_llhttp__internal__n_span_end_llhttp__on_header_field: {
7758 const unsigned char* start;
7759 int err;
7760
7761 start = state->_span_pos0;
7762 state->_span_pos0 = NULL;
7763 err = llhttp__on_header_field(state, start, p);
7764 if (err != 0) {
7765 state->error = err;
7766 state->error_pos = (const char*) (p + 1);
7767 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_5;
7768 return s_error;
7769 }
7770 p++;
7771 goto s_n_llhttp__internal__n_error_5;
7772 /* UNREACHABLE */;
7773 abort();
7774 }
7775 s_n_llhttp__internal__n_invoke_test_lenient_flags_13: {
7776 switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) {
7777 case 1:
7778 goto s_n_llhttp__internal__n_header_field_colon_discard_ws;
7779 default:
7780 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field;
7781 }
7782 /* UNREACHABLE */;
7783 abort();
7784 }
7785 s_n_llhttp__internal__n_error_58: {
7786 state->error = 0xb;
7787 state->reason = "Content-Length can't be present with Transfer-Encoding";
7788 state->error_pos = (const char*) p;
7789 state->_current = (void*) (intptr_t) s_error;
7790 return s_error;
7791 /* UNREACHABLE */;
7792 abort();
7793 }
7794 s_n_llhttp__internal__n_error_46: {
7795 state->error = 0xa;
7796 state->reason = "Invalid header value char";
7797 state->error_pos = (const char*) p;
7798 state->_current = (void*) (intptr_t) s_error;
7799 return s_error;
7800 /* UNREACHABLE */;
7801 abort();
7802 }
7803 s_n_llhttp__internal__n_invoke_test_lenient_flags_15: {
7804 switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) {
7805 case 1:
7806 goto s_n_llhttp__internal__n_header_value_discard_ws;
7807 default:
7808 goto s_n_llhttp__internal__n_error_46;
7809 }
7810 /* UNREACHABLE */;
7811 abort();
7812 }
7813 s_n_llhttp__internal__n_error_48: {
7814 state->error = 0xb;
7815 state->reason = "Empty Content-Length";
7816 state->error_pos = (const char*) p;
7817 state->_current = (void*) (intptr_t) s_error;
7818 return s_error;
7819 /* UNREACHABLE */;
7820 abort();
7821 }
7822 s_n_llhttp__internal__n_pause_18: {
7823 state->error = 0x15;
7824 state->reason = "on_header_value_complete pause";
7825 state->error_pos = (const char*) p;
7826 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_field_start;
7827 return s_error;
7828 /* UNREACHABLE */;
7829 abort();
7830 }
7831 s_n_llhttp__internal__n_error_47: {
7832 state->error = 0x1d;
7833 state->reason = "`on_header_value_complete` callback error";
7834 state->error_pos = (const char*) p;
7835 state->_current = (void*) (intptr_t) s_error;
7836 return s_error;
7837 /* UNREACHABLE */;
7838 abort();
7839 }
7840 s_n_llhttp__internal__n_span_end_llhttp__on_header_value: {
7841 const unsigned char* start;
7842 int err;
7843
7844 start = state->_span_pos0;
7845 state->_span_pos0 = NULL;
7846 err = llhttp__on_header_value(state, start, p);
7847 if (err != 0) {
7848 state->error = err;
7849 state->error_pos = (const char*) p;
7850 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete;
7851 return s_error;
7852 }
7853 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete;
7854 /* UNREACHABLE */;
7855 abort();
7856 }
7857 s_n_llhttp__internal__n_invoke_update_header_state: {
7858 switch (llhttp__internal__c_update_header_state(state, p, endp)) {
7859 default:
7860 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
7861 }
7862 /* UNREACHABLE */;
7863 abort();
7864 }
7865 s_n_llhttp__internal__n_invoke_or_flags_5: {
7866 switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
7867 default:
7868 goto s_n_llhttp__internal__n_invoke_update_header_state;
7869 }
7870 /* UNREACHABLE */;
7871 abort();
7872 }
7873 s_n_llhttp__internal__n_invoke_or_flags_6: {
7874 switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
7875 default:
7876 goto s_n_llhttp__internal__n_invoke_update_header_state;
7877 }
7878 /* UNREACHABLE */;
7879 abort();
7880 }
7881 s_n_llhttp__internal__n_invoke_or_flags_7: {
7882 switch (llhttp__internal__c_or_flags_7(state, p, endp)) {
7883 default:
7884 goto s_n_llhttp__internal__n_invoke_update_header_state;
7885 }
7886 /* UNREACHABLE */;
7887 abort();
7888 }
7889 s_n_llhttp__internal__n_invoke_or_flags_8: {
7890 switch (llhttp__internal__c_or_flags_8(state, p, endp)) {
7891 default:
7892 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
7893 }
7894 /* UNREACHABLE */;
7895 abort();
7896 }
7897 s_n_llhttp__internal__n_invoke_load_header_state_2: {
7898 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
7899 case 5:
7900 goto s_n_llhttp__internal__n_invoke_or_flags_5;
7901 case 6:
7902 goto s_n_llhttp__internal__n_invoke_or_flags_6;
7903 case 7:
7904 goto s_n_llhttp__internal__n_invoke_or_flags_7;
7905 case 8:
7906 goto s_n_llhttp__internal__n_invoke_or_flags_8;
7907 default:
7908 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
7909 }
7910 /* UNREACHABLE */;
7911 abort();
7912 }
7913 s_n_llhttp__internal__n_invoke_load_header_state_1: {
7914 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
7915 case 2:
7916 goto s_n_llhttp__internal__n_error_48;
7917 default:
7918 goto s_n_llhttp__internal__n_invoke_load_header_state_2;
7919 }
7920 /* UNREACHABLE */;
7921 abort();
7922 }
7923 s_n_llhttp__internal__n_error_45: {
7924 state->error = 0xa;
7925 state->reason = "Invalid header value char";
7926 state->error_pos = (const char*) p;
7927 state->_current = (void*) (intptr_t) s_error;
7928 return s_error;
7929 /* UNREACHABLE */;
7930 abort();
7931 }
7932 s_n_llhttp__internal__n_invoke_test_lenient_flags_14: {
7933 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
7934 case 1:
7935 goto s_n_llhttp__internal__n_header_value_discard_lws;
7936 default:
7937 goto s_n_llhttp__internal__n_error_45;
7938 }
7939 /* UNREACHABLE */;
7940 abort();
7941 }
7942 s_n_llhttp__internal__n_error_49: {
7943 state->error = 0x2;
7944 state->reason = "Expected LF after CR";
7945 state->error_pos = (const char*) p;
7946 state->_current = (void*) (intptr_t) s_error;
7947 return s_error;
7948 /* UNREACHABLE */;
7949 abort();
7950 }
7951 s_n_llhttp__internal__n_invoke_test_lenient_flags_16: {
7952 switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) {
7953 case 1:
7954 goto s_n_llhttp__internal__n_header_value_discard_lws;
7955 default:
7956 goto s_n_llhttp__internal__n_error_49;
7957 }
7958 /* UNREACHABLE */;
7959 abort();
7960 }
7961 s_n_llhttp__internal__n_invoke_update_header_state_1: {
7962 switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
7963 default:
7964 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
7965 }
7966 /* UNREACHABLE */;
7967 abort();
7968 }
7969 s_n_llhttp__internal__n_invoke_load_header_state_4: {
7970 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
7971 case 8:
7972 goto s_n_llhttp__internal__n_invoke_update_header_state_1;
7973 default:
7974 goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
7975 }
7976 /* UNREACHABLE */;
7977 abort();
7978 }
7979 s_n_llhttp__internal__n_invoke_update_header_state_2: {
7980 switch (llhttp__internal__c_update_header_state(state, p, endp)) {
7981 default:
7982 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete;
7983 }
7984 /* UNREACHABLE */;
7985 abort();
7986 }
7987 s_n_llhttp__internal__n_invoke_or_flags_9: {
7988 switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
7989 default:
7990 goto s_n_llhttp__internal__n_invoke_update_header_state_2;
7991 }
7992 /* UNREACHABLE */;
7993 abort();
7994 }
7995 s_n_llhttp__internal__n_invoke_or_flags_10: {
7996 switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
7997 default:
7998 goto s_n_llhttp__internal__n_invoke_update_header_state_2;
7999 }
8000 /* UNREACHABLE */;
8001 abort();
8002 }
8003 s_n_llhttp__internal__n_invoke_or_flags_11: {
8004 switch (llhttp__internal__c_or_flags_7(state, p, endp)) {
8005 default:
8006 goto s_n_llhttp__internal__n_invoke_update_header_state_2;
8007 }
8008 /* UNREACHABLE */;
8009 abort();
8010 }
8011 s_n_llhttp__internal__n_invoke_or_flags_12: {
8012 switch (llhttp__internal__c_or_flags_8(state, p, endp)) {
8013 default:
8014 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete;
8015 }
8016 /* UNREACHABLE */;
8017 abort();
8018 }
8019 s_n_llhttp__internal__n_invoke_load_header_state_5: {
8020 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
8021 case 5:
8022 goto s_n_llhttp__internal__n_invoke_or_flags_9;
8023 case 6:
8024 goto s_n_llhttp__internal__n_invoke_or_flags_10;
8025 case 7:
8026 goto s_n_llhttp__internal__n_invoke_or_flags_11;
8027 case 8:
8028 goto s_n_llhttp__internal__n_invoke_or_flags_12;
8029 default:
8030 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete;
8031 }
8032 /* UNREACHABLE */;
8033 abort();
8034 }
8035 s_n_llhttp__internal__n_error_51: {
8036 state->error = 0x3;
8037 state->reason = "Missing expected LF after header value";
8038 state->error_pos = (const char*) p;
8039 state->_current = (void*) (intptr_t) s_error;
8040 return s_error;
8041 /* UNREACHABLE */;
8042 abort();
8043 }
8044 s_n_llhttp__internal__n_error_50: {
8045 state->error = 0x19;
8046 state->reason = "Missing expected CR after header value";
8047 state->error_pos = (const char*) p;
8048 state->_current = (void*) (intptr_t) s_error;
8049 return s_error;
8050 /* UNREACHABLE */;
8051 abort();
8052 }
8053 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1: {
8054 const unsigned char* start;
8055 int err;
8056
8057 start = state->_span_pos0;
8058 state->_span_pos0 = NULL;
8059 err = llhttp__on_header_value(state, start, p);
8060 if (err != 0) {
8061 state->error = err;
8062 state->error_pos = (const char*) p;
8063 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_17;
8064 return s_error;
8065 }
8066 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_17;
8067 /* UNREACHABLE */;
8068 abort();
8069 }
8070 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
8071 const unsigned char* start;
8072 int err;
8073
8074 start = state->_span_pos0;
8075 state->_span_pos0 = NULL;
8076 err = llhttp__on_header_value(state, start, p);
8077 if (err != 0) {
8078 state->error = err;
8079 state->error_pos = (const char*) (p + 1);
8080 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
8081 return s_error;
8082 }
8083 p++;
8084 goto s_n_llhttp__internal__n_header_value_almost_done;
8085 /* UNREACHABLE */;
8086 abort();
8087 }
8088 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
8089 const unsigned char* start;
8090 int err;
8091
8092 start = state->_span_pos0;
8093 state->_span_pos0 = NULL;
8094 err = llhttp__on_header_value(state, start, p);
8095 if (err != 0) {
8096 state->error = err;
8097 state->error_pos = (const char*) p;
8098 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
8099 return s_error;
8100 }
8101 goto s_n_llhttp__internal__n_header_value_almost_done;
8102 /* UNREACHABLE */;
8103 abort();
8104 }
8105 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
8106 const unsigned char* start;
8107 int err;
8108
8109 start = state->_span_pos0;
8110 state->_span_pos0 = NULL;
8111 err = llhttp__on_header_value(state, start, p);
8112 if (err != 0) {
8113 state->error = err;
8114 state->error_pos = (const char*) (p + 1);
8115 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
8116 return s_error;
8117 }
8118 p++;
8119 goto s_n_llhttp__internal__n_header_value_almost_done;
8120 /* UNREACHABLE */;
8121 abort();
8122 }
8123 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
8124 const unsigned char* start;
8125 int err;
8126
8127 start = state->_span_pos0;
8128 state->_span_pos0 = NULL;
8129 err = llhttp__on_header_value(state, start, p);
8130 if (err != 0) {
8131 state->error = err;
8132 state->error_pos = (const char*) p;
8133 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_52;
8134 return s_error;
8135 }
8136 goto s_n_llhttp__internal__n_error_52;
8137 /* UNREACHABLE */;
8138 abort();
8139 }
8140 s_n_llhttp__internal__n_invoke_test_lenient_flags_18: {
8141 switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) {
8142 case 1:
8143 goto s_n_llhttp__internal__n_header_value_lenient;
8144 default:
8145 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
8146 }
8147 /* UNREACHABLE */;
8148 abort();
8149 }
8150 s_n_llhttp__internal__n_invoke_update_header_state_4: {
8151 switch (llhttp__internal__c_update_header_state(state, p, endp)) {
8152 default:
8153 goto s_n_llhttp__internal__n_header_value_connection;
8154 }
8155 /* UNREACHABLE */;
8156 abort();
8157 }
8158 s_n_llhttp__internal__n_invoke_or_flags_13: {
8159 switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
8160 default:
8161 goto s_n_llhttp__internal__n_invoke_update_header_state_4;
8162 }
8163 /* UNREACHABLE */;
8164 abort();
8165 }
8166 s_n_llhttp__internal__n_invoke_or_flags_14: {
8167 switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
8168 default:
8169 goto s_n_llhttp__internal__n_invoke_update_header_state_4;
8170 }
8171 /* UNREACHABLE */;
8172 abort();
8173 }
8174 s_n_llhttp__internal__n_invoke_or_flags_15: {
8175 switch (llhttp__internal__c_or_flags_7(state, p, endp)) {
8176 default:
8177 goto s_n_llhttp__internal__n_invoke_update_header_state_4;
8178 }
8179 /* UNREACHABLE */;
8180 abort();
8181 }
8182 s_n_llhttp__internal__n_invoke_or_flags_16: {
8183 switch (llhttp__internal__c_or_flags_8(state, p, endp)) {
8184 default:
8185 goto s_n_llhttp__internal__n_header_value_connection;
8186 }
8187 /* UNREACHABLE */;
8188 abort();
8189 }
8190 s_n_llhttp__internal__n_invoke_load_header_state_6: {
8191 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
8192 case 5:
8193 goto s_n_llhttp__internal__n_invoke_or_flags_13;
8194 case 6:
8195 goto s_n_llhttp__internal__n_invoke_or_flags_14;
8196 case 7:
8197 goto s_n_llhttp__internal__n_invoke_or_flags_15;
8198 case 8:
8199 goto s_n_llhttp__internal__n_invoke_or_flags_16;
8200 default:
8201 goto s_n_llhttp__internal__n_header_value_connection;
8202 }
8203 /* UNREACHABLE */;
8204 abort();
8205 }
8206 s_n_llhttp__internal__n_invoke_update_header_state_5: {
8207 switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
8208 default:
8209 goto s_n_llhttp__internal__n_header_value_connection_token;
8210 }
8211 /* UNREACHABLE */;
8212 abort();
8213 }
8214 s_n_llhttp__internal__n_invoke_update_header_state_3: {
8215 switch (llhttp__internal__c_update_header_state_3(state, p, endp)) {
8216 default:
8217 goto s_n_llhttp__internal__n_header_value_connection_ws;
8218 }
8219 /* UNREACHABLE */;
8220 abort();
8221 }
8222 s_n_llhttp__internal__n_invoke_update_header_state_6: {
8223 switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
8224 default:
8225 goto s_n_llhttp__internal__n_header_value_connection_ws;
8226 }
8227 /* UNREACHABLE */;
8228 abort();
8229 }
8230 s_n_llhttp__internal__n_invoke_update_header_state_7: {
8231 switch (llhttp__internal__c_update_header_state_7(state, p, endp)) {
8232 default:
8233 goto s_n_llhttp__internal__n_header_value_connection_ws;
8234 }
8235 /* UNREACHABLE */;
8236 abort();
8237 }
8238 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: {
8239 const unsigned char* start;
8240 int err;
8241
8242 start = state->_span_pos0;
8243 state->_span_pos0 = NULL;
8244 err = llhttp__on_header_value(state, start, p);
8245 if (err != 0) {
8246 state->error = err;
8247 state->error_pos = (const char*) p;
8248 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_54;
8249 return s_error;
8250 }
8251 goto s_n_llhttp__internal__n_error_54;
8252 /* UNREACHABLE */;
8253 abort();
8254 }
8255 s_n_llhttp__internal__n_invoke_mul_add_content_length_1: {
8256 switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) {
8257 case 1:
8258 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6;
8259 default:
8260 goto s_n_llhttp__internal__n_header_value_content_length;
8261 }
8262 /* UNREACHABLE */;
8263 abort();
8264 }
8265 s_n_llhttp__internal__n_invoke_or_flags_17: {
8266 switch (llhttp__internal__c_or_flags_17(state, p, endp)) {
8267 default:
8268 goto s_n_llhttp__internal__n_header_value_otherwise;
8269 }
8270 /* UNREACHABLE */;
8271 abort();
8272 }
8273 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: {
8274 const unsigned char* start;
8275 int err;
8276
8277 start = state->_span_pos0;
8278 state->_span_pos0 = NULL;
8279 err = llhttp__on_header_value(state, start, p);
8280 if (err != 0) {
8281 state->error = err;
8282 state->error_pos = (const char*) p;
8283 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_55;
8284 return s_error;
8285 }
8286 goto s_n_llhttp__internal__n_error_55;
8287 /* UNREACHABLE */;
8288 abort();
8289 }
8290 s_n_llhttp__internal__n_error_53: {
8291 state->error = 0x4;
8292 state->reason = "Duplicate Content-Length";
8293 state->error_pos = (const char*) p;
8294 state->_current = (void*) (intptr_t) s_error;
8295 return s_error;
8296 /* UNREACHABLE */;
8297 abort();
8298 }
8299 s_n_llhttp__internal__n_invoke_test_flags_2: {
8300 switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
8301 case 0:
8302 goto s_n_llhttp__internal__n_header_value_content_length;
8303 default:
8304 goto s_n_llhttp__internal__n_error_53;
8305 }
8306 /* UNREACHABLE */;
8307 abort();
8308 }
8309 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9: {
8310 const unsigned char* start;
8311 int err;
8312
8313 start = state->_span_pos0;
8314 state->_span_pos0 = NULL;
8315 err = llhttp__on_header_value(state, start, p);
8316 if (err != 0) {
8317 state->error = err;
8318 state->error_pos = (const char*) (p + 1);
8319 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_57;
8320 return s_error;
8321 }
8322 p++;
8323 goto s_n_llhttp__internal__n_error_57;
8324 /* UNREACHABLE */;
8325 abort();
8326 }
8327 s_n_llhttp__internal__n_invoke_update_header_state_8: {
8328 switch (llhttp__internal__c_update_header_state_8(state, p, endp)) {
8329 default:
8330 goto s_n_llhttp__internal__n_header_value_otherwise;
8331 }
8332 /* UNREACHABLE */;
8333 abort();
8334 }
8335 s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: {
8336 const unsigned char* start;
8337 int err;
8338
8339 start = state->_span_pos0;
8340 state->_span_pos0 = NULL;
8341 err = llhttp__on_header_value(state, start, p);
8342 if (err != 0) {
8343 state->error = err;
8344 state->error_pos = (const char*) (p + 1);
8345 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_56;
8346 return s_error;
8347 }
8348 p++;
8349 goto s_n_llhttp__internal__n_error_56;
8350 /* UNREACHABLE */;
8351 abort();
8352 }
8353 s_n_llhttp__internal__n_invoke_test_lenient_flags_19: {
8354 switch (llhttp__internal__c_test_lenient_flags_19(state, p, endp)) {
8355 case 0:
8356 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8;
8357 default:
8358 goto s_n_llhttp__internal__n_header_value_te_chunked;
8359 }
8360 /* UNREACHABLE */;
8361 abort();
8362 }
8363 s_n_llhttp__internal__n_invoke_load_type_1: {
8364 switch (llhttp__internal__c_load_type(state, p, endp)) {
8365 case 1:
8366 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_19;
8367 default:
8368 goto s_n_llhttp__internal__n_header_value_te_chunked;
8369 }
8370 /* UNREACHABLE */;
8371 abort();
8372 }
8373 s_n_llhttp__internal__n_invoke_update_header_state_9: {
8374 switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
8375 default:
8376 goto s_n_llhttp__internal__n_header_value;
8377 }
8378 /* UNREACHABLE */;
8379 abort();
8380 }
8381 s_n_llhttp__internal__n_invoke_and_flags: {
8382 switch (llhttp__internal__c_and_flags(state, p, endp)) {
8383 default:
8384 goto s_n_llhttp__internal__n_header_value_te_chunked;
8385 }
8386 /* UNREACHABLE */;
8387 abort();
8388 }
8389 s_n_llhttp__internal__n_invoke_or_flags_19: {
8390 switch (llhttp__internal__c_or_flags_18(state, p, endp)) {
8391 default:
8392 goto s_n_llhttp__internal__n_invoke_and_flags;
8393 }
8394 /* UNREACHABLE */;
8395 abort();
8396 }
8397 s_n_llhttp__internal__n_invoke_test_lenient_flags_20: {
8398 switch (llhttp__internal__c_test_lenient_flags_19(state, p, endp)) {
8399 case 0:
8400 goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9;
8401 default:
8402 goto s_n_llhttp__internal__n_invoke_or_flags_19;
8403 }
8404 /* UNREACHABLE */;
8405 abort();
8406 }
8407 s_n_llhttp__internal__n_invoke_load_type_2: {
8408 switch (llhttp__internal__c_load_type(state, p, endp)) {
8409 case 1:
8410 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_20;
8411 default:
8412 goto s_n_llhttp__internal__n_invoke_or_flags_19;
8413 }
8414 /* UNREACHABLE */;
8415 abort();
8416 }
8417 s_n_llhttp__internal__n_invoke_or_flags_18: {
8418 switch (llhttp__internal__c_or_flags_18(state, p, endp)) {
8419 default:
8420 goto s_n_llhttp__internal__n_invoke_and_flags;
8421 }
8422 /* UNREACHABLE */;
8423 abort();
8424 }
8425 s_n_llhttp__internal__n_invoke_test_flags_3: {
8426 switch (llhttp__internal__c_test_flags_3(state, p, endp)) {
8427 case 1:
8428 goto s_n_llhttp__internal__n_invoke_load_type_2;
8429 default:
8430 goto s_n_llhttp__internal__n_invoke_or_flags_18;
8431 }
8432 /* UNREACHABLE */;
8433 abort();
8434 }
8435 s_n_llhttp__internal__n_invoke_or_flags_20: {
8436 switch (llhttp__internal__c_or_flags_20(state, p, endp)) {
8437 default:
8438 goto s_n_llhttp__internal__n_invoke_update_header_state_9;
8439 }
8440 /* UNREACHABLE */;
8441 abort();
8442 }
8443 s_n_llhttp__internal__n_invoke_load_header_state_3: {
8444 switch (llhttp__internal__c_load_header_state(state, p, endp)) {
8445 case 1:
8446 goto s_n_llhttp__internal__n_header_value_connection;
8447 case 2:
8448 goto s_n_llhttp__internal__n_invoke_test_flags_2;
8449 case 3:
8450 goto s_n_llhttp__internal__n_invoke_test_flags_3;
8451 case 4:
8452 goto s_n_llhttp__internal__n_invoke_or_flags_20;
8453 default:
8454 goto s_n_llhttp__internal__n_header_value;
8455 }
8456 /* UNREACHABLE */;
8457 abort();
8458 }
8459 s_n_llhttp__internal__n_invoke_test_lenient_flags_21: {
8460 switch (llhttp__internal__c_test_lenient_flags_21(state, p, endp)) {
8461 case 0:
8462 goto s_n_llhttp__internal__n_error_58;
8463 default:
8464 goto s_n_llhttp__internal__n_header_value_discard_ws;
8465 }
8466 /* UNREACHABLE */;
8467 abort();
8468 }
8469 s_n_llhttp__internal__n_invoke_test_flags_4: {
8470 switch (llhttp__internal__c_test_flags_4(state, p, endp)) {
8471 case 1:
8472 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_21;
8473 default:
8474 goto s_n_llhttp__internal__n_header_value_discard_ws;
8475 }
8476 /* UNREACHABLE */;
8477 abort();
8478 }
8479 s_n_llhttp__internal__n_error_59: {
8480 state->error = 0xf;
8481 state->reason = "Transfer-Encoding can't be present with Content-Length";
8482 state->error_pos = (const char*) p;
8483 state->_current = (void*) (intptr_t) s_error;
8484 return s_error;
8485 /* UNREACHABLE */;
8486 abort();
8487 }
8488 s_n_llhttp__internal__n_invoke_test_lenient_flags_22: {
8489 switch (llhttp__internal__c_test_lenient_flags_21(state, p, endp)) {
8490 case 0:
8491 goto s_n_llhttp__internal__n_error_59;
8492 default:
8493 goto s_n_llhttp__internal__n_header_value_discard_ws;
8494 }
8495 /* UNREACHABLE */;
8496 abort();
8497 }
8498 s_n_llhttp__internal__n_invoke_test_flags_5: {
8499 switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
8500 case 1:
8501 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_22;
8502 default:
8503 goto s_n_llhttp__internal__n_header_value_discard_ws;
8504 }
8505 /* UNREACHABLE */;
8506 abort();
8507 }
8508 s_n_llhttp__internal__n_pause_19: {
8509 state->error = 0x15;
8510 state->reason = "on_header_field_complete pause";
8511 state->error_pos = (const char*) p;
8512 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_header_state;
8513 return s_error;
8514 /* UNREACHABLE */;
8515 abort();
8516 }
8517 s_n_llhttp__internal__n_error_44: {
8518 state->error = 0x1c;
8519 state->reason = "`on_header_field_complete` callback error";
8520 state->error_pos = (const char*) p;
8521 state->_current = (void*) (intptr_t) s_error;
8522 return s_error;
8523 /* UNREACHABLE */;
8524 abort();
8525 }
8526 s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: {
8527 const unsigned char* start;
8528 int err;
8529
8530 start = state->_span_pos0;
8531 state->_span_pos0 = NULL;
8532 err = llhttp__on_header_field(state, start, p);
8533 if (err != 0) {
8534 state->error = err;
8535 state->error_pos = (const char*) (p + 1);
8536 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete;
8537 return s_error;
8538 }
8539 p++;
8540 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete;
8541 /* UNREACHABLE */;
8542 abort();
8543 }
8544 s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2: {
8545 const unsigned char* start;
8546 int err;
8547
8548 start = state->_span_pos0;
8549 state->_span_pos0 = NULL;
8550 err = llhttp__on_header_field(state, start, p);
8551 if (err != 0) {
8552 state->error = err;
8553 state->error_pos = (const char*) (p + 1);
8554 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete;
8555 return s_error;
8556 }
8557 p++;
8558 goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete;
8559 /* UNREACHABLE */;
8560 abort();
8561 }
8562 s_n_llhttp__internal__n_error_60: {
8563 state->error = 0xa;
8564 state->reason = "Invalid header token";
8565 state->error_pos = (const char*) p;
8566 state->_current = (void*) (intptr_t) s_error;
8567 return s_error;
8568 /* UNREACHABLE */;
8569 abort();
8570 }
8571 s_n_llhttp__internal__n_invoke_update_header_state_10: {
8572 switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
8573 default:
8574 goto s_n_llhttp__internal__n_header_field_general;
8575 }
8576 /* UNREACHABLE */;
8577 abort();
8578 }
8579 s_n_llhttp__internal__n_invoke_store_header_state: {
8580 switch (llhttp__internal__c_store_header_state(state, p, endp, match)) {
8581 default:
8582 goto s_n_llhttp__internal__n_header_field_colon;
8583 }
8584 /* UNREACHABLE */;
8585 abort();
8586 }
8587 s_n_llhttp__internal__n_invoke_update_header_state_11: {
8588 switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
8589 default:
8590 goto s_n_llhttp__internal__n_header_field_general;
8591 }
8592 /* UNREACHABLE */;
8593 abort();
8594 }
8595 s_n_llhttp__internal__n_error_4: {
8596 state->error = 0x1e;
8597 state->reason = "Unexpected space after start line";
8598 state->error_pos = (const char*) p;
8599 state->_current = (void*) (intptr_t) s_error;
8600 return s_error;
8601 /* UNREACHABLE */;
8602 abort();
8603 }
8604 s_n_llhttp__internal__n_invoke_test_lenient_flags: {
8605 switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) {
8606 case 1:
8607 goto s_n_llhttp__internal__n_header_field_start;
8608 default:
8609 goto s_n_llhttp__internal__n_error_4;
8610 }
8611 /* UNREACHABLE */;
8612 abort();
8613 }
8614 s_n_llhttp__internal__n_pause_20: {
8615 state->error = 0x15;
8616 state->reason = "on_url_complete pause";
8617 state->error_pos = (const char*) p;
8618 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_headers_start;
8619 return s_error;
8620 /* UNREACHABLE */;
8621 abort();
8622 }
8623 s_n_llhttp__internal__n_error_3: {
8624 state->error = 0x1a;
8625 state->reason = "`on_url_complete` callback error";
8626 state->error_pos = (const char*) p;
8627 state->_current = (void*) (intptr_t) s_error;
8628 return s_error;
8629 /* UNREACHABLE */;
8630 abort();
8631 }
8632 s_n_llhttp__internal__n_invoke_llhttp__on_url_complete: {
8633 switch (llhttp__on_url_complete(state, p, endp)) {
8634 case 0:
8635 goto s_n_llhttp__internal__n_headers_start;
8636 case 21:
8637 goto s_n_llhttp__internal__n_pause_20;
8638 default:
8639 goto s_n_llhttp__internal__n_error_3;
8640 }
8641 /* UNREACHABLE */;
8642 abort();
8643 }
8644 s_n_llhttp__internal__n_invoke_update_http_minor: {
8645 switch (llhttp__internal__c_update_http_minor(state, p, endp)) {
8646 default:
8647 goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete;
8648 }
8649 /* UNREACHABLE */;
8650 abort();
8651 }
8652 s_n_llhttp__internal__n_invoke_update_http_major: {
8653 switch (llhttp__internal__c_update_http_major(state, p, endp)) {
8654 default:
8655 goto s_n_llhttp__internal__n_invoke_update_http_minor;
8656 }
8657 /* UNREACHABLE */;
8658 abort();
8659 }
8660 s_n_llhttp__internal__n_span_end_llhttp__on_url_3: {
8661 const unsigned char* start;
8662 int err;
8663
8664 start = state->_span_pos0;
8665 state->_span_pos0 = NULL;
8666 err = llhttp__on_url(state, start, p);
8667 if (err != 0) {
8668 state->error = err;
8669 state->error_pos = (const char*) p;
8670 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
8671 return s_error;
8672 }
8673 goto s_n_llhttp__internal__n_url_skip_to_http09;
8674 /* UNREACHABLE */;
8675 abort();
8676 }
8677 s_n_llhttp__internal__n_error_61: {
8678 state->error = 0x7;
8679 state->reason = "Expected CRLF";
8680 state->error_pos = (const char*) p;
8681 state->_current = (void*) (intptr_t) s_error;
8682 return s_error;
8683 /* UNREACHABLE */;
8684 abort();
8685 }
8686 s_n_llhttp__internal__n_span_end_llhttp__on_url_4: {
8687 const unsigned char* start;
8688 int err;
8689
8690 start = state->_span_pos0;
8691 state->_span_pos0 = NULL;
8692 err = llhttp__on_url(state, start, p);
8693 if (err != 0) {
8694 state->error = err;
8695 state->error_pos = (const char*) p;
8696 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
8697 return s_error;
8698 }
8699 goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
8700 /* UNREACHABLE */;
8701 abort();
8702 }
8703 s_n_llhttp__internal__n_error_69: {
8704 state->error = 0x17;
8705 state->reason = "Pause on PRI/Upgrade";
8706 state->error_pos = (const char*) p;
8707 state->_current = (void*) (intptr_t) s_error;
8708 return s_error;
8709 /* UNREACHABLE */;
8710 abort();
8711 }
8712 s_n_llhttp__internal__n_error_70: {
8713 state->error = 0x9;
8714 state->reason = "Expected HTTP/2 Connection Preface";
8715 state->error_pos = (const char*) p;
8716 state->_current = (void*) (intptr_t) s_error;
8717 return s_error;
8718 /* UNREACHABLE */;
8719 abort();
8720 }
8721 s_n_llhttp__internal__n_error_67: {
8722 state->error = 0x2;
8723 state->reason = "Expected CRLF after version";
8724 state->error_pos = (const char*) p;
8725 state->_current = (void*) (intptr_t) s_error;
8726 return s_error;
8727 /* UNREACHABLE */;
8728 abort();
8729 }
8730 s_n_llhttp__internal__n_invoke_test_lenient_flags_25: {
8731 switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) {
8732 case 1:
8733 goto s_n_llhttp__internal__n_headers_start;
8734 default:
8735 goto s_n_llhttp__internal__n_error_67;
8736 }
8737 /* UNREACHABLE */;
8738 abort();
8739 }
8740 s_n_llhttp__internal__n_error_66: {
8741 state->error = 0x9;
8742 state->reason = "Expected CRLF after version";
8743 state->error_pos = (const char*) p;
8744 state->_current = (void*) (intptr_t) s_error;
8745 return s_error;
8746 /* UNREACHABLE */;
8747 abort();
8748 }
8749 s_n_llhttp__internal__n_invoke_test_lenient_flags_24: {
8750 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
8751 case 1:
8752 goto s_n_llhttp__internal__n_req_http_complete_crlf;
8753 default:
8754 goto s_n_llhttp__internal__n_error_66;
8755 }
8756 /* UNREACHABLE */;
8757 abort();
8758 }
8759 s_n_llhttp__internal__n_error_68: {
8760 state->error = 0x9;
8761 state->reason = "Expected CRLF after version";
8762 state->error_pos = (const char*) p;
8763 state->_current = (void*) (intptr_t) s_error;
8764 return s_error;
8765 /* UNREACHABLE */;
8766 abort();
8767 }
8768 s_n_llhttp__internal__n_pause_21: {
8769 state->error = 0x15;
8770 state->reason = "on_version_complete pause";
8771 state->error_pos = (const char*) p;
8772 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_method_1;
8773 return s_error;
8774 /* UNREACHABLE */;
8775 abort();
8776 }
8777 s_n_llhttp__internal__n_error_65: {
8778 state->error = 0x21;
8779 state->reason = "`on_version_complete` callback error";
8780 state->error_pos = (const char*) p;
8781 state->_current = (void*) (intptr_t) s_error;
8782 return s_error;
8783 /* UNREACHABLE */;
8784 abort();
8785 }
8786 s_n_llhttp__internal__n_span_end_llhttp__on_version_1: {
8787 const unsigned char* start;
8788 int err;
8789
8790 start = state->_span_pos0;
8791 state->_span_pos0 = NULL;
8792 err = llhttp__on_version(state, start, p);
8793 if (err != 0) {
8794 state->error = err;
8795 state->error_pos = (const char*) p;
8796 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_version_complete;
8797 return s_error;
8798 }
8799 goto s_n_llhttp__internal__n_invoke_llhttp__on_version_complete;
8800 /* UNREACHABLE */;
8801 abort();
8802 }
8803 s_n_llhttp__internal__n_span_end_llhttp__on_version: {
8804 const unsigned char* start;
8805 int err;
8806
8807 start = state->_span_pos0;
8808 state->_span_pos0 = NULL;
8809 err = llhttp__on_version(state, start, p);
8810 if (err != 0) {
8811 state->error = err;
8812 state->error_pos = (const char*) p;
8813 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_64;
8814 return s_error;
8815 }
8816 goto s_n_llhttp__internal__n_error_64;
8817 /* UNREACHABLE */;
8818 abort();
8819 }
8820 s_n_llhttp__internal__n_invoke_load_http_minor: {
8821 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
8822 case 9:
8823 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1;
8824 default:
8825 goto s_n_llhttp__internal__n_span_end_llhttp__on_version;
8826 }
8827 /* UNREACHABLE */;
8828 abort();
8829 }
8830 s_n_llhttp__internal__n_invoke_load_http_minor_1: {
8831 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
8832 case 0:
8833 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1;
8834 case 1:
8835 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1;
8836 default:
8837 goto s_n_llhttp__internal__n_span_end_llhttp__on_version;
8838 }
8839 /* UNREACHABLE */;
8840 abort();
8841 }
8842 s_n_llhttp__internal__n_invoke_load_http_minor_2: {
8843 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
8844 case 0:
8845 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1;
8846 default:
8847 goto s_n_llhttp__internal__n_span_end_llhttp__on_version;
8848 }
8849 /* UNREACHABLE */;
8850 abort();
8851 }
8852 s_n_llhttp__internal__n_invoke_load_http_major: {
8853 switch (llhttp__internal__c_load_http_major(state, p, endp)) {
8854 case 0:
8855 goto s_n_llhttp__internal__n_invoke_load_http_minor;
8856 case 1:
8857 goto s_n_llhttp__internal__n_invoke_load_http_minor_1;
8858 case 2:
8859 goto s_n_llhttp__internal__n_invoke_load_http_minor_2;
8860 default:
8861 goto s_n_llhttp__internal__n_span_end_llhttp__on_version;
8862 }
8863 /* UNREACHABLE */;
8864 abort();
8865 }
8866 s_n_llhttp__internal__n_invoke_test_lenient_flags_23: {
8867 switch (llhttp__internal__c_test_lenient_flags_23(state, p, endp)) {
8868 case 1:
8869 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1;
8870 default:
8871 goto s_n_llhttp__internal__n_invoke_load_http_major;
8872 }
8873 /* UNREACHABLE */;
8874 abort();
8875 }
8876 s_n_llhttp__internal__n_invoke_store_http_minor: {
8877 switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) {
8878 default:
8879 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_23;
8880 }
8881 /* UNREACHABLE */;
8882 abort();
8883 }
8884 s_n_llhttp__internal__n_span_end_llhttp__on_version_2: {
8885 const unsigned char* start;
8886 int err;
8887
8888 start = state->_span_pos0;
8889 state->_span_pos0 = NULL;
8890 err = llhttp__on_version(state, start, p);
8891 if (err != 0) {
8892 state->error = err;
8893 state->error_pos = (const char*) p;
8894 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_71;
8895 return s_error;
8896 }
8897 goto s_n_llhttp__internal__n_error_71;
8898 /* UNREACHABLE */;
8899 abort();
8900 }
8901 s_n_llhttp__internal__n_span_end_llhttp__on_version_3: {
8902 const unsigned char* start;
8903 int err;
8904
8905 start = state->_span_pos0;
8906 state->_span_pos0 = NULL;
8907 err = llhttp__on_version(state, start, p);
8908 if (err != 0) {
8909 state->error = err;
8910 state->error_pos = (const char*) p;
8911 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_72;
8912 return s_error;
8913 }
8914 goto s_n_llhttp__internal__n_error_72;
8915 /* UNREACHABLE */;
8916 abort();
8917 }
8918 s_n_llhttp__internal__n_invoke_store_http_major: {
8919 switch (llhttp__internal__c_store_http_major(state, p, endp, match)) {
8920 default:
8921 goto s_n_llhttp__internal__n_req_http_dot;
8922 }
8923 /* UNREACHABLE */;
8924 abort();
8925 }
8926 s_n_llhttp__internal__n_span_end_llhttp__on_version_4: {
8927 const unsigned char* start;
8928 int err;
8929
8930 start = state->_span_pos0;
8931 state->_span_pos0 = NULL;
8932 err = llhttp__on_version(state, start, p);
8933 if (err != 0) {
8934 state->error = err;
8935 state->error_pos = (const char*) p;
8936 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_73;
8937 return s_error;
8938 }
8939 goto s_n_llhttp__internal__n_error_73;
8940 /* UNREACHABLE */;
8941 abort();
8942 }
8943 s_n_llhttp__internal__n_error_63: {
8944 state->error = 0x8;
8945 state->reason = "Invalid method for HTTP/x.x request";
8946 state->error_pos = (const char*) p;
8947 state->_current = (void*) (intptr_t) s_error;
8948 return s_error;
8949 /* UNREACHABLE */;
8950 abort();
8951 }
8952 s_n_llhttp__internal__n_invoke_load_method: {
8953 switch (llhttp__internal__c_load_method(state, p, endp)) {
8954 case 0:
8955 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8956 case 1:
8957 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8958 case 2:
8959 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8960 case 3:
8961 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8962 case 4:
8963 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8964 case 5:
8965 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8966 case 6:
8967 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8968 case 7:
8969 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8970 case 8:
8971 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8972 case 9:
8973 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8974 case 10:
8975 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8976 case 11:
8977 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8978 case 12:
8979 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8980 case 13:
8981 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8982 case 14:
8983 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8984 case 15:
8985 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8986 case 16:
8987 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8988 case 17:
8989 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8990 case 18:
8991 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8992 case 19:
8993 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8994 case 20:
8995 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8996 case 21:
8997 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
8998 case 22:
8999 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9000 case 23:
9001 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9002 case 24:
9003 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9004 case 25:
9005 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9006 case 26:
9007 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9008 case 27:
9009 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9010 case 28:
9011 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9012 case 29:
9013 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9014 case 30:
9015 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9016 case 31:
9017 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9018 case 32:
9019 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9020 case 33:
9021 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9022 case 34:
9023 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9024 default:
9025 goto s_n_llhttp__internal__n_error_63;
9026 }
9027 /* UNREACHABLE */;
9028 abort();
9029 }
9030 s_n_llhttp__internal__n_error_76: {
9031 state->error = 0x8;
9032 state->reason = "Expected HTTP/";
9033 state->error_pos = (const char*) p;
9034 state->_current = (void*) (intptr_t) s_error;
9035 return s_error;
9036 /* UNREACHABLE */;
9037 abort();
9038 }
9039 s_n_llhttp__internal__n_error_74: {
9040 state->error = 0x8;
9041 state->reason = "Expected SOURCE method for ICE/x.x request";
9042 state->error_pos = (const char*) p;
9043 state->_current = (void*) (intptr_t) s_error;
9044 return s_error;
9045 /* UNREACHABLE */;
9046 abort();
9047 }
9048 s_n_llhttp__internal__n_invoke_load_method_2: {
9049 switch (llhttp__internal__c_load_method(state, p, endp)) {
9050 case 33:
9051 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9052 default:
9053 goto s_n_llhttp__internal__n_error_74;
9054 }
9055 /* UNREACHABLE */;
9056 abort();
9057 }
9058 s_n_llhttp__internal__n_error_75: {
9059 state->error = 0x8;
9060 state->reason = "Invalid method for RTSP/x.x request";
9061 state->error_pos = (const char*) p;
9062 state->_current = (void*) (intptr_t) s_error;
9063 return s_error;
9064 /* UNREACHABLE */;
9065 abort();
9066 }
9067 s_n_llhttp__internal__n_invoke_load_method_3: {
9068 switch (llhttp__internal__c_load_method(state, p, endp)) {
9069 case 1:
9070 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9071 case 3:
9072 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9073 case 6:
9074 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9075 case 35:
9076 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9077 case 36:
9078 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9079 case 37:
9080 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9081 case 38:
9082 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9083 case 39:
9084 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9085 case 40:
9086 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9087 case 41:
9088 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9089 case 42:
9090 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9091 case 43:
9092 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9093 case 44:
9094 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9095 case 45:
9096 goto s_n_llhttp__internal__n_span_start_llhttp__on_version;
9097 default:
9098 goto s_n_llhttp__internal__n_error_75;
9099 }
9100 /* UNREACHABLE */;
9101 abort();
9102 }
9103 s_n_llhttp__internal__n_pause_22: {
9104 state->error = 0x15;
9105 state->reason = "on_url_complete pause";
9106 state->error_pos = (const char*) p;
9107 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_http_start;
9108 return s_error;
9109 /* UNREACHABLE */;
9110 abort();
9111 }
9112 s_n_llhttp__internal__n_error_62: {
9113 state->error = 0x1a;
9114 state->reason = "`on_url_complete` callback error";
9115 state->error_pos = (const char*) p;
9116 state->_current = (void*) (intptr_t) s_error;
9117 return s_error;
9118 /* UNREACHABLE */;
9119 abort();
9120 }
9121 s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1: {
9122 switch (llhttp__on_url_complete(state, p, endp)) {
9123 case 0:
9124 goto s_n_llhttp__internal__n_req_http_start;
9125 case 21:
9126 goto s_n_llhttp__internal__n_pause_22;
9127 default:
9128 goto s_n_llhttp__internal__n_error_62;
9129 }
9130 /* UNREACHABLE */;
9131 abort();
9132 }
9133 s_n_llhttp__internal__n_span_end_llhttp__on_url_5: {
9134 const unsigned char* start;
9135 int err;
9136
9137 start = state->_span_pos0;
9138 state->_span_pos0 = NULL;
9139 err = llhttp__on_url(state, start, p);
9140 if (err != 0) {
9141 state->error = err;
9142 state->error_pos = (const char*) p;
9143 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
9144 return s_error;
9145 }
9146 goto s_n_llhttp__internal__n_url_skip_to_http;
9147 /* UNREACHABLE */;
9148 abort();
9149 }
9150 s_n_llhttp__internal__n_span_end_llhttp__on_url_6: {
9151 const unsigned char* start;
9152 int err;
9153
9154 start = state->_span_pos0;
9155 state->_span_pos0 = NULL;
9156 err = llhttp__on_url(state, start, p);
9157 if (err != 0) {
9158 state->error = err;
9159 state->error_pos = (const char*) p;
9160 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
9161 return s_error;
9162 }
9163 goto s_n_llhttp__internal__n_url_skip_to_http09;
9164 /* UNREACHABLE */;
9165 abort();
9166 }
9167 s_n_llhttp__internal__n_span_end_llhttp__on_url_7: {
9168 const unsigned char* start;
9169 int err;
9170
9171 start = state->_span_pos0;
9172 state->_span_pos0 = NULL;
9173 err = llhttp__on_url(state, start, p);
9174 if (err != 0) {
9175 state->error = err;
9176 state->error_pos = (const char*) p;
9177 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
9178 return s_error;
9179 }
9180 goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
9181 /* UNREACHABLE */;
9182 abort();
9183 }
9184 s_n_llhttp__internal__n_span_end_llhttp__on_url_8: {
9185 const unsigned char* start;
9186 int err;
9187
9188 start = state->_span_pos0;
9189 state->_span_pos0 = NULL;
9190 err = llhttp__on_url(state, start, p);
9191 if (err != 0) {
9192 state->error = err;
9193 state->error_pos = (const char*) p;
9194 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
9195 return s_error;
9196 }
9197 goto s_n_llhttp__internal__n_url_skip_to_http;
9198 /* UNREACHABLE */;
9199 abort();
9200 }
9201 s_n_llhttp__internal__n_error_77: {
9202 state->error = 0x7;
9203 state->reason = "Invalid char in url fragment start";
9204 state->error_pos = (const char*) p;
9205 state->_current = (void*) (intptr_t) s_error;
9206 return s_error;
9207 /* UNREACHABLE */;
9208 abort();
9209 }
9210 s_n_llhttp__internal__n_span_end_llhttp__on_url_9: {
9211 const unsigned char* start;
9212 int err;
9213
9214 start = state->_span_pos0;
9215 state->_span_pos0 = NULL;
9216 err = llhttp__on_url(state, start, p);
9217 if (err != 0) {
9218 state->error = err;
9219 state->error_pos = (const char*) p;
9220 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
9221 return s_error;
9222 }
9223 goto s_n_llhttp__internal__n_url_skip_to_http09;
9224 /* UNREACHABLE */;
9225 abort();
9226 }
9227 s_n_llhttp__internal__n_span_end_llhttp__on_url_10: {
9228 const unsigned char* start;
9229 int err;
9230
9231 start = state->_span_pos0;
9232 state->_span_pos0 = NULL;
9233 err = llhttp__on_url(state, start, p);
9234 if (err != 0) {
9235 state->error = err;
9236 state->error_pos = (const char*) p;
9237 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
9238 return s_error;
9239 }
9240 goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
9241 /* UNREACHABLE */;
9242 abort();
9243 }
9244 s_n_llhttp__internal__n_span_end_llhttp__on_url_11: {
9245 const unsigned char* start;
9246 int err;
9247
9248 start = state->_span_pos0;
9249 state->_span_pos0 = NULL;
9250 err = llhttp__on_url(state, start, p);
9251 if (err != 0) {
9252 state->error = err;
9253 state->error_pos = (const char*) p;
9254 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
9255 return s_error;
9256 }
9257 goto s_n_llhttp__internal__n_url_skip_to_http;
9258 /* UNREACHABLE */;
9259 abort();
9260 }
9261 s_n_llhttp__internal__n_error_78: {
9262 state->error = 0x7;
9263 state->reason = "Invalid char in url query";
9264 state->error_pos = (const char*) p;
9265 state->_current = (void*) (intptr_t) s_error;
9266 return s_error;
9267 /* UNREACHABLE */;
9268 abort();
9269 }
9270 s_n_llhttp__internal__n_error_79: {
9271 state->error = 0x7;
9272 state->reason = "Invalid char in url path";
9273 state->error_pos = (const char*) p;
9274 state->_current = (void*) (intptr_t) s_error;
9275 return s_error;
9276 /* UNREACHABLE */;
9277 abort();
9278 }
9279 s_n_llhttp__internal__n_span_end_llhttp__on_url: {
9280 const unsigned char* start;
9281 int err;
9282
9283 start = state->_span_pos0;
9284 state->_span_pos0 = NULL;
9285 err = llhttp__on_url(state, start, p);
9286 if (err != 0) {
9287 state->error = err;
9288 state->error_pos = (const char*) p;
9289 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
9290 return s_error;
9291 }
9292 goto s_n_llhttp__internal__n_url_skip_to_http09;
9293 /* UNREACHABLE */;
9294 abort();
9295 }
9296 s_n_llhttp__internal__n_span_end_llhttp__on_url_1: {
9297 const unsigned char* start;
9298 int err;
9299
9300 start = state->_span_pos0;
9301 state->_span_pos0 = NULL;
9302 err = llhttp__on_url(state, start, p);
9303 if (err != 0) {
9304 state->error = err;
9305 state->error_pos = (const char*) p;
9306 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
9307 return s_error;
9308 }
9309 goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
9310 /* UNREACHABLE */;
9311 abort();
9312 }
9313 s_n_llhttp__internal__n_span_end_llhttp__on_url_2: {
9314 const unsigned char* start;
9315 int err;
9316
9317 start = state->_span_pos0;
9318 state->_span_pos0 = NULL;
9319 err = llhttp__on_url(state, start, p);
9320 if (err != 0) {
9321 state->error = err;
9322 state->error_pos = (const char*) p;
9323 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
9324 return s_error;
9325 }
9326 goto s_n_llhttp__internal__n_url_skip_to_http;
9327 /* UNREACHABLE */;
9328 abort();
9329 }
9330 s_n_llhttp__internal__n_span_end_llhttp__on_url_12: {
9331 const unsigned char* start;
9332 int err;
9333
9334 start = state->_span_pos0;
9335 state->_span_pos0 = NULL;
9336 err = llhttp__on_url(state, start, p);
9337 if (err != 0) {
9338 state->error = err;
9339 state->error_pos = (const char*) p;
9340 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
9341 return s_error;
9342 }
9343 goto s_n_llhttp__internal__n_url_skip_to_http09;
9344 /* UNREACHABLE */;
9345 abort();
9346 }
9347 s_n_llhttp__internal__n_span_end_llhttp__on_url_13: {
9348 const unsigned char* start;
9349 int err;
9350
9351 start = state->_span_pos0;
9352 state->_span_pos0 = NULL;
9353 err = llhttp__on_url(state, start, p);
9354 if (err != 0) {
9355 state->error = err;
9356 state->error_pos = (const char*) p;
9357 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
9358 return s_error;
9359 }
9360 goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
9361 /* UNREACHABLE */;
9362 abort();
9363 }
9364 s_n_llhttp__internal__n_span_end_llhttp__on_url_14: {
9365 const unsigned char* start;
9366 int err;
9367
9368 start = state->_span_pos0;
9369 state->_span_pos0 = NULL;
9370 err = llhttp__on_url(state, start, p);
9371 if (err != 0) {
9372 state->error = err;
9373 state->error_pos = (const char*) p;
9374 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
9375 return s_error;
9376 }
9377 goto s_n_llhttp__internal__n_url_skip_to_http;
9378 /* UNREACHABLE */;
9379 abort();
9380 }
9381 s_n_llhttp__internal__n_error_80: {
9382 state->error = 0x7;
9383 state->reason = "Double @ in url";
9384 state->error_pos = (const char*) p;
9385 state->_current = (void*) (intptr_t) s_error;
9386 return s_error;
9387 /* UNREACHABLE */;
9388 abort();
9389 }
9390 s_n_llhttp__internal__n_error_81: {
9391 state->error = 0x7;
9392 state->reason = "Unexpected char in url server";
9393 state->error_pos = (const char*) p;
9394 state->_current = (void*) (intptr_t) s_error;
9395 return s_error;
9396 /* UNREACHABLE */;
9397 abort();
9398 }
9399 s_n_llhttp__internal__n_error_82: {
9400 state->error = 0x7;
9401 state->reason = "Unexpected char in url server";
9402 state->error_pos = (const char*) p;
9403 state->_current = (void*) (intptr_t) s_error;
9404 return s_error;
9405 /* UNREACHABLE */;
9406 abort();
9407 }
9408 s_n_llhttp__internal__n_error_83: {
9409 state->error = 0x7;
9410 state->reason = "Unexpected char in url schema";
9411 state->error_pos = (const char*) p;
9412 state->_current = (void*) (intptr_t) s_error;
9413 return s_error;
9414 /* UNREACHABLE */;
9415 abort();
9416 }
9417 s_n_llhttp__internal__n_error_84: {
9418 state->error = 0x7;
9419 state->reason = "Unexpected char in url schema";
9420 state->error_pos = (const char*) p;
9421 state->_current = (void*) (intptr_t) s_error;
9422 return s_error;
9423 /* UNREACHABLE */;
9424 abort();
9425 }
9426 s_n_llhttp__internal__n_error_85: {
9427 state->error = 0x7;
9428 state->reason = "Unexpected start char in url";
9429 state->error_pos = (const char*) p;
9430 state->_current = (void*) (intptr_t) s_error;
9431 return s_error;
9432 /* UNREACHABLE */;
9433 abort();
9434 }
9435 s_n_llhttp__internal__n_invoke_is_equal_method: {
9436 switch (llhttp__internal__c_is_equal_method(state, p, endp)) {
9437 case 0:
9438 goto s_n_llhttp__internal__n_url_entry_normal;
9439 default:
9440 goto s_n_llhttp__internal__n_url_entry_connect;
9441 }
9442 /* UNREACHABLE */;
9443 abort();
9444 }
9445 s_n_llhttp__internal__n_error_86: {
9446 state->error = 0x6;
9447 state->reason = "Expected space after method";
9448 state->error_pos = (const char*) p;
9449 state->_current = (void*) (intptr_t) s_error;
9450 return s_error;
9451 /* UNREACHABLE */;
9452 abort();
9453 }
9454 s_n_llhttp__internal__n_pause_26: {
9455 state->error = 0x15;
9456 state->reason = "on_method_complete pause";
9457 state->error_pos = (const char*) p;
9458 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_first_space_before_url;
9459 return s_error;
9460 /* UNREACHABLE */;
9461 abort();
9462 }
9463 s_n_llhttp__internal__n_error_105: {
9464 state->error = 0x20;
9465 state->reason = "`on_method_complete` callback error";
9466 state->error_pos = (const char*) p;
9467 state->_current = (void*) (intptr_t) s_error;
9468 return s_error;
9469 /* UNREACHABLE */;
9470 abort();
9471 }
9472 s_n_llhttp__internal__n_span_end_llhttp__on_method_2: {
9473 const unsigned char* start;
9474 int err;
9475
9476 start = state->_span_pos0;
9477 state->_span_pos0 = NULL;
9478 err = llhttp__on_method(state, start, p);
9479 if (err != 0) {
9480 state->error = err;
9481 state->error_pos = (const char*) p;
9482 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1;
9483 return s_error;
9484 }
9485 goto s_n_llhttp__internal__n_invoke_llhttp__on_method_complete_1;
9486 /* UNREACHABLE */;
9487 abort();
9488 }
9489 s_n_llhttp__internal__n_invoke_store_method_1: {
9490 switch (llhttp__internal__c_store_method(state, p, endp, match)) {
9491 default:
9492 goto s_n_llhttp__internal__n_span_end_llhttp__on_method_2;
9493 }
9494 /* UNREACHABLE */;
9495 abort();
9496 }
9497 s_n_llhttp__internal__n_error_106: {
9498 state->error = 0x6;
9499 state->reason = "Invalid method encountered";
9500 state->error_pos = (const char*) p;
9501 state->_current = (void*) (intptr_t) s_error;
9502 return s_error;
9503 /* UNREACHABLE */;
9504 abort();
9505 }
9506 s_n_llhttp__internal__n_error_98: {
9507 state->error = 0xd;
9508 state->reason = "Invalid status code";
9509 state->error_pos = (const char*) p;
9510 state->_current = (void*) (intptr_t) s_error;
9511 return s_error;
9512 /* UNREACHABLE */;
9513 abort();
9514 }
9515 s_n_llhttp__internal__n_error_96: {
9516 state->error = 0xd;
9517 state->reason = "Invalid status code";
9518 state->error_pos = (const char*) p;
9519 state->_current = (void*) (intptr_t) s_error;
9520 return s_error;
9521 /* UNREACHABLE */;
9522 abort();
9523 }
9524 s_n_llhttp__internal__n_error_94: {
9525 state->error = 0xd;
9526 state->reason = "Invalid status code";
9527 state->error_pos = (const char*) p;
9528 state->_current = (void*) (intptr_t) s_error;
9529 return s_error;
9530 /* UNREACHABLE */;
9531 abort();
9532 }
9533 s_n_llhttp__internal__n_pause_24: {
9534 state->error = 0x15;
9535 state->reason = "on_status_complete pause";
9536 state->error_pos = (const char*) p;
9537 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_headers_start;
9538 return s_error;
9539 /* UNREACHABLE */;
9540 abort();
9541 }
9542 s_n_llhttp__internal__n_error_90: {
9543 state->error = 0x1b;
9544 state->reason = "`on_status_complete` callback error";
9545 state->error_pos = (const char*) p;
9546 state->_current = (void*) (intptr_t) s_error;
9547 return s_error;
9548 /* UNREACHABLE */;
9549 abort();
9550 }
9551 s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: {
9552 switch (llhttp__on_status_complete(state, p, endp)) {
9553 case 0:
9554 goto s_n_llhttp__internal__n_headers_start;
9555 case 21:
9556 goto s_n_llhttp__internal__n_pause_24;
9557 default:
9558 goto s_n_llhttp__internal__n_error_90;
9559 }
9560 /* UNREACHABLE */;
9561 abort();
9562 }
9563 s_n_llhttp__internal__n_error_89: {
9564 state->error = 0xd;
9565 state->reason = "Invalid response status";
9566 state->error_pos = (const char*) p;
9567 state->_current = (void*) (intptr_t) s_error;
9568 return s_error;
9569 /* UNREACHABLE */;
9570 abort();
9571 }
9572 s_n_llhttp__internal__n_invoke_test_lenient_flags_27: {
9573 switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) {
9574 case 1:
9575 goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete;
9576 default:
9577 goto s_n_llhttp__internal__n_error_89;
9578 }
9579 /* UNREACHABLE */;
9580 abort();
9581 }
9582 s_n_llhttp__internal__n_error_91: {
9583 state->error = 0x2;
9584 state->reason = "Expected LF after CR";
9585 state->error_pos = (const char*) p;
9586 state->_current = (void*) (intptr_t) s_error;
9587 return s_error;
9588 /* UNREACHABLE */;
9589 abort();
9590 }
9591 s_n_llhttp__internal__n_invoke_test_lenient_flags_28: {
9592 switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) {
9593 case 1:
9594 goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete;
9595 default:
9596 goto s_n_llhttp__internal__n_error_91;
9597 }
9598 /* UNREACHABLE */;
9599 abort();
9600 }
9601 s_n_llhttp__internal__n_error_92: {
9602 state->error = 0x19;
9603 state->reason = "Missing expected CR after response line";
9604 state->error_pos = (const char*) p;
9605 state->_current = (void*) (intptr_t) s_error;
9606 return s_error;
9607 /* UNREACHABLE */;
9608 abort();
9609 }
9610 s_n_llhttp__internal__n_span_end_llhttp__on_status: {
9611 const unsigned char* start;
9612 int err;
9613
9614 start = state->_span_pos0;
9615 state->_span_pos0 = NULL;
9616 err = llhttp__on_status(state, start, p);
9617 if (err != 0) {
9618 state->error = err;
9619 state->error_pos = (const char*) (p + 1);
9620 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_29;
9621 return s_error;
9622 }
9623 p++;
9624 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_29;
9625 /* UNREACHABLE */;
9626 abort();
9627 }
9628 s_n_llhttp__internal__n_span_end_llhttp__on_status_1: {
9629 const unsigned char* start;
9630 int err;
9631
9632 start = state->_span_pos0;
9633 state->_span_pos0 = NULL;
9634 err = llhttp__on_status(state, start, p);
9635 if (err != 0) {
9636 state->error = err;
9637 state->error_pos = (const char*) (p + 1);
9638 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_res_line_almost_done;
9639 return s_error;
9640 }
9641 p++;
9642 goto s_n_llhttp__internal__n_res_line_almost_done;
9643 /* UNREACHABLE */;
9644 abort();
9645 }
9646 s_n_llhttp__internal__n_error_93: {
9647 state->error = 0xd;
9648 state->reason = "Invalid response status";
9649 state->error_pos = (const char*) p;
9650 state->_current = (void*) (intptr_t) s_error;
9651 return s_error;
9652 /* UNREACHABLE */;
9653 abort();
9654 }
9655 s_n_llhttp__internal__n_invoke_mul_add_status_code_2: {
9656 switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
9657 case 1:
9658 goto s_n_llhttp__internal__n_error_94;
9659 default:
9660 goto s_n_llhttp__internal__n_res_status_code_otherwise;
9661 }
9662 /* UNREACHABLE */;
9663 abort();
9664 }
9665 s_n_llhttp__internal__n_error_95: {
9666 state->error = 0xd;
9667 state->reason = "Invalid status code";
9668 state->error_pos = (const char*) p;
9669 state->_current = (void*) (intptr_t) s_error;
9670 return s_error;
9671 /* UNREACHABLE */;
9672 abort();
9673 }
9674 s_n_llhttp__internal__n_invoke_mul_add_status_code_1: {
9675 switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
9676 case 1:
9677 goto s_n_llhttp__internal__n_error_96;
9678 default:
9679 goto s_n_llhttp__internal__n_res_status_code_digit_3;
9680 }
9681 /* UNREACHABLE */;
9682 abort();
9683 }
9684 s_n_llhttp__internal__n_error_97: {
9685 state->error = 0xd;
9686 state->reason = "Invalid status code";
9687 state->error_pos = (const char*) p;
9688 state->_current = (void*) (intptr_t) s_error;
9689 return s_error;
9690 /* UNREACHABLE */;
9691 abort();
9692 }
9693 s_n_llhttp__internal__n_invoke_mul_add_status_code: {
9694 switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
9695 case 1:
9696 goto s_n_llhttp__internal__n_error_98;
9697 default:
9698 goto s_n_llhttp__internal__n_res_status_code_digit_2;
9699 }
9700 /* UNREACHABLE */;
9701 abort();
9702 }
9703 s_n_llhttp__internal__n_error_99: {
9704 state->error = 0xd;
9705 state->reason = "Invalid status code";
9706 state->error_pos = (const char*) p;
9707 state->_current = (void*) (intptr_t) s_error;
9708 return s_error;
9709 /* UNREACHABLE */;
9710 abort();
9711 }
9712 s_n_llhttp__internal__n_invoke_update_status_code: {
9713 switch (llhttp__internal__c_update_status_code(state, p, endp)) {
9714 default:
9715 goto s_n_llhttp__internal__n_res_status_code_digit_1;
9716 }
9717 /* UNREACHABLE */;
9718 abort();
9719 }
9720 s_n_llhttp__internal__n_error_100: {
9721 state->error = 0x9;
9722 state->reason = "Expected space after version";
9723 state->error_pos = (const char*) p;
9724 state->_current = (void*) (intptr_t) s_error;
9725 return s_error;
9726 /* UNREACHABLE */;
9727 abort();
9728 }
9729 s_n_llhttp__internal__n_pause_25: {
9730 state->error = 0x15;
9731 state->reason = "on_version_complete pause";
9732 state->error_pos = (const char*) p;
9733 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_res_after_version;
9734 return s_error;
9735 /* UNREACHABLE */;
9736 abort();
9737 }
9738 s_n_llhttp__internal__n_error_88: {
9739 state->error = 0x21;
9740 state->reason = "`on_version_complete` callback error";
9741 state->error_pos = (const char*) p;
9742 state->_current = (void*) (intptr_t) s_error;
9743 return s_error;
9744 /* UNREACHABLE */;
9745 abort();
9746 }
9747 s_n_llhttp__internal__n_span_end_llhttp__on_version_6: {
9748 const unsigned char* start;
9749 int err;
9750
9751 start = state->_span_pos0;
9752 state->_span_pos0 = NULL;
9753 err = llhttp__on_version(state, start, p);
9754 if (err != 0) {
9755 state->error = err;
9756 state->error_pos = (const char*) p;
9757 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1;
9758 return s_error;
9759 }
9760 goto s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1;
9761 /* UNREACHABLE */;
9762 abort();
9763 }
9764 s_n_llhttp__internal__n_span_end_llhttp__on_version_5: {
9765 const unsigned char* start;
9766 int err;
9767
9768 start = state->_span_pos0;
9769 state->_span_pos0 = NULL;
9770 err = llhttp__on_version(state, start, p);
9771 if (err != 0) {
9772 state->error = err;
9773 state->error_pos = (const char*) p;
9774 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_87;
9775 return s_error;
9776 }
9777 goto s_n_llhttp__internal__n_error_87;
9778 /* UNREACHABLE */;
9779 abort();
9780 }
9781 s_n_llhttp__internal__n_invoke_load_http_minor_3: {
9782 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
9783 case 9:
9784 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6;
9785 default:
9786 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5;
9787 }
9788 /* UNREACHABLE */;
9789 abort();
9790 }
9791 s_n_llhttp__internal__n_invoke_load_http_minor_4: {
9792 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
9793 case 0:
9794 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6;
9795 case 1:
9796 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6;
9797 default:
9798 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5;
9799 }
9800 /* UNREACHABLE */;
9801 abort();
9802 }
9803 s_n_llhttp__internal__n_invoke_load_http_minor_5: {
9804 switch (llhttp__internal__c_load_http_minor(state, p, endp)) {
9805 case 0:
9806 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6;
9807 default:
9808 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5;
9809 }
9810 /* UNREACHABLE */;
9811 abort();
9812 }
9813 s_n_llhttp__internal__n_invoke_load_http_major_1: {
9814 switch (llhttp__internal__c_load_http_major(state, p, endp)) {
9815 case 0:
9816 goto s_n_llhttp__internal__n_invoke_load_http_minor_3;
9817 case 1:
9818 goto s_n_llhttp__internal__n_invoke_load_http_minor_4;
9819 case 2:
9820 goto s_n_llhttp__internal__n_invoke_load_http_minor_5;
9821 default:
9822 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_5;
9823 }
9824 /* UNREACHABLE */;
9825 abort();
9826 }
9827 s_n_llhttp__internal__n_invoke_test_lenient_flags_26: {
9828 switch (llhttp__internal__c_test_lenient_flags_23(state, p, endp)) {
9829 case 1:
9830 goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6;
9831 default:
9832 goto s_n_llhttp__internal__n_invoke_load_http_major_1;
9833 }
9834 /* UNREACHABLE */;
9835 abort();
9836 }
9837 s_n_llhttp__internal__n_invoke_store_http_minor_1: {
9838 switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) {
9839 default:
9840 goto s_n_llhttp__internal__n_invoke_test_lenient_flags_26;
9841 }
9842 /* UNREACHABLE */;
9843 abort();
9844 }
9845 s_n_llhttp__internal__n_span_end_llhttp__on_version_7: {
9846 const unsigned char* start;
9847 int err;
9848
9849 start = state->_span_pos0;
9850 state->_span_pos0 = NULL;
9851 err = llhttp__on_version(state, start, p);
9852 if (err != 0) {
9853 state->error = err;
9854 state->error_pos = (const char*) p;
9855 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_101;
9856 return s_error;
9857 }
9858 goto s_n_llhttp__internal__n_error_101;
9859 /* UNREACHABLE */;
9860 abort();
9861 }
9862 s_n_llhttp__internal__n_span_end_llhttp__on_version_8: {
9863 const unsigned char* start;
9864 int err;
9865
9866 start = state->_span_pos0;
9867 state->_span_pos0 = NULL;
9868 err = llhttp__on_version(state, start, p);
9869 if (err != 0) {
9870 state->error = err;
9871 state->error_pos = (const char*) p;
9872 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_102;
9873 return s_error;
9874 }
9875 goto s_n_llhttp__internal__n_error_102;
9876 /* UNREACHABLE */;
9877 abort();
9878 }
9879 s_n_llhttp__internal__n_invoke_store_http_major_1: {
9880 switch (llhttp__internal__c_store_http_major(state, p, endp, match)) {
9881 default:
9882 goto s_n_llhttp__internal__n_res_http_dot;
9883 }
9884 /* UNREACHABLE */;
9885 abort();
9886 }
9887 s_n_llhttp__internal__n_span_end_llhttp__on_version_9: {
9888 const unsigned char* start;
9889 int err;
9890
9891 start = state->_span_pos0;
9892 state->_span_pos0 = NULL;
9893 err = llhttp__on_version(state, start, p);
9894 if (err != 0) {
9895 state->error = err;
9896 state->error_pos = (const char*) p;
9897 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_103;
9898 return s_error;
9899 }
9900 goto s_n_llhttp__internal__n_error_103;
9901 /* UNREACHABLE */;
9902 abort();
9903 }
9904 s_n_llhttp__internal__n_error_107: {
9905 state->error = 0x8;
9906 state->reason = "Expected HTTP/";
9907 state->error_pos = (const char*) p;
9908 state->_current = (void*) (intptr_t) s_error;
9909 return s_error;
9910 /* UNREACHABLE */;
9911 abort();
9912 }
9913 s_n_llhttp__internal__n_pause_23: {
9914 state->error = 0x15;
9915 state->reason = "on_method_complete pause";
9916 state->error_pos = (const char*) p;
9917 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_req_first_space_before_url;
9918 return s_error;
9919 /* UNREACHABLE */;
9920 abort();
9921 }
9922 s_n_llhttp__internal__n_error_1: {
9923 state->error = 0x20;
9924 state->reason = "`on_method_complete` callback error";
9925 state->error_pos = (const char*) p;
9926 state->_current = (void*) (intptr_t) s_error;
9927 return s_error;
9928 /* UNREACHABLE */;
9929 abort();
9930 }
9931 s_n_llhttp__internal__n_span_end_llhttp__on_method: {
9932 const unsigned char* start;
9933 int err;
9934
9935 start = state->_span_pos0;
9936 state->_span_pos0 = NULL;
9937 err = llhttp__on_method(state, start, p);
9938 if (err != 0) {
9939 state->error = err;
9940 state->error_pos = (const char*) p;
9941 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_method_complete;
9942 return s_error;
9943 }
9944 goto s_n_llhttp__internal__n_invoke_llhttp__on_method_complete;
9945 /* UNREACHABLE */;
9946 abort();
9947 }
9948 s_n_llhttp__internal__n_invoke_update_type: {
9949 switch (llhttp__internal__c_update_type(state, p, endp)) {
9950 default:
9951 goto s_n_llhttp__internal__n_span_end_llhttp__on_method;
9952 }
9953 /* UNREACHABLE */;
9954 abort();
9955 }
9956 s_n_llhttp__internal__n_invoke_store_method: {
9957 switch (llhttp__internal__c_store_method(state, p, endp, match)) {
9958 default:
9959 goto s_n_llhttp__internal__n_invoke_update_type;
9960 }
9961 /* UNREACHABLE */;
9962 abort();
9963 }
9964 s_n_llhttp__internal__n_error_104: {
9965 state->error = 0x8;
9966 state->reason = "Invalid word encountered";
9967 state->error_pos = (const char*) p;
9968 state->_current = (void*) (intptr_t) s_error;
9969 return s_error;
9970 /* UNREACHABLE */;
9971 abort();
9972 }
9973 s_n_llhttp__internal__n_span_end_llhttp__on_method_1: {
9974 const unsigned char* start;
9975 int err;
9976
9977 start = state->_span_pos0;
9978 state->_span_pos0 = NULL;
9979 err = llhttp__on_method(state, start, p);
9980 if (err != 0) {
9981 state->error = err;
9982 state->error_pos = (const char*) p;
9983 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_type_1;
9984 return s_error;
9985 }
9986 goto s_n_llhttp__internal__n_invoke_update_type_1;
9987 /* UNREACHABLE */;
9988 abort();
9989 }
9990 s_n_llhttp__internal__n_invoke_update_type_2: {
9991 switch (llhttp__internal__c_update_type(state, p, endp)) {
9992 default:
9993 goto s_n_llhttp__internal__n_span_start_llhttp__on_method_1;
9994 }
9995 /* UNREACHABLE */;
9996 abort();
9997 }
9998 s_n_llhttp__internal__n_pause_27: {
9999 state->error = 0x15;
10000 state->reason = "on_message_begin pause";
10001 state->error_pos = (const char*) p;
10002 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_type;
10003 return s_error;
10004 /* UNREACHABLE */;
10005 abort();
10006 }
10007 s_n_llhttp__internal__n_error: {
10008 state->error = 0x10;
10009 state->reason = "`on_message_begin` callback error";
10010 state->error_pos = (const char*) p;
10011 state->_current = (void*) (intptr_t) s_error;
10012 return s_error;
10013 /* UNREACHABLE */;
10014 abort();
10015 }
10016 s_n_llhttp__internal__n_invoke_llhttp__on_message_begin: {
10017 switch (llhttp__on_message_begin(state, p, endp)) {
10018 case 0:
10019 goto s_n_llhttp__internal__n_invoke_load_type;
10020 case 21:
10021 goto s_n_llhttp__internal__n_pause_27;
10022 default:
10023 goto s_n_llhttp__internal__n_error;
10024 }
10025 /* UNREACHABLE */;
10026 abort();
10027 }
10028 s_n_llhttp__internal__n_pause_28: {
10029 state->error = 0x15;
10030 state->reason = "on_reset pause";
10031 state->error_pos = (const char*) p;
10032 state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_finish;
10033 return s_error;
10034 /* UNREACHABLE */;
10035 abort();
10036 }
10037 s_n_llhttp__internal__n_error_108: {
10038 state->error = 0x1f;
10039 state->reason = "`on_reset` callback error";
10040 state->error_pos = (const char*) p;
10041 state->_current = (void*) (intptr_t) s_error;
10042 return s_error;
10043 /* UNREACHABLE */;
10044 abort();
10045 }
10046 s_n_llhttp__internal__n_invoke_llhttp__on_reset: {
10047 switch (llhttp__on_reset(state, p, endp)) {
10048 case 0:
10049 goto s_n_llhttp__internal__n_invoke_update_finish;
10050 case 21:
10051 goto s_n_llhttp__internal__n_pause_28;
10052 default:
10053 goto s_n_llhttp__internal__n_error_108;
10054 }
10055 /* UNREACHABLE */;
10056 abort();
10057 }
10058 s_n_llhttp__internal__n_invoke_load_initial_message_completed: {
10059 switch (llhttp__internal__c_load_initial_message_completed(state, p, endp)) {
10060 case 1:
10061 goto s_n_llhttp__internal__n_invoke_llhttp__on_reset;
10062 default:
10063 goto s_n_llhttp__internal__n_invoke_update_finish;
10064 }
10065 /* UNREACHABLE */;
10066 abort();
10067 }
10068}
10069
10070int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const char* endp) {
10071 llparse_state_t next;
10072
10073 /* check lingering errors */
10074 if (state->error != 0) {
10075 return state->error;
10076 }
10077
10078 /* restart spans */
10079 if (state->_span_pos0 != NULL) {
10080 state->_span_pos0 = (void*) p;
10081 }
10082
10083 next = llhttp__internal__run(state, (const unsigned char*) p, (const unsigned char*) endp);
10084 if (next == s_error) {
10085 return state->error;
10086 }
10087 state->_current = (void*) (intptr_t) next;
10088
10089 /* execute spans */
10090 if (state->_span_pos0 != NULL) {
10091 int error;
10092
10093 error = ((llhttp__internal__span_cb) state->_span_cb0)(state, state->_span_pos0, (const char*) endp);
10094 if (error != 0) {
10095 state->error = error;
10096 state->error_pos = endp;
10097 return error;
10098 }
10099 }
10100
10101 return 0;
10102}