From 913768a522ff115f5827e3bd194343cc6e92d0bb Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 11 Apr 2024 15:21:48 +0000 Subject: [PATCH] http: do not allow OBS fold in headers by default Port https://github.com/nodejs/llhttp/pull/350 to llhttp 2.1.x and combine with the rest of 5d4d584 for Node.js 14.x. Original commit message: PR-URL: https://github.com/nodejs-private/node-private/pull/558 Refs: https://github.com/nodejs-private/node-private/pull/556 Reviewed-By: Matteo Collina Reviewed-By: Rafael Gonzaga CVE-ID: CVE-2024-27982 --- deps/llhttp/src/llhttp.c | 684 +++++++++--------- test/parallel/test-http-multi-line-headers.js | 3 +- .../test-http-transfer-encoding-smuggling.js | 5 +- 3 files changed, 364 insertions(+), 328 deletions(-) diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c index 6281913d10bfc6..db6ccb56b33ad5 100644 --- a/deps/llhttp/src/llhttp.c +++ b/deps/llhttp/src/llhttp.c @@ -327,7 +327,7 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_lws, s_n_llhttp__internal__n_header_value_almost_done, s_n_llhttp__internal__n_header_value_lenient, - s_n_llhttp__internal__n_error_25, + s_n_llhttp__internal__n_error_26, s_n_llhttp__internal__n_header_value_otherwise, s_n_llhttp__internal__n_header_value_connection_token, s_n_llhttp__internal__n_header_value_connection_ws, @@ -335,12 +335,12 @@ 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_27, s_n_llhttp__internal__n_error_28, + s_n_llhttp__internal__n_error_29, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, + s_n_llhttp__internal__n_error_31, s_n_llhttp__internal__n_error_30, - s_n_llhttp__internal__n_error_29, s_n_llhttp__internal__n_header_value_te_token_ows, s_n_llhttp__internal__n_header_value, s_n_llhttp__internal__n_header_value_te_token, @@ -775,7 +775,7 @@ int llhttp__internal__c_update_header_state_7( return 0; } -int llhttp__internal__c_test_flags_7( +int llhttp__internal__c_test_flags_8( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -816,7 +816,7 @@ int llhttp__internal__c_or_flags_15( return 0; } -int llhttp__internal__c_test_flags_8( +int llhttp__internal__c_test_flags_9( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -1606,10 +1606,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case 9: { - goto s_n_llhttp__internal__n_invoke_load_header_state_3; + goto s_n_llhttp__internal__n_invoke_test_flags_6; } case ' ': { - goto s_n_llhttp__internal__n_invoke_load_header_state_3; + goto s_n_llhttp__internal__n_invoke_test_flags_6; } default: { goto s_n_llhttp__internal__n_invoke_load_header_state_4; @@ -1629,7 +1629,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_24; + goto s_n_llhttp__internal__n_error_25; } } /* UNREACHABLE */; @@ -1655,8 +1655,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_26: + s_n_llhttp__internal__n_error_26: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -1675,7 +1675,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_6; + goto s_n_llhttp__internal__n_invoke_test_flags_7; } } /* UNREACHABLE */; @@ -1852,8 +1852,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_27: - s_n_llhttp__internal__n_error_27: { + case s_n_llhttp__internal__n_error_28: + s_n_llhttp__internal__n_error_28: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -1862,8 +1862,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_28: - s_n_llhttp__internal__n_error_28: { + case s_n_llhttp__internal__n_error_29: + s_n_llhttp__internal__n_error_29: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -1958,8 +1958,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_30: - s_n_llhttp__internal__n_error_30: { + case s_n_llhttp__internal__n_error_31: + s_n_llhttp__internal__n_error_31: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -1968,8 +1968,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_29: - s_n_llhttp__internal__n_error_29: { + case s_n_llhttp__internal__n_error_30: + s_n_llhttp__internal__n_error_30: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -2197,7 +2197,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2; } default: { - goto s_n_llhttp__internal__n_error_31; + goto s_n_llhttp__internal__n_error_32; } } /* UNREACHABLE */; @@ -2577,7 +2577,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_32; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -2602,7 +2602,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_32; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -2619,7 +2619,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_33; + goto s_n_llhttp__internal__n_error_34; } } /* UNREACHABLE */; @@ -2640,7 +2640,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_33; + goto s_n_llhttp__internal__n_error_34; } } /* UNREACHABLE */; @@ -2703,7 +2703,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_34; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -2720,7 +2720,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_35; + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -2783,7 +2783,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_36; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -2807,7 +2807,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_38; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -2831,7 +2831,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_38; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -2856,7 +2856,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_38; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -2947,7 +2947,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_fragment; } default: { - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } } /* UNREACHABLE */; @@ -3008,7 +3008,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_40; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; @@ -3046,7 +3046,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_42; } } /* UNREACHABLE */; @@ -3171,10 +3171,10 @@ static llparse_state_t llhttp__internal__run( } case 8: { p++; - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_43; } default: { - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -3233,7 +3233,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_44; + goto s_n_llhttp__internal__n_error_45; } } /* UNREACHABLE */; @@ -3250,7 +3250,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -3268,7 +3268,7 @@ static llparse_state_t llhttp__internal__run( } case 10: { p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_46; } case 12: { p++; @@ -3276,18 +3276,18 @@ static llparse_state_t llhttp__internal__run( } case 13: { p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_46; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_46; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -3333,7 +3333,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_46; } case 3: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -3343,7 +3343,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_47; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -3379,7 +3379,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_46; } case 3: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -3388,7 +3388,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_48; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -3486,7 +3486,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_49; + goto s_n_llhttp__internal__n_error_50; } } /* UNREACHABLE */; @@ -3511,7 +3511,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3536,7 +3536,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3561,7 +3561,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3586,7 +3586,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3604,7 +3604,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3625,7 +3625,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3646,7 +3646,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3671,7 +3671,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3696,7 +3696,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3721,7 +3721,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3746,7 +3746,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3771,7 +3771,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3792,7 +3792,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3817,7 +3817,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3842,7 +3842,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3867,7 +3867,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3892,7 +3892,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3910,7 +3910,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3931,7 +3931,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3952,7 +3952,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -3977,7 +3977,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4006,7 +4006,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4031,7 +4031,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4056,7 +4056,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4081,7 +4081,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4106,7 +4106,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4131,7 +4131,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4156,7 +4156,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4177,7 +4177,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4194,7 +4194,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4216,7 +4216,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4241,7 +4241,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4263,7 +4263,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4292,7 +4292,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4317,7 +4317,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4342,7 +4342,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4363,7 +4363,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4380,7 +4380,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4405,7 +4405,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4430,7 +4430,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4455,7 +4455,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4480,7 +4480,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4505,7 +4505,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4530,7 +4530,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4555,7 +4555,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4580,7 +4580,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4601,7 +4601,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4626,7 +4626,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4651,7 +4651,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4668,7 +4668,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4741,7 +4741,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_58; + goto s_n_llhttp__internal__n_error_59; } } /* UNREACHABLE */; @@ -4758,7 +4758,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -4833,7 +4833,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_52; + goto s_n_llhttp__internal__n_error_53; } } /* UNREACHABLE */; @@ -4913,7 +4913,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_53; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -4976,7 +4976,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_54; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -4993,7 +4993,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_55; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; @@ -5056,7 +5056,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_56; + goto s_n_llhttp__internal__n_error_57; } } /* UNREACHABLE */; @@ -5080,7 +5080,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_59; + goto s_n_llhttp__internal__n_error_60; } } /* UNREACHABLE */; @@ -5105,7 +5105,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_57; + goto s_n_llhttp__internal__n_error_58; } } /* UNREACHABLE */; @@ -5129,7 +5129,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_57; + goto s_n_llhttp__internal__n_error_58; } } /* UNREACHABLE */; @@ -5150,7 +5150,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_57; + goto s_n_llhttp__internal__n_error_58; } } /* UNREACHABLE */; @@ -5167,7 +5167,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_57; + goto s_n_llhttp__internal__n_error_58; } } /* UNREACHABLE */; @@ -5236,7 +5236,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_46: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -5880,6 +5880,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_24: { + state->error = 0xa; + state->reason = "Unexpected whitespace after header value"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags_6: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_load_header_state_3; + default: + goto s_n_llhttp__internal__n_error_24; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_update_header_state_2: { switch (llhttp__internal__c_update_header_state(state, p, endp)) { default: @@ -5936,7 +5955,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_24: { + s_n_llhttp__internal__n_error_25: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -6008,14 +6027,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_26; return s_error; } - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_26; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_6: { + s_n_llhttp__internal__n_invoke_test_flags_7: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; @@ -6123,10 +6142,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_27; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_28; return s_error; } - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_28; /* UNREACHABLE */; abort(); } @@ -6158,14 +6177,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_28; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_29; return s_error; } - goto s_n_llhttp__internal__n_error_28; + goto s_n_llhttp__internal__n_error_29; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_27: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -6174,12 +6193,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_7: { - switch (llhttp__internal__c_test_flags_7(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_8: { + switch (llhttp__internal__c_test_flags_8(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_26; + goto s_n_llhttp__internal__n_error_27; } /* UNREACHABLE */; abort(); @@ -6194,11 +6213,11 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) (p + 1); - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_31; return s_error; } p++; - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_31; /* UNREACHABLE */; abort(); } @@ -6220,15 +6239,15 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) (p + 1); - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_29; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30; return s_error; } p++; - goto s_n_llhttp__internal__n_error_29; + goto s_n_llhttp__internal__n_error_30; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_9: { + s_n_llhttp__internal__n_invoke_test_flags_10: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7; @@ -6241,7 +6260,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_type_1: { switch (llhttp__internal__c_load_type(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_9; + goto s_n_llhttp__internal__n_invoke_test_flags_10; default: goto s_n_llhttp__internal__n_header_value_te_chunked; } @@ -6272,7 +6291,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_10: { + s_n_llhttp__internal__n_invoke_test_flags_11: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8; @@ -6285,7 +6304,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_type_2: { switch (llhttp__internal__c_load_type(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_10; + goto s_n_llhttp__internal__n_invoke_test_flags_11; default: goto s_n_llhttp__internal__n_invoke_or_flags_17; } @@ -6300,8 +6319,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_8: { - switch (llhttp__internal__c_test_flags_8(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_9: { + switch (llhttp__internal__c_test_flags_9(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_invoke_load_type_2; default: @@ -6323,9 +6342,9 @@ 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_7; - case 3: goto s_n_llhttp__internal__n_invoke_test_flags_8; + case 3: + goto s_n_llhttp__internal__n_invoke_test_flags_9; case 4: goto s_n_llhttp__internal__n_invoke_or_flags_18; default: @@ -6370,7 +6389,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_32: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -6436,7 +6455,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_33: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -6462,7 +6481,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_34: { state->error = 0x9; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -6479,7 +6498,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_35: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6488,7 +6507,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_36: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6505,7 +6524,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_37: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6514,7 +6533,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_39: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -6523,7 +6542,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_38: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -6535,7 +6554,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_37; + goto s_n_llhttp__internal__n_error_38; default: goto s_n_llhttp__internal__n_req_http_major; } @@ -6610,7 +6629,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_40: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -6670,7 +6689,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_41: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -6679,7 +6698,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_42: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -6790,7 +6809,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_43: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -6799,7 +6818,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_44: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6808,7 +6827,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_45: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6817,7 +6836,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_47: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6826,7 +6845,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_48: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6835,7 +6854,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_48: { + s_n_llhttp__internal__n_error_49: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -6854,7 +6873,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_49: { + s_n_llhttp__internal__n_error_50: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -6871,7 +6890,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_58: { + s_n_llhttp__internal__n_error_59: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -6880,7 +6899,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_50: { + s_n_llhttp__internal__n_error_51: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -6892,14 +6911,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_50; + goto s_n_llhttp__internal__n_error_51; default: goto s_n_llhttp__internal__n_res_status_code; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_51: { + s_n_llhttp__internal__n_error_52: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -6944,7 +6963,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_52: { + s_n_llhttp__internal__n_error_53: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -6961,7 +6980,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_53: { + s_n_llhttp__internal__n_error_54: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -6978,7 +6997,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_54: { + s_n_llhttp__internal__n_error_55: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6987,7 +7006,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_55: { + s_n_llhttp__internal__n_error_56: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -7004,7 +7023,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_56: { + s_n_llhttp__internal__n_error_57: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -7013,7 +7032,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_59: { + s_n_llhttp__internal__n_error_60: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -7038,7 +7057,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_57: { + s_n_llhttp__internal__n_error_58: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; @@ -7472,7 +7491,7 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_lws, s_n_llhttp__internal__n_header_value_almost_done, s_n_llhttp__internal__n_header_value_lenient, - s_n_llhttp__internal__n_error_19, + s_n_llhttp__internal__n_error_20, s_n_llhttp__internal__n_header_value_otherwise, s_n_llhttp__internal__n_header_value_connection_token, s_n_llhttp__internal__n_header_value_connection_ws, @@ -7480,12 +7499,12 @@ 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_21, s_n_llhttp__internal__n_error_22, + s_n_llhttp__internal__n_error_23, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, + s_n_llhttp__internal__n_error_25, s_n_llhttp__internal__n_error_24, - s_n_llhttp__internal__n_error_23, s_n_llhttp__internal__n_header_value_te_token_ows, s_n_llhttp__internal__n_header_value, s_n_llhttp__internal__n_header_value_te_token, @@ -7915,7 +7934,7 @@ int llhttp__internal__c_update_header_state_7( return 0; } -int llhttp__internal__c_test_flags_7( +int llhttp__internal__c_test_flags_8( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -7956,7 +7975,7 @@ int llhttp__internal__c_or_flags_15( return 0; } -int llhttp__internal__c_test_flags_8( +int llhttp__internal__c_test_flags_9( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -8697,10 +8716,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case 9: { - goto s_n_llhttp__internal__n_invoke_load_header_state_3; + goto s_n_llhttp__internal__n_invoke_test_flags_6; } case ' ': { - goto s_n_llhttp__internal__n_invoke_load_header_state_3; + goto s_n_llhttp__internal__n_invoke_test_flags_6; } default: { goto s_n_llhttp__internal__n_invoke_load_header_state_4; @@ -8720,7 +8739,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_18; + goto s_n_llhttp__internal__n_error_19; } } /* UNREACHABLE */; @@ -8746,8 +8765,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_20: + s_n_llhttp__internal__n_error_20: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -8766,7 +8785,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_6; + goto s_n_llhttp__internal__n_invoke_test_flags_7; } } /* UNREACHABLE */; @@ -8943,8 +8962,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_21: - s_n_llhttp__internal__n_error_21: { + case s_n_llhttp__internal__n_error_22: + s_n_llhttp__internal__n_error_22: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -8953,8 +8972,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_22: - s_n_llhttp__internal__n_error_22: { + case s_n_llhttp__internal__n_error_23: + s_n_llhttp__internal__n_error_23: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -9049,8 +9068,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_25: + s_n_llhttp__internal__n_error_25: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -9059,8 +9078,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_23: - s_n_llhttp__internal__n_error_23: { + case s_n_llhttp__internal__n_error_24: + s_n_llhttp__internal__n_error_24: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -9288,7 +9307,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2; } default: { - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_26; } } /* UNREACHABLE */; @@ -9642,7 +9661,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_26; + goto s_n_llhttp__internal__n_error_27; } } /* UNREACHABLE */; @@ -9659,7 +9678,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_27; + goto s_n_llhttp__internal__n_error_28; } } /* UNREACHABLE */; @@ -9680,7 +9699,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_27; + goto s_n_llhttp__internal__n_error_28; } } /* UNREACHABLE */; @@ -9743,7 +9762,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_28; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; @@ -9760,7 +9779,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_29; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -9823,7 +9842,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_30; + goto s_n_llhttp__internal__n_error_31; } } /* UNREACHABLE */; @@ -9847,7 +9866,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_32; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -9871,7 +9890,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_32; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -9896,7 +9915,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_32; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -9950,7 +9969,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_33; + goto s_n_llhttp__internal__n_error_34; } } /* UNREACHABLE */; @@ -10007,7 +10026,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_34; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -10037,7 +10056,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -10178,10 +10197,10 @@ static llparse_state_t llhttp__internal__run( } case 7: { p++; - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_37; } default: { - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -10236,7 +10255,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_38; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -10253,7 +10272,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; @@ -10267,22 +10286,22 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } case 13: { p++; - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; @@ -10324,7 +10343,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } case 2: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -10334,7 +10353,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_42; } } /* UNREACHABLE */; @@ -10366,7 +10385,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_40; } case 2: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -10375,7 +10394,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_43; } } /* UNREACHABLE */; @@ -10431,7 +10450,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_43; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -10456,7 +10475,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10481,7 +10500,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10506,7 +10525,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10531,7 +10550,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10549,7 +10568,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10570,7 +10589,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10591,7 +10610,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10616,7 +10635,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10641,7 +10660,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10666,7 +10685,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10691,7 +10710,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10716,7 +10735,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10737,7 +10756,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10762,7 +10781,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10787,7 +10806,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10812,7 +10831,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10837,7 +10856,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10855,7 +10874,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10876,7 +10895,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10897,7 +10916,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10922,7 +10941,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10951,7 +10970,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -10976,7 +10995,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11001,7 +11020,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11026,7 +11045,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11051,7 +11070,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11076,7 +11095,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11101,7 +11120,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11122,7 +11141,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11139,7 +11158,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11161,7 +11180,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11186,7 +11205,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11208,7 +11227,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11237,7 +11256,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11262,7 +11281,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11287,7 +11306,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11308,7 +11327,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11325,7 +11344,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11350,7 +11369,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11375,7 +11394,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11400,7 +11419,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11425,7 +11444,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11450,7 +11469,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11475,7 +11494,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11500,7 +11519,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11525,7 +11544,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11546,7 +11565,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11571,7 +11590,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11596,7 +11615,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11613,7 +11632,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11686,7 +11705,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_51; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -11771,7 +11790,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_45; + goto s_n_llhttp__internal__n_error_46; } } /* UNREACHABLE */; @@ -11851,7 +11870,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_46; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11914,7 +11933,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_47; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11931,7 +11950,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_48; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -11994,7 +12013,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_49; + goto s_n_llhttp__internal__n_error_50; } } /* UNREACHABLE */; @@ -12018,7 +12037,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_52; + goto s_n_llhttp__internal__n_error_53; } } /* UNREACHABLE */; @@ -12043,7 +12062,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_50; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -12067,7 +12086,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_50; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -12088,7 +12107,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_50; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -12105,7 +12124,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_50; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -12165,7 +12184,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */ abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_40: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -12756,6 +12775,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_18: { + state->error = 0xa; + state->reason = "Unexpected whitespace after header value"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags_6: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_load_header_state_3; + default: + goto s_n_llhttp__internal__n_error_18; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_update_header_state_2: { switch (llhttp__internal__c_update_header_state(state, p, endp)) { default: @@ -12812,7 +12850,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 = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -12884,14 +12922,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_20; return s_error; } - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_20; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_6: { + s_n_llhttp__internal__n_invoke_test_flags_7: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; @@ -12999,10 +13037,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_21; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_22; return s_error; } - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_22; /* UNREACHABLE */; abort(); } @@ -13034,14 +13072,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_22; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_23; return s_error; } - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_23; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_error_21: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -13050,12 +13088,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_7: { - switch (llhttp__internal__c_test_flags_7(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_8: { + switch (llhttp__internal__c_test_flags_8(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_21; } /* UNREACHABLE */; abort(); @@ -13070,11 +13108,11 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) (p + 1); - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_25; return s_error; } p++; - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_25; /* UNREACHABLE */; abort(); } @@ -13096,15 +13134,15 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) (p + 1); - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_23; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24; return s_error; } p++; - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_24; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_9: { + s_n_llhttp__internal__n_invoke_test_flags_10: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7; @@ -13117,7 +13155,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_type_1: { switch (llhttp__internal__c_load_type(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_9; + goto s_n_llhttp__internal__n_invoke_test_flags_10; default: goto s_n_llhttp__internal__n_header_value_te_chunked; } @@ -13148,7 +13186,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_10: { + s_n_llhttp__internal__n_invoke_test_flags_11: { switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8; @@ -13161,7 +13199,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_type_2: { switch (llhttp__internal__c_load_type(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_10; + goto s_n_llhttp__internal__n_invoke_test_flags_11; default: goto s_n_llhttp__internal__n_invoke_or_flags_17; } @@ -13176,8 +13214,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_8: { - switch (llhttp__internal__c_test_flags_8(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_9: { + switch (llhttp__internal__c_test_flags_9(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_invoke_load_type_2; default: @@ -13199,9 +13237,9 @@ 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_7; - case 3: goto s_n_llhttp__internal__n_invoke_test_flags_8; + case 3: + goto s_n_llhttp__internal__n_invoke_test_flags_9; case 4: goto s_n_llhttp__internal__n_invoke_or_flags_18; default: @@ -13246,7 +13284,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_25: { + s_n_llhttp__internal__n_error_26: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -13312,7 +13350,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_27: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -13338,7 +13376,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_28: { state->error = 0x9; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -13355,7 +13393,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_28: { + s_n_llhttp__internal__n_error_29: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -13364,7 +13402,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_30: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -13381,7 +13419,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_31: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -13390,7 +13428,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_33: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -13399,7 +13437,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_32: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -13411,7 +13449,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_31; + goto s_n_llhttp__internal__n_error_32; default: goto s_n_llhttp__internal__n_req_http_major; } @@ -13486,7 +13524,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_34: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -13546,7 +13584,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_35: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -13555,7 +13593,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_36: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -13666,7 +13704,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_37: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -13675,7 +13713,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_38: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13684,7 +13722,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_39: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13693,7 +13731,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_41: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13702,7 +13740,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_42: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13711,7 +13749,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_43: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -13730,7 +13768,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_44: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -13747,7 +13785,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_51: { + s_n_llhttp__internal__n_error_52: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -13756,7 +13794,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_45: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -13768,7 +13806,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_44; + goto s_n_llhttp__internal__n_error_45; default: goto s_n_llhttp__internal__n_res_status_code; } @@ -13811,7 +13849,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_46: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -13828,7 +13866,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_47: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -13845,7 +13883,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_48: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -13854,7 +13892,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_48: { + s_n_llhttp__internal__n_error_49: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -13871,7 +13909,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_49: { + s_n_llhttp__internal__n_error_50: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -13880,7 +13918,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_52: { + s_n_llhttp__internal__n_error_53: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -13905,7 +13943,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_50: { + s_n_llhttp__internal__n_error_51: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; diff --git a/test/parallel/test-http-multi-line-headers.js b/test/parallel/test-http-multi-line-headers.js index 99c48cd97b58b9..2381c1726224d6 100644 --- a/test/parallel/test-http-multi-line-headers.js +++ b/test/parallel/test-http-multi-line-headers.js @@ -46,7 +46,8 @@ const server = net.createServer(function(conn) { server.listen(0, common.mustCall(function() { http.get({ host: '127.0.0.1', - port: this.address().port + port: this.address().port, + insecureHTTPParser: true }, common.mustCall(function(res) { assert.strictEqual(res.headers['content-type'], 'text/plain; x-unix-mode=0600; name="hello.txt"'); diff --git a/test/parallel/test-http-transfer-encoding-smuggling.js b/test/parallel/test-http-transfer-encoding-smuggling.js index a6677b46155787..8e889cbd64811b 100644 --- a/test/parallel/test-http-transfer-encoding-smuggling.js +++ b/test/parallel/test-http-transfer-encoding-smuggling.js @@ -71,10 +71,7 @@ const net = require('net'); '', ].join('\r\n'); - const server = http.createServer(common.mustCall((request, response) => { - assert.notStrictEqual(request.url, '/admin'); - response.end('hello world'); - }), 1); + const server = http.createServer(common.mustNotCall()); server.listen(0, common.mustSucceed(() => { const client = net.connect(server.address().port, 'localhost');