diff options
author | Fedor Indutny <fedor@indutny.com> | 2021-08-27 19:36:43 +0300 |
---|---|---|
committer | Beth Griggs <bgriggs@redhat.com> | 2021-10-11 18:44:07 +0300 |
commit | 8c254ca7e4693fb778d808fa835b095de6c9fdd4 (patch) | |
tree | 1017c0fe51e5b07246f36c1ad0afdc05db13e52c /deps | |
parent | 95b9240a266c46b732e9d15bc9ab2b31f12a871d (diff) |
deps: update llhttp to 2.1.4
Refs: https://hackerone.com/reports/1238099
Refs: https://hackerone.com/reports/1238709
Refs: https://github.com/nodejs-private/llhttp-private/pull/7
Refs: https://github.com/nodejs-private/llhttp-private/pull/8
CVE-ID: CVE-2021-22959
CVE-ID: CVE-2021-22960
PR-URL: https://github.com/nodejs-private/node-private/pull/285
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/llhttp/README.md | 4 | ||||
-rw-r--r-- | deps/llhttp/include/llhttp.h | 2 | ||||
-rw-r--r-- | deps/llhttp/src/llhttp.c | 858 |
3 files changed, 518 insertions, 346 deletions
diff --git a/deps/llhttp/README.md b/deps/llhttp/README.md index c95e8d04584..f1998e923af 100644 --- a/deps/llhttp/README.md +++ b/deps/llhttp/README.md @@ -22,7 +22,7 @@ were tried. However, all of them failed due to resulting significant performance degradation. This project is a port of [http_parser][0] to TypeScript. [llparse][1] is used -to generate the output C source file, which could be compiled and +to generate the output C and/or bitcode artifacts, which could be compiled and linked with the embedder's program (like [Node.js][7]). ## Performance @@ -31,7 +31,7 @@ So far llhttp outperforms http_parser: | | input size | bandwidth | reqs/sec | time | |:----------------|-----------:|-------------:|-----------:|--------:| -| **llhttp** | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s | +| **llhttp** _(C)_ | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s | | **http_parser** | 8192.00 mb | 694.66 mb/s | 1406180.33 req/sec | 11.79 s | llhttp is faster by approximately **156%**. diff --git a/deps/llhttp/include/llhttp.h b/deps/llhttp/include/llhttp.h index 4bf4d8b0cef..50b7f8e1155 100644 --- a/deps/llhttp/include/llhttp.h +++ b/deps/llhttp/include/llhttp.h @@ -3,7 +3,7 @@ #define LLHTTP_VERSION_MAJOR 2 #define LLHTTP_VERSION_MINOR 1 -#define LLHTTP_VERSION_PATCH 3 +#define LLHTTP_VERSION_PATCH 4 #ifndef LLHTTP_STRICT_MODE # define LLHTTP_STRICT_MODE 0 diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c index 3019c410963..af520f5b5b2 100644 --- a/deps/llhttp/src/llhttp.c +++ b/deps/llhttp/src/llhttp.c @@ -317,6 +317,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_span_start_llhttp__on_body_2, s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete, s_n_llhttp__internal__n_headers_almost_done, + s_n_llhttp__internal__n_header_field_colon_discard_ws, + s_n_llhttp__internal__n_error_20, s_n_llhttp__internal__n_span_start_llhttp__on_header_value, s_n_llhttp__internal__n_header_value_discard_lws, s_n_llhttp__internal__n_header_value_discard_ws_almost_done, @@ -330,8 +332,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_connection_2, s_n_llhttp__internal__n_header_value_connection_3, s_n_llhttp__internal__n_header_value_connection, - s_n_llhttp__internal__n_error_24, - s_n_llhttp__internal__n_error_25, + s_n_llhttp__internal__n_error_26, + s_n_llhttp__internal__n_error_27, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, s_n_llhttp__internal__n_header_value_te_chunked_last, @@ -764,7 +766,7 @@ int llhttp__internal__c_update_header_state_6( return 0; } -int llhttp__internal__c_test_flags_5( +int llhttp__internal__c_test_flags_6( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -991,7 +993,7 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_5; default: - goto s_n_llhttp__internal__n_error_13; + goto s_n_llhttp__internal__n_error_14; } /* UNREACHABLE */; abort(); @@ -1023,7 +1025,7 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_consume_content_length: s_n_llhttp__internal__n_consume_content_length: { size_t avail; - size_t need; + uint64_t need; avail = endp - p; need = state->content_length; @@ -1079,17 +1081,38 @@ static llparse_state_t llhttp__internal__run( } case s_n_llhttp__internal__n_chunk_parameters: s_n_llhttp__internal__n_chunk_parameters: { + static uint8_t lookup_table[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + }; if (p == endp) { return s_n_llhttp__internal__n_chunk_parameters; } - switch (*p) { - case 13: { + switch (lookup_table[(uint8_t) *p]) { + case 1: { + p++; + goto s_n_llhttp__internal__n_chunk_parameters; + } + case 2: { p++; goto s_n_llhttp__internal__n_chunk_size_almost_done; } default: { - p++; - goto s_n_llhttp__internal__n_chunk_parameters; + goto s_n_llhttp__internal__n_error_10; } } /* UNREACHABLE */; @@ -1114,7 +1137,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_chunk_parameters; } default: { - goto s_n_llhttp__internal__n_error_10; + goto s_n_llhttp__internal__n_error_11; } } /* UNREACHABLE */; @@ -1360,7 +1383,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_mul_add_content_length; } default: { - goto s_n_llhttp__internal__n_error_12; + goto s_n_llhttp__internal__n_error_13; } } /* UNREACHABLE */; @@ -1378,7 +1401,7 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_consume_content_length_1: s_n_llhttp__internal__n_consume_content_length_1: { size_t avail; - size_t need; + uint64_t need; avail = endp - p; need = state->content_length; @@ -1437,7 +1460,7 @@ static llparse_state_t llhttp__internal__run( case 4: goto s_n_llhttp__internal__n_invoke_update_finish_3; case 5: - goto s_n_llhttp__internal__n_error_14; + goto s_n_llhttp__internal__n_error_15; default: goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete; } @@ -1455,12 +1478,39 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_test_flags; } default: { - goto s_n_llhttp__internal__n_error_18; + goto s_n_llhttp__internal__n_error_19; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_header_field_colon_discard_ws: + s_n_llhttp__internal__n_header_field_colon_discard_ws: { + if (p == endp) { + return s_n_llhttp__internal__n_header_field_colon_discard_ws; + } + switch (*p) { + case ' ': { + p++; + goto s_n_llhttp__internal__n_header_field_colon_discard_ws; + } + default: { + goto s_n_llhttp__internal__n_header_field_colon; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_error_20: + s_n_llhttp__internal__n_error_20: { + state->error = 0xa; + state->reason = "Invalid header field char"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_span_start_llhttp__on_header_value: s_n_llhttp__internal__n_span_start_llhttp__on_header_value: { if (p == endp) { @@ -1504,7 +1554,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_discard_lws; } default: { - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_22; } } /* UNREACHABLE */; @@ -1540,7 +1590,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_lws; } default: { - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_23; } } /* UNREACHABLE */; @@ -1579,7 +1629,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_4; + goto s_n_llhttp__internal__n_invoke_test_flags_5; } } /* UNREACHABLE */; @@ -1756,8 +1806,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_24: - s_n_llhttp__internal__n_error_24: { + case s_n_llhttp__internal__n_error_26: + s_n_llhttp__internal__n_error_26: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -1766,8 +1816,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_25: - s_n_llhttp__internal__n_error_25: { + case s_n_llhttp__internal__n_error_27: + s_n_llhttp__internal__n_error_27: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -2075,10 +2125,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case ':': { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2; } default: { - goto s_n_llhttp__internal__n_error_26; + goto s_n_llhttp__internal__n_error_28; } } /* UNREACHABLE */; @@ -2162,11 +2212,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case ' ': { - p++; - goto s_n_llhttp__internal__n_header_field_colon; + goto s_n_llhttp__internal__n_invoke_test_flags_4; } case ':': { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; } default: { goto s_n_llhttp__internal__n_invoke_update_header_state_9; @@ -2459,7 +2508,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_to_http_09; } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -2484,7 +2533,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_skip_lf_to_http09_1; } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -2501,7 +2550,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_field_start; } default: { - goto s_n_llhttp__internal__n_error_28; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -2522,7 +2571,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_end_1; } default: { - goto s_n_llhttp__internal__n_error_28; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -2585,7 +2634,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor; } default: { - goto s_n_llhttp__internal__n_error_29; + goto s_n_llhttp__internal__n_error_31; } } /* UNREACHABLE */; @@ -2602,7 +2651,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_minor; } default: { - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_32; } } /* UNREACHABLE */; @@ -2665,7 +2714,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major; } default: { - goto s_n_llhttp__internal__n_error_31; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -2689,7 +2738,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_start_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -2713,7 +2762,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_start_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -2738,7 +2787,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_start_2; } default: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -2829,7 +2878,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_fragment; } default: { - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -2890,7 +2939,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_stub_query_3; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -2928,7 +2977,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -3053,10 +3102,10 @@ static llparse_state_t llhttp__internal__run( } case 8: { p++; - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_39; } default: { - goto s_n_llhttp__internal__n_error_38; + goto s_n_llhttp__internal__n_error_40; } } /* UNREACHABLE */; @@ -3115,7 +3164,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server_with_at; } default: { - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; @@ -3132,7 +3181,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_43; } } /* UNREACHABLE */; @@ -3150,7 +3199,7 @@ static llparse_state_t llhttp__internal__run( } case 10: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } case 12: { p++; @@ -3158,18 +3207,18 @@ static llparse_state_t llhttp__internal__run( } case 13: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_43; } } /* UNREACHABLE */; @@ -3215,7 +3264,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } case 3: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -3225,7 +3274,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -3261,7 +3310,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } case 3: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -3270,7 +3319,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_45; } } /* UNREACHABLE */; @@ -3368,7 +3417,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_spaces_before_url; } default: { - goto s_n_llhttp__internal__n_error_44; + goto s_n_llhttp__internal__n_error_46; } } /* UNREACHABLE */; @@ -3393,7 +3442,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3418,7 +3467,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3443,7 +3492,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_4; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3468,7 +3517,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_6; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3486,7 +3535,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3507,7 +3556,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_7; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3528,7 +3577,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_5; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3553,7 +3602,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_8; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3578,7 +3627,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_9; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3603,7 +3652,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_10; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3628,7 +3677,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_12; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3653,7 +3702,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_13; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3674,7 +3723,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_13; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3699,7 +3748,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_15; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3724,7 +3773,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_16; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3749,7 +3798,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_18; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3774,7 +3823,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_20; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3792,7 +3841,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3813,7 +3862,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_21; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3834,7 +3883,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_19; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3859,7 +3908,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_22; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3888,7 +3937,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_22; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3913,7 +3962,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_23; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3938,7 +3987,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_24; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3963,7 +4012,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_26; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -3988,7 +4037,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_27; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4013,7 +4062,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_31; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4038,7 +4087,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_32; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4059,7 +4108,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_32; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4076,7 +4125,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_30; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4098,7 +4147,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_29; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4123,7 +4172,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_34; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4145,7 +4194,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4174,7 +4223,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_33; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4199,7 +4248,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_37; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4224,7 +4273,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_38; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4245,7 +4294,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_38; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4262,7 +4311,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_36; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4287,7 +4336,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_40; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4312,7 +4361,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_41; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4337,7 +4386,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_42; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4362,7 +4411,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_42; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4387,7 +4436,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_43; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4412,7 +4461,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_46; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4437,7 +4486,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_48; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4462,7 +4511,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_49; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4483,7 +4532,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_49; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4508,7 +4557,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_50; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4533,7 +4582,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_50; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4550,7 +4599,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_45; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4623,7 +4672,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_44; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4640,7 +4689,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_field_start; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -4715,7 +4764,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_status_start; } default: { - goto s_n_llhttp__internal__n_error_47; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -4795,7 +4844,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_update_status_code; } default: { - goto s_n_llhttp__internal__n_error_48; + goto s_n_llhttp__internal__n_error_50; } } /* UNREACHABLE */; @@ -4858,7 +4907,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor_1; } default: { - goto s_n_llhttp__internal__n_error_49; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -4875,7 +4924,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_http_minor; } default: { - goto s_n_llhttp__internal__n_error_50; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -4938,7 +4987,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major_1; } default: { - goto s_n_llhttp__internal__n_error_51; + goto s_n_llhttp__internal__n_error_53; } } /* UNREACHABLE */; @@ -4962,7 +5011,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_res; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_54; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; @@ -4987,7 +5036,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -5011,7 +5060,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -5032,7 +5081,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_3; } default: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -5049,7 +5098,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_1; } default: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -5118,7 +5167,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_42: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -5161,7 +5210,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_13: { + s_n_llhttp__internal__n_error_14: { state->error = 0x12; state->reason = "`on_message_complete` callback error"; state->error_pos = (const char*) p; @@ -5179,7 +5228,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_17: { + s_n_llhttp__internal__n_error_18: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -5195,12 +5244,12 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_7; default: - goto s_n_llhttp__internal__n_error_17; + goto s_n_llhttp__internal__n_error_18; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_15: { + s_n_llhttp__internal__n_error_16: { state->error = 0x4; state->reason = "Content-Length can't be present with Transfer-Encoding"; state->error_pos = (const char*) p; @@ -5209,7 +5258,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_16: { + s_n_llhttp__internal__n_error_17: { state->error = 0x4; state->reason = "Content-Length can't be present with chunked encoding"; state->error_pos = (const char*) p; @@ -5248,7 +5297,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_11: { + s_n_llhttp__internal__n_error_12: { state->error = 0xc; state->reason = "Chunk size overflow"; state->error_pos = (const char*) p; @@ -5361,6 +5410,15 @@ static llparse_state_t llhttp__internal__run( abort(); } s_n_llhttp__internal__n_error_10: { + state->error = 0x2; + state->reason = "Invalid character in chunk parameters"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_11: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -5372,14 +5430,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_content_length: { switch (llhttp__internal__c_mul_add_content_length(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_11; + goto s_n_llhttp__internal__n_error_12; default: goto s_n_llhttp__internal__n_chunk_size; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_12: { + s_n_llhttp__internal__n_error_13: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -5413,7 +5471,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_14: { + s_n_llhttp__internal__n_error_15: { state->error = 0xf; state->reason = "Request has invalid `Transfer-Encoding`"; state->error_pos = (const char*) p; @@ -5521,7 +5579,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_test_flags_3: { switch (llhttp__internal__c_test_flags_3(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_error_16; + goto s_n_llhttp__internal__n_error_17; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -5531,7 +5589,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_test_flags_2: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_error_15; + goto s_n_llhttp__internal__n_error_16; case 1: goto s_n_llhttp__internal__n_invoke_test_flags_3; default: @@ -5560,7 +5618,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_18: { + s_n_llhttp__internal__n_error_19: { state->error = 0x2; state->reason = "Expected LF after headers"; state->error_pos = (const char*) p; @@ -5569,7 +5627,35 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_19: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_header_field(state, start, p); + if (err != 0) { + state->error = err; + state->error_pos = (const char*) (p + 1); + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_20; + return s_error; + } + p++; + goto s_n_llhttp__internal__n_error_20; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags_4: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_header_field_colon_discard_ws; + default: + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_21: { state->error = 0xb; state->reason = "Empty Content-Length"; state->error_pos = (const char*) p; @@ -5654,14 +5740,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_header_state: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 2: - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_21; default: goto s_n_llhttp__internal__n_invoke_load_header_state_1; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_error_22: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -5726,7 +5812,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_21: { + s_n_llhttp__internal__n_error_23: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -5788,7 +5874,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_22: { + s_n_llhttp__internal__n_error_24: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -5797,12 +5883,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_4: { + s_n_llhttp__internal__n_invoke_test_flags_5: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; default: - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_24; } /* UNREACHABLE */; abort(); @@ -5905,10 +5991,10 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_26; return s_error; } - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_26; /* UNREACHABLE */; abort(); } @@ -5940,14 +6026,14 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_25; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_27; return s_error; } - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_27; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_23: { + s_n_llhttp__internal__n_error_25: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -5956,12 +6042,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_5: { - switch (llhttp__internal__c_test_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_6: { + switch (llhttp__internal__c_test_flags_6(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_25; } /* UNREACHABLE */; abort(); @@ -6011,7 +6097,7 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_header_value_connection; case 2: - goto s_n_llhttp__internal__n_invoke_test_flags_5; + goto s_n_llhttp__internal__n_invoke_test_flags_6; case 3: goto s_n_llhttp__internal__n_invoke_or_flags_16; case 4: @@ -6022,7 +6108,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: { const unsigned char* start; int err; @@ -6040,7 +6126,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2: { const unsigned char* start; int err; @@ -6058,7 +6144,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_28: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -6124,7 +6210,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_29: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -6150,7 +6236,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_28: { + s_n_llhttp__internal__n_error_30: { state->error = 0x9; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -6167,7 +6253,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_31: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6176,7 +6262,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_32: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6193,7 +6279,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_33: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6202,7 +6288,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_35: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -6211,7 +6297,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_34: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -6223,7 +6309,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_is_equal_method_1: { switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_error_32; + goto s_n_llhttp__internal__n_error_34; default: goto s_n_llhttp__internal__n_req_http_major; } @@ -6298,7 +6384,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_36: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -6358,7 +6444,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_37: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -6367,7 +6453,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_38: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -6478,7 +6564,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_39: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -6487,7 +6573,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_40: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6496,7 +6582,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_41: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6505,7 +6591,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_43: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6514,7 +6600,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_44: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6523,7 +6609,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_45: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -6542,7 +6628,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_46: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -6559,7 +6645,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_53: { + s_n_llhttp__internal__n_error_55: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -6568,7 +6654,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_47: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -6580,14 +6666,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_47; default: goto s_n_llhttp__internal__n_res_status_code; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_48: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -6632,7 +6718,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_49: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -6649,7 +6735,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_48: { + s_n_llhttp__internal__n_error_50: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -6666,7 +6752,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_49: { + s_n_llhttp__internal__n_error_51: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6675,7 +6761,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_50: { + s_n_llhttp__internal__n_error_52: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6692,7 +6778,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_51: { + s_n_llhttp__internal__n_error_53: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6701,7 +6787,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_54: { + s_n_llhttp__internal__n_error_56: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -6726,7 +6812,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_52: { + s_n_llhttp__internal__n_error_54: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; @@ -7150,6 +7236,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_span_start_llhttp__on_body_2, s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete, s_n_llhttp__internal__n_headers_almost_done, + s_n_llhttp__internal__n_header_field_colon_discard_ws, + s_n_llhttp__internal__n_error_15, s_n_llhttp__internal__n_span_start_llhttp__on_header_value, s_n_llhttp__internal__n_header_value_discard_lws, s_n_llhttp__internal__n_header_value_discard_ws_almost_done, @@ -7163,8 +7251,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_connection_2, s_n_llhttp__internal__n_header_value_connection_3, s_n_llhttp__internal__n_header_value_connection, - s_n_llhttp__internal__n_error_18, - s_n_llhttp__internal__n_error_19, + s_n_llhttp__internal__n_error_20, + s_n_llhttp__internal__n_error_21, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, s_n_llhttp__internal__n_header_value_te_chunked_last, @@ -7592,7 +7680,7 @@ int llhttp__internal__c_update_header_state_6( return 0; } -int llhttp__internal__c_test_flags_5( +int llhttp__internal__c_test_flags_6( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -7795,7 +7883,7 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_5; default: - goto s_n_llhttp__internal__n_error_9; + goto s_n_llhttp__internal__n_error_10; } /* UNREACHABLE */; abort(); @@ -7823,7 +7911,7 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_consume_content_length: s_n_llhttp__internal__n_consume_content_length: { size_t avail; - size_t need; + uint64_t need; avail = endp - p; need = state->content_length; @@ -7872,17 +7960,38 @@ static llparse_state_t llhttp__internal__run( } case s_n_llhttp__internal__n_chunk_parameters: s_n_llhttp__internal__n_chunk_parameters: { + static uint8_t lookup_table[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + }; if (p == endp) { return s_n_llhttp__internal__n_chunk_parameters; } - switch (*p) { - case 13: { + switch (lookup_table[(uint8_t) *p]) { + case 1: { + p++; + goto s_n_llhttp__internal__n_chunk_parameters; + } + case 2: { p++; goto s_n_llhttp__internal__n_chunk_size_almost_done; } default: { - p++; - goto s_n_llhttp__internal__n_chunk_parameters; + goto s_n_llhttp__internal__n_error_6; } } /* UNREACHABLE */; @@ -7907,7 +8016,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_chunk_parameters; } default: { - goto s_n_llhttp__internal__n_error_6; + goto s_n_llhttp__internal__n_error_7; } } /* UNREACHABLE */; @@ -8153,7 +8262,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_mul_add_content_length; } default: { - goto s_n_llhttp__internal__n_error_8; + goto s_n_llhttp__internal__n_error_9; } } /* UNREACHABLE */; @@ -8171,7 +8280,7 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_consume_content_length_1: s_n_llhttp__internal__n_consume_content_length_1: { size_t avail; - size_t need; + uint64_t need; avail = endp - p; need = state->content_length; @@ -8230,7 +8339,7 @@ static llparse_state_t llhttp__internal__run( case 4: goto s_n_llhttp__internal__n_invoke_update_finish_2; case 5: - goto s_n_llhttp__internal__n_error_10; + goto s_n_llhttp__internal__n_error_11; default: goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete; } @@ -8247,6 +8356,33 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_header_field_colon_discard_ws: + s_n_llhttp__internal__n_header_field_colon_discard_ws: { + if (p == endp) { + return s_n_llhttp__internal__n_header_field_colon_discard_ws; + } + switch (*p) { + case ' ': { + p++; + goto s_n_llhttp__internal__n_header_field_colon_discard_ws; + } + default: { + goto s_n_llhttp__internal__n_header_field_colon; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_error_15: + s_n_llhttp__internal__n_error_15: { + state->error = 0xa; + state->reason = "Invalid header field char"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_span_start_llhttp__on_header_value: s_n_llhttp__internal__n_span_start_llhttp__on_header_value: { if (p == endp) { @@ -8319,7 +8455,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_lws; } default: { - goto s_n_llhttp__internal__n_error_15; + goto s_n_llhttp__internal__n_error_17; } } /* UNREACHABLE */; @@ -8358,7 +8494,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_4; + goto s_n_llhttp__internal__n_invoke_test_flags_5; } } /* UNREACHABLE */; @@ -8535,8 +8671,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_18: - s_n_llhttp__internal__n_error_18: { + case s_n_llhttp__internal__n_error_20: + s_n_llhttp__internal__n_error_20: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -8545,8 +8681,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_19: - s_n_llhttp__internal__n_error_19: { + case s_n_llhttp__internal__n_error_21: + s_n_llhttp__internal__n_error_21: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -8854,10 +8990,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case ':': { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2; } default: { - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_22; } } /* UNREACHABLE */; @@ -8941,11 +9077,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case ' ': { - p++; - goto s_n_llhttp__internal__n_header_field_colon; + goto s_n_llhttp__internal__n_invoke_test_flags_4; } case ':': { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; } default: { goto s_n_llhttp__internal__n_invoke_update_header_state_9; @@ -9212,7 +9347,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_url_skip_lf_to_http09; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_23; } } /* UNREACHABLE */; @@ -9229,7 +9364,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_field_start; } default: { - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_24; } } /* UNREACHABLE */; @@ -9250,7 +9385,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_end_1; } default: { - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_24; } } /* UNREACHABLE */; @@ -9313,7 +9448,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor; } default: { - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_25; } } /* UNREACHABLE */; @@ -9330,7 +9465,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_minor; } default: { - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_26; } } /* UNREACHABLE */; @@ -9393,7 +9528,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major; } default: { - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_27; } } /* UNREACHABLE */; @@ -9417,7 +9552,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_start_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -9441,7 +9576,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_start_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -9466,7 +9601,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_start_2; } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -9520,7 +9655,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8; } default: { - goto s_n_llhttp__internal__n_error_28; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -9577,7 +9712,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_stub_query_3; } default: { - goto s_n_llhttp__internal__n_error_29; + goto s_n_llhttp__internal__n_error_31; } } /* UNREACHABLE */; @@ -9607,7 +9742,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_32; } } /* UNREACHABLE */; @@ -9748,10 +9883,10 @@ static llparse_state_t llhttp__internal__run( } case 7: { p++; - goto s_n_llhttp__internal__n_error_31; + goto s_n_llhttp__internal__n_error_33; } default: { - goto s_n_llhttp__internal__n_error_32; + goto s_n_llhttp__internal__n_error_34; } } /* UNREACHABLE */; @@ -9806,7 +9941,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server_with_at; } default: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -9823,7 +9958,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -9837,22 +9972,22 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } case 13: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -9894,7 +10029,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } case 2: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -9904,7 +10039,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -9936,7 +10071,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_36; } case 2: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -9945,7 +10080,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -10001,7 +10136,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_spaces_before_url; } default: { - goto s_n_llhttp__internal__n_error_38; + goto s_n_llhttp__internal__n_error_40; } } /* UNREACHABLE */; @@ -10026,7 +10161,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10051,7 +10186,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10076,7 +10211,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_4; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10101,7 +10236,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_6; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10119,7 +10254,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10140,7 +10275,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_7; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10161,7 +10296,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_5; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10186,7 +10321,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_8; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10211,7 +10346,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_9; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10236,7 +10371,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_10; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10261,7 +10396,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_12; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10286,7 +10421,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_13; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10307,7 +10442,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_13; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10332,7 +10467,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_15; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10357,7 +10492,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_16; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10382,7 +10517,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_18; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10407,7 +10542,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_20; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10425,7 +10560,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10446,7 +10581,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_21; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10467,7 +10602,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_19; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10492,7 +10627,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_22; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10521,7 +10656,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_22; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10546,7 +10681,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_23; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10571,7 +10706,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_24; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10596,7 +10731,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_26; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10621,7 +10756,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_27; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10646,7 +10781,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_31; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10671,7 +10806,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_32; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10692,7 +10827,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_32; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10709,7 +10844,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_30; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10731,7 +10866,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_29; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10756,7 +10891,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_34; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10778,7 +10913,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10807,7 +10942,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_33; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10832,7 +10967,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_37; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10857,7 +10992,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_38; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10878,7 +11013,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_38; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10895,7 +11030,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_36; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10920,7 +11055,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_40; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10945,7 +11080,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_41; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10970,7 +11105,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_42; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -10995,7 +11130,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_42; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11020,7 +11155,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_43; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11045,7 +11180,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_46; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11070,7 +11205,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_48; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11095,7 +11230,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_49; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11116,7 +11251,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_49; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11141,7 +11276,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_50; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11166,7 +11301,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_50; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11183,7 +11318,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_45; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11256,7 +11391,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_44; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11341,7 +11476,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_status_start; } default: { - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_42; } } /* UNREACHABLE */; @@ -11421,7 +11556,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_update_status_code; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_43; } } /* UNREACHABLE */; @@ -11484,7 +11619,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor_1; } default: { - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -11501,7 +11636,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_http_minor; } default: { - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_45; } } /* UNREACHABLE */; @@ -11564,7 +11699,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major_1; } default: { - goto s_n_llhttp__internal__n_error_44; + goto s_n_llhttp__internal__n_error_46; } } /* UNREACHABLE */; @@ -11588,7 +11723,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_res; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_47; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -11613,7 +11748,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11637,7 +11772,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11658,7 +11793,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_3; } default: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11675,7 +11810,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_1; } default: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11735,7 +11870,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */ abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_36: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -11761,7 +11896,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_9: { + s_n_llhttp__internal__n_error_10: { state->error = 0x12; state->reason = "`on_message_complete` callback error"; state->error_pos = (const char*) p; @@ -11779,7 +11914,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_13: { + s_n_llhttp__internal__n_error_14: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -11795,12 +11930,12 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_7; default: - goto s_n_llhttp__internal__n_error_13; + goto s_n_llhttp__internal__n_error_14; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_11: { + s_n_llhttp__internal__n_error_12: { state->error = 0x4; state->reason = "Content-Length can't be present with Transfer-Encoding"; state->error_pos = (const char*) p; @@ -11809,7 +11944,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_12: { + s_n_llhttp__internal__n_error_13: { state->error = 0x4; state->reason = "Content-Length can't be present with chunked encoding"; state->error_pos = (const char*) p; @@ -11848,7 +11983,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_7: { + s_n_llhttp__internal__n_error_8: { state->error = 0xc; state->reason = "Chunk size overflow"; state->error_pos = (const char*) p; @@ -11943,6 +12078,15 @@ static llparse_state_t llhttp__internal__run( abort(); } s_n_llhttp__internal__n_error_6: { + state->error = 0x2; + state->reason = "Invalid character in chunk parameters"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_7: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -11954,14 +12098,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_content_length: { switch (llhttp__internal__c_mul_add_content_length(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_7; + goto s_n_llhttp__internal__n_error_8; default: goto s_n_llhttp__internal__n_chunk_size; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_8: { + s_n_llhttp__internal__n_error_9: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -11995,7 +12139,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_10: { + s_n_llhttp__internal__n_error_11: { state->error = 0xf; state->reason = "Request has invalid `Transfer-Encoding`"; state->error_pos = (const char*) p; @@ -12103,7 +12247,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_test_flags_3: { switch (llhttp__internal__c_test_flags_3(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_error_12; + goto s_n_llhttp__internal__n_error_13; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -12113,7 +12257,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_test_flags_2: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_error_11; + goto s_n_llhttp__internal__n_error_12; case 1: goto s_n_llhttp__internal__n_invoke_test_flags_3; default: @@ -12142,7 +12286,35 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_14: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_header_field(state, start, p); + if (err != 0) { + state->error = err; + state->error_pos = (const char*) (p + 1); + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_15; + return s_error; + } + p++; + goto s_n_llhttp__internal__n_error_15; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags_4: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_header_field_colon_discard_ws; + default: + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_16: { state->error = 0xb; state->reason = "Empty Content-Length"; state->error_pos = (const char*) p; @@ -12227,7 +12399,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_header_state: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 2: - goto s_n_llhttp__internal__n_error_14; + goto s_n_llhttp__internal__n_error_16; default: goto s_n_llhttp__internal__n_invoke_load_header_state_1; } @@ -12290,7 +12462,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_15: { + s_n_llhttp__internal__n_error_17: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -12352,7 +12524,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_16: { + s_n_llhttp__internal__n_error_18: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -12361,12 +12533,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_4: { + s_n_llhttp__internal__n_invoke_test_flags_5: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; default: - goto s_n_llhttp__internal__n_error_16; + goto s_n_llhttp__internal__n_error_18; } /* UNREACHABLE */; abort(); @@ -12469,10 +12641,10 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_18; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_20; return s_error; } - goto s_n_llhttp__internal__n_error_18; + goto s_n_llhttp__internal__n_error_20; /* UNREACHABLE */; abort(); } @@ -12504,14 +12676,14 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_19; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_21; return s_error; } - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_21; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_17: { + s_n_llhttp__internal__n_error_19: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -12520,12 +12692,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_5: { - switch (llhttp__internal__c_test_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_6: { + switch (llhttp__internal__c_test_flags_6(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_17; + goto s_n_llhttp__internal__n_error_19; } /* UNREACHABLE */; abort(); @@ -12575,7 +12747,7 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_header_value_connection; case 2: - goto s_n_llhttp__internal__n_invoke_test_flags_5; + goto s_n_llhttp__internal__n_invoke_test_flags_6; case 3: goto s_n_llhttp__internal__n_invoke_or_flags_16; case 4: @@ -12586,7 +12758,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: { const unsigned char* start; int err; @@ -12604,7 +12776,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2: { const unsigned char* start; int err; @@ -12622,7 +12794,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_error_22: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -12688,7 +12860,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_21: { + s_n_llhttp__internal__n_error_23: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -12714,7 +12886,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_22: { + s_n_llhttp__internal__n_error_24: { state->error = 0x9; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -12731,7 +12903,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_23: { + s_n_llhttp__internal__n_error_25: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -12740,7 +12912,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_24: { + s_n_llhttp__internal__n_error_26: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -12757,7 +12929,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_25: { + s_n_llhttp__internal__n_error_27: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -12766,7 +12938,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_29: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -12775,7 +12947,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_28: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -12787,7 +12959,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_is_equal_method_1: { switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_error_26; + goto s_n_llhttp__internal__n_error_28; default: goto s_n_llhttp__internal__n_req_http_major; } @@ -12862,7 +13034,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_28: { + s_n_llhttp__internal__n_error_30: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -12922,7 +13094,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_31: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -12931,7 +13103,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_32: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -13042,7 +13214,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_33: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -13051,7 +13223,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_34: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13060,7 +13232,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_35: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13069,7 +13241,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_37: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13078,7 +13250,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_38: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13087,7 +13259,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_39: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -13106,7 +13278,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_40: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -13123,7 +13295,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_48: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -13132,7 +13304,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_41: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -13144,7 +13316,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_41; default: goto s_n_llhttp__internal__n_res_status_code; } @@ -13187,7 +13359,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_42: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -13204,7 +13376,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_43: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -13221,7 +13393,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_44: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -13230,7 +13402,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_45: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -13247,7 +13419,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_46: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -13256,7 +13428,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_49: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -13281,7 +13453,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_47: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; |