diff options
Diffstat (limited to '')
-rw-r--r-- | third-party/llhttp/README.md | 23 | ||||
-rw-r--r-- | third-party/llhttp/include/llhttp.h | 44 | ||||
-rw-r--r-- | third-party/llhttp/src/api.c | 18 | ||||
-rw-r--r-- | third-party/llhttp/src/http.c | 26 | ||||
-rw-r--r-- | third-party/llhttp/src/llhttp.c | 2390 |
5 files changed, 1600 insertions, 901 deletions
diff --git a/third-party/llhttp/README.md b/third-party/llhttp/README.md index e982ed0..28653aa 100644 --- a/third-party/llhttp/README.md +++ b/third-party/llhttp/README.md @@ -363,6 +363,16 @@ With this flag only a CR is required to terminate such sections. **Enabling this flag can pose a security issue since you will be exposed to request smuggling attacks. USE WITH CAUTION!** +### `void llhttp_set_lenient_optional_cr_before_lf(llhttp_t* parser, int enabled)` + +Enables/disables lenient handling of line separators. + +Normally `llhttp` would error when a LF is not preceded by CR when terminating the +request line, the status line, the headers, a chunk header or a chunk data. +With this flag only a LF is required to terminate such sections. + +**Enabling this flag can pose a security issue since you will be exposed to request smuggling attacks. USE WITH CAUTION!** + ### `void llhttp_set_lenient_optional_crlf_after_chunk(llhttp_t* parser, int enabled)` Enables/disables lenient handling of chunks not separated via CRLF. @@ -373,12 +383,21 @@ With this flag the new chunk can start immediately after the previous one. **Enabling this flag can pose a security issue since you will be exposed to request smuggling attacks. USE WITH CAUTION!** +### `void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled)` + +Enables/disables lenient handling of spaces after chunk size. + +Normally `llhttp` would error when after a chunk size is followed by one or more spaces are present instead of a CRLF or `;`. +With this flag this check is disabled. + +**Enabling this flag can pose a security issue since you will be exposed to request smuggling attacks. USE WITH CAUTION!** + ## Build Instructions Make sure you have [Node.js](https://nodejs.org/), npm and npx installed. Then under project directory run: ```sh -npm install +npm ci make ``` @@ -432,7 +451,7 @@ _Note that using the git repo directly (e.g., via a git repo url and tag) will n 1. Ensure that `Clang` and `make` are in your system path. 2. Using Git Bash, clone the repo to your preferred location. -3. Cd into the cloned directory and run `npm install` +3. Cd into the cloned directory and run `npm ci` 5. Run `make` 6. Your `repo/build` directory should now have `libllhttp.a` and `libllhttp.so` static and dynamic libraries. 7. When building your executable, you can link to these libraries. Make sure to set the build folder as an include path when building so you can reference the declarations in `repo/build/llhttp.h`. diff --git a/third-party/llhttp/include/llhttp.h b/third-party/llhttp/include/llhttp.h index 6588ae5..6919693 100644 --- a/third-party/llhttp/include/llhttp.h +++ b/third-party/llhttp/include/llhttp.h @@ -3,8 +3,8 @@ #define INCLUDE_LLHTTP_H_ #define LLHTTP_VERSION_MAJOR 9 -#define LLHTTP_VERSION_MINOR 0 -#define LLHTTP_VERSION_PATCH 1 +#define LLHTTP_VERSION_MINOR 2 +#define LLHTTP_VERSION_PATCH 0 #ifndef INCLUDE_LLHTTP_ITSELF_H_ #define INCLUDE_LLHTTP_ITSELF_H_ @@ -30,7 +30,7 @@ struct llhttp__internal_s { uint8_t http_major; uint8_t http_minor; uint8_t header_state; - uint8_t lenient_flags; + uint16_t lenient_flags; uint8_t upgrade; uint8_t finish; uint16_t flags; @@ -115,7 +115,9 @@ enum llhttp_lenient_flags { LENIENT_VERSION = 0x10, LENIENT_DATA_AFTER_CLOSE = 0x20, LENIENT_OPTIONAL_LF_AFTER_CR = 0x40, - LENIENT_OPTIONAL_CRLF_AFTER_CHUNK = 0x80 + LENIENT_OPTIONAL_CRLF_AFTER_CHUNK = 0x80, + LENIENT_OPTIONAL_CR_BEFORE_LF = 0x100, + LENIENT_SPACES_AFTER_CHUNK_SIZE = 0x200 }; typedef enum llhttp_lenient_flags llhttp_lenient_flags_t; @@ -179,7 +181,8 @@ enum llhttp_method { HTTP_SET_PARAMETER = 42, HTTP_REDIRECT = 43, HTTP_RECORD = 44, - HTTP_FLUSH = 45 + HTTP_FLUSH = 45, + HTTP_QUERY = 46 }; typedef enum llhttp_method llhttp_method_t; @@ -360,6 +363,7 @@ typedef enum llhttp_status llhttp_status_t; XX(31, LINK, LINK) \ XX(32, UNLINK, UNLINK) \ XX(33, SOURCE, SOURCE) \ + XX(46, QUERY, QUERY) \ #define RTSP_METHOD_MAP(XX) \ @@ -426,6 +430,7 @@ typedef enum llhttp_status llhttp_status_t; XX(43, REDIRECT, REDIRECT) \ XX(44, RECORD, RECORD) \ XX(45, FLUSH, FLUSH) \ + XX(46, QUERY, QUERY) \ #define HTTP_STATUS_MAP(XX) \ @@ -545,6 +550,8 @@ extern "C" { #if defined(__wasm__) #define LLHTTP_EXPORT __attribute__((visibility("default"))) +#elif defined(_WIN32) +#define LLHTTP_EXPORT __declspec(dllexport) #else #define LLHTTP_EXPORT #endif @@ -807,7 +814,7 @@ void llhttp_set_lenient_keep_alive(llhttp_t* parser, int enabled); * avoid request smuggling. * With this flag the extra value will be parsed normally. * - * **Enabling this flag can pose a security issue since you will be exposed to + * **Enabling this flag can pose a security issue since you will be exposed to * request smuggling attacks. USE WITH CAUTION!** */ LLHTTP_EXPORT @@ -850,6 +857,19 @@ void llhttp_set_lenient_data_after_close(llhttp_t* parser, int enabled); LLHTTP_EXPORT void llhttp_set_lenient_optional_lf_after_cr(llhttp_t* parser, int enabled); +/* + * Enables/disables lenient handling of line separators. + * + * Normally `llhttp` would error when a LF is not preceded by CR when terminating the + * request line, the status line, the headers, a chunk header or a chunk data. + * With this flag only a LF is required to terminate such sections. + * + * **Enabling this flag can pose a security issue since you will be exposed to + * request smuggling attacks. USE WITH CAUTION!** + */ +LLHTTP_EXPORT +void llhttp_set_lenient_optional_cr_before_lf(llhttp_t* parser, int enabled); + /* Enables/disables lenient handling of chunks not separated via CRLF. * * Normally `llhttp` would error when after a chunk data a CRLF is missing before @@ -862,6 +882,18 @@ void llhttp_set_lenient_optional_lf_after_cr(llhttp_t* parser, int enabled); LLHTTP_EXPORT void llhttp_set_lenient_optional_crlf_after_chunk(llhttp_t* parser, int enabled); +/* Enables/disables lenient handling of spaces after chunk size. + * + * Normally `llhttp` would error when after a chunk size is followed by one or more + * spaces are present instead of a CRLF or `;`. + * With this flag this check is disabled. + * + * **Enabling this flag can pose a security issue since you will be exposed to + * request smuggling attacks. USE WITH CAUTION!** + */ +LLHTTP_EXPORT +void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/third-party/llhttp/src/api.c b/third-party/llhttp/src/api.c index e0d0385..8c2ce3d 100644 --- a/third-party/llhttp/src/api.c +++ b/third-party/llhttp/src/api.c @@ -126,7 +126,7 @@ void llhttp_reset(llhttp_t* parser) { llhttp_type_t type = parser->type; const llhttp_settings_t* settings = parser->settings; void* data = parser->data; - uint8_t lenient_flags = parser->lenient_flags; + uint16_t lenient_flags = parser->lenient_flags; llhttp__internal_init(parser); @@ -315,6 +315,22 @@ void llhttp_set_lenient_optional_crlf_after_chunk(llhttp_t* parser, int enabled) } } +void llhttp_set_lenient_optional_cr_before_lf(llhttp_t* parser, int enabled) { + if (enabled) { + parser->lenient_flags |= LENIENT_OPTIONAL_CR_BEFORE_LF; + } else { + parser->lenient_flags &= ~LENIENT_OPTIONAL_CR_BEFORE_LF; + } +} + +void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled) { + if (enabled) { + parser->lenient_flags |= LENIENT_SPACES_AFTER_CHUNK_SIZE; + } else { + parser->lenient_flags &= ~LENIENT_SPACES_AFTER_CHUNK_SIZE; + } +} + /* Callbacks */ diff --git a/third-party/llhttp/src/http.c b/third-party/llhttp/src/http.c index 3a66044..1ab91a5 100644 --- a/third-party/llhttp/src/http.c +++ b/third-party/llhttp/src/http.c @@ -39,13 +39,33 @@ int llhttp__after_headers_complete(llhttp_t* parser, const char* p, int hasBody; hasBody = parser->flags & F_CHUNKED || parser->content_length > 0; - if (parser->upgrade && (parser->method == HTTP_CONNECT || - (parser->flags & F_SKIPBODY) || !hasBody)) { + if ( + (parser->upgrade && (parser->method == HTTP_CONNECT || + (parser->flags & F_SKIPBODY) || !hasBody)) || + /* See RFC 2616 section 4.4 - 1xx e.g. Continue */ + (parser->type == HTTP_RESPONSE && parser->status_code == 101) + ) { /* Exit, the rest of the message is in a different protocol. */ return 1; } - if (parser->flags & F_SKIPBODY) { + if (parser->type == HTTP_RESPONSE && parser->status_code == 100) { + /* No body, restart as the message is complete */ + return 0; + } + + /* See RFC 2616 section 4.4 */ + if ( + parser->flags & F_SKIPBODY || /* response to a HEAD request */ + ( + parser->type == HTTP_RESPONSE && ( + parser->status_code == 102 || /* Processing */ + parser->status_code == 103 || /* Early Hints */ + parser->status_code == 204 || /* No Content */ + parser->status_code == 304 /* Not Modified */ + ) + ) + ) { return 0; } else if (parser->flags & F_CHUNKED) { /* chunked encoding - ignore Content-Length header, prepare for a chunk */ diff --git a/third-party/llhttp/src/llhttp.c b/third-party/llhttp/src/llhttp.c index 03f6d57..c08de64 100644 --- a/third-party/llhttp/src/llhttp.c +++ b/third-party/llhttp/src/llhttp.c @@ -22,148 +22,148 @@ typedef int (*llhttp__internal__span_cb)( llhttp__internal_t*, const char*, const char*); static const unsigned char llparse_blob0[] = { - 0xd, 0xa -}; -static const unsigned char llparse_blob1[] = { 'o', 'n' }; -static const unsigned char llparse_blob2[] = { +static const unsigned char llparse_blob1[] = { 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob3[] = { +static const unsigned char llparse_blob2[] = { 'l', 'o', 's', 'e' }; -static const unsigned char llparse_blob4[] = { +static const unsigned char llparse_blob3[] = { 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e' }; -static const unsigned char llparse_blob5[] = { +static const unsigned char llparse_blob4[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob6[] = { +static const unsigned char llparse_blob5[] = { 'c', 'h', 'u', 'n', 'k', 'e', 'd' }; #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob7[] = { +static const unsigned char ALIGN(16) llparse_blob6[] = { 0x9, 0x9, ' ', '~', 0x80, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; #endif /* __SSE4_2__ */ #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob8[] = { +static const unsigned char ALIGN(16) llparse_blob7[] = { '!', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A', 'Z', '^', 'z', '|', '|' }; #endif /* __SSE4_2__ */ #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob9[] = { +static const unsigned char ALIGN(16) llparse_blob8[] = { '~', '~', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; #endif /* __SSE4_2__ */ -static const unsigned char llparse_blob10[] = { +static const unsigned char llparse_blob9[] = { 'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h' }; -static const unsigned char llparse_blob11[] = { +static const unsigned char llparse_blob10[] = { 'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob12[] = { +static const unsigned char llparse_blob11[] = { 'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g' }; -static const unsigned char llparse_blob13[] = { +static const unsigned char llparse_blob12[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob14[] = { +static const unsigned char llparse_blob13[] = { 'T', 'T', 'P', '/' }; -static const unsigned char llparse_blob15[] = { +static const unsigned char llparse_blob14[] = { 0xd, 0xa, 0xd, 0xa, 'S', 'M', 0xd, 0xa, 0xd, 0xa }; -static const unsigned char llparse_blob16[] = { +static const unsigned char llparse_blob15[] = { 'C', 'E', '/' }; -static const unsigned char llparse_blob17[] = { +static const unsigned char llparse_blob16[] = { 'T', 'S', 'P', '/' }; -static const unsigned char llparse_blob18[] = { +static const unsigned char llparse_blob17[] = { 'N', 'O', 'U', 'N', 'C', 'E' }; -static const unsigned char llparse_blob19[] = { +static const unsigned char llparse_blob18[] = { 'I', 'N', 'D' }; -static const unsigned char llparse_blob20[] = { +static const unsigned char llparse_blob19[] = { 'E', 'C', 'K', 'O', 'U', 'T' }; -static const unsigned char llparse_blob21[] = { +static const unsigned char llparse_blob20[] = { 'N', 'E', 'C', 'T' }; -static const unsigned char llparse_blob22[] = { +static const unsigned char llparse_blob21[] = { 'E', 'T', 'E' }; -static const unsigned char llparse_blob23[] = { +static const unsigned char llparse_blob22[] = { 'C', 'R', 'I', 'B', 'E' }; -static const unsigned char llparse_blob24[] = { +static const unsigned char llparse_blob23[] = { 'L', 'U', 'S', 'H' }; -static const unsigned char llparse_blob25[] = { +static const unsigned char llparse_blob24[] = { 'E', 'T' }; -static const unsigned char llparse_blob26[] = { +static const unsigned char llparse_blob25[] = { 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' }; -static const unsigned char llparse_blob27[] = { +static const unsigned char llparse_blob26[] = { 'E', 'A', 'D' }; -static const unsigned char llparse_blob28[] = { +static const unsigned char llparse_blob27[] = { 'N', 'K' }; -static const unsigned char llparse_blob29[] = { +static const unsigned char llparse_blob28[] = { 'C', 'K' }; -static const unsigned char llparse_blob30[] = { +static const unsigned char llparse_blob29[] = { 'S', 'E', 'A', 'R', 'C', 'H' }; -static const unsigned char llparse_blob31[] = { +static const unsigned char llparse_blob30[] = { 'R', 'G', 'E' }; -static const unsigned char llparse_blob32[] = { +static const unsigned char llparse_blob31[] = { 'C', 'T', 'I', 'V', 'I', 'T', 'Y' }; -static const unsigned char llparse_blob33[] = { +static const unsigned char llparse_blob32[] = { 'L', 'E', 'N', 'D', 'A', 'R' }; -static const unsigned char llparse_blob34[] = { +static const unsigned char llparse_blob33[] = { 'V', 'E' }; -static const unsigned char llparse_blob35[] = { +static const unsigned char llparse_blob34[] = { 'O', 'T', 'I', 'F', 'Y' }; -static const unsigned char llparse_blob36[] = { +static const unsigned char llparse_blob35[] = { 'P', 'T', 'I', 'O', 'N', 'S' }; -static const unsigned char llparse_blob37[] = { +static const unsigned char llparse_blob36[] = { 'C', 'H' }; -static const unsigned char llparse_blob38[] = { +static const unsigned char llparse_blob37[] = { 'S', 'E' }; -static const unsigned char llparse_blob39[] = { +static const unsigned char llparse_blob38[] = { 'A', 'Y' }; -static const unsigned char llparse_blob40[] = { +static const unsigned char llparse_blob39[] = { 'S', 'T' }; -static const unsigned char llparse_blob41[] = { +static const unsigned char llparse_blob40[] = { 'I', 'N', 'D' }; -static const unsigned char llparse_blob42[] = { +static const unsigned char llparse_blob41[] = { 'A', 'T', 'C', 'H' }; -static const unsigned char llparse_blob43[] = { +static const unsigned char llparse_blob42[] = { 'G', 'E' }; +static const unsigned char llparse_blob43[] = { + 'U', 'E', 'R', 'Y' +}; static const unsigned char llparse_blob44[] = { 'I', 'N', 'D' }; @@ -229,7 +229,7 @@ struct llparse_match_s { }; typedef struct llparse_match_s llparse_match_t; -static llparse_match_t llparse__match_sequence_id( +static llparse_match_t llparse__match_sequence_to_lower( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp, const unsigned char* seq, uint32_t seq_len) { @@ -240,7 +240,7 @@ static llparse_match_t llparse__match_sequence_id( for (; p != endp; p++) { unsigned char current; - current = *p; + current = ((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p)); if (current == seq[index]) { if (++index == seq_len) { res.status = kMatchComplete; @@ -261,7 +261,7 @@ reset: return res; } -static llparse_match_t llparse__match_sequence_to_lower( +static llparse_match_t llparse__match_sequence_to_lower_unsafe( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp, const unsigned char* seq, uint32_t seq_len) { @@ -272,7 +272,7 @@ static llparse_match_t llparse__match_sequence_to_lower( for (; p != endp; p++) { unsigned char current; - current = ((*p) >= 'A' && (*p) <= 'Z' ? (*p | 0x20) : (*p)); + current = ((*p) | 0x20); if (current == seq[index]) { if (++index == seq_len) { res.status = kMatchComplete; @@ -293,7 +293,7 @@ reset: return res; } -static llparse_match_t llparse__match_sequence_to_lower_unsafe( +static llparse_match_t llparse__match_sequence_id( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp, const unsigned char* seq, uint32_t seq_len) { @@ -304,7 +304,7 @@ static llparse_match_t llparse__match_sequence_to_lower_unsafe( for (; p != endp; p++) { unsigned char current; - current = ((*p) | 0x20); + current = *p; if (current == seq[index]) { if (++index == seq_len) { res.status = kMatchComplete; @@ -330,23 +330,32 @@ enum llparse_state_e { s_n_llhttp__internal__n_closed, s_n_llhttp__internal__n_invoke_llhttp__after_message_complete, s_n_llhttp__internal__n_pause_1, + s_n_llhttp__internal__n_invoke_is_equal_upgrade, + s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2, + s_n_llhttp__internal__n_chunk_data_almost_done_1, s_n_llhttp__internal__n_chunk_data_almost_done, s_n_llhttp__internal__n_consume_content_length, s_n_llhttp__internal__n_span_start_llhttp__on_body, s_n_llhttp__internal__n_invoke_is_equal_content_length, s_n_llhttp__internal__n_chunk_size_almost_done, + s_n_llhttp__internal__n_invoke_test_lenient_flags_9, s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete, s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1, + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2, + s_n_llhttp__internal__n_invoke_test_lenient_flags_10, s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete, - s_n_llhttp__internal__n_chunk_extension_quoted_value_done, s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1, - s_n_llhttp__internal__n_error_21, - s_n_llhttp__internal__n_chunk_extension_quoted_value, + s_n_llhttp__internal__n_chunk_extension_quoted_value_done, s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2, - s_n_llhttp__internal__n_error_23, + s_n_llhttp__internal__n_error_30, + s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair, + s_n_llhttp__internal__n_error_31, + s_n_llhttp__internal__n_chunk_extension_quoted_value, + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3, + s_n_llhttp__internal__n_error_33, s_n_llhttp__internal__n_chunk_extension_value, s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_value, - s_n_llhttp__internal__n_error_24, + s_n_llhttp__internal__n_error_34, s_n_llhttp__internal__n_chunk_extension_name, s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name, s_n_llhttp__internal__n_chunk_extensions, @@ -354,8 +363,6 @@ enum llparse_state_e { s_n_llhttp__internal__n_chunk_size, s_n_llhttp__internal__n_chunk_size_digit, s_n_llhttp__internal__n_invoke_update_content_length_1, - s_n_llhttp__internal__n_invoke_is_equal_upgrade, - s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2, s_n_llhttp__internal__n_consume_content_length_1, s_n_llhttp__internal__n_span_start_llhttp__on_body_1, s_n_llhttp__internal__n_eof, @@ -370,8 +377,9 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_discard_ws_almost_done, s_n_llhttp__internal__n_header_value_lws, s_n_llhttp__internal__n_header_value_almost_done, + s_n_llhttp__internal__n_invoke_test_lenient_flags_17, s_n_llhttp__internal__n_header_value_lenient, - s_n_llhttp__internal__n_error_41, + s_n_llhttp__internal__n_error_53, 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, @@ -379,12 +387,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_43, - s_n_llhttp__internal__n_error_44, + s_n_llhttp__internal__n_error_55, + s_n_llhttp__internal__n_error_56, 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_46, - s_n_llhttp__internal__n_error_45, + s_n_llhttp__internal__n_error_58, + s_n_llhttp__internal__n_error_57, 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, @@ -392,6 +400,7 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_te_chunked, s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1, s_n_llhttp__internal__n_header_value_discard_ws, + s_n_llhttp__internal__n_invoke_load_header_state, s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete, s_n_llhttp__internal__n_header_field_general_otherwise, s_n_llhttp__internal__n_header_field_general, @@ -416,12 +425,12 @@ enum llparse_state_e { s_n_llhttp__internal__n_req_http_complete, s_n_llhttp__internal__n_invoke_load_method_1, s_n_llhttp__internal__n_invoke_llhttp__on_version_complete, - s_n_llhttp__internal__n_error_51, - s_n_llhttp__internal__n_error_57, + s_n_llhttp__internal__n_error_65, + s_n_llhttp__internal__n_error_72, s_n_llhttp__internal__n_req_http_minor, - s_n_llhttp__internal__n_error_58, + s_n_llhttp__internal__n_error_73, s_n_llhttp__internal__n_req_http_dot, - s_n_llhttp__internal__n_error_59, + s_n_llhttp__internal__n_error_74, s_n_llhttp__internal__n_req_http_major, s_n_llhttp__internal__n_span_start_llhttp__on_version, s_n_llhttp__internal__n_req_http_start_1, @@ -497,48 +506,49 @@ enum llparse_state_e { s_n_llhttp__internal__n_after_start_req_45, s_n_llhttp__internal__n_after_start_req_44, s_n_llhttp__internal__n_after_start_req_33, - s_n_llhttp__internal__n_after_start_req_48, + s_n_llhttp__internal__n_after_start_req_46, s_n_llhttp__internal__n_after_start_req_49, s_n_llhttp__internal__n_after_start_req_50, s_n_llhttp__internal__n_after_start_req_51, + s_n_llhttp__internal__n_after_start_req_52, + s_n_llhttp__internal__n_after_start_req_48, s_n_llhttp__internal__n_after_start_req_47, - s_n_llhttp__internal__n_after_start_req_46, - s_n_llhttp__internal__n_after_start_req_54, - s_n_llhttp__internal__n_after_start_req_56, - s_n_llhttp__internal__n_after_start_req_57, s_n_llhttp__internal__n_after_start_req_55, - s_n_llhttp__internal__n_after_start_req_53, + s_n_llhttp__internal__n_after_start_req_57, s_n_llhttp__internal__n_after_start_req_58, + s_n_llhttp__internal__n_after_start_req_56, + s_n_llhttp__internal__n_after_start_req_54, s_n_llhttp__internal__n_after_start_req_59, - s_n_llhttp__internal__n_after_start_req_52, - s_n_llhttp__internal__n_after_start_req_61, - s_n_llhttp__internal__n_after_start_req_62, s_n_llhttp__internal__n_after_start_req_60, - s_n_llhttp__internal__n_after_start_req_65, - s_n_llhttp__internal__n_after_start_req_67, - s_n_llhttp__internal__n_after_start_req_68, + s_n_llhttp__internal__n_after_start_req_53, + s_n_llhttp__internal__n_after_start_req_62, + s_n_llhttp__internal__n_after_start_req_63, + s_n_llhttp__internal__n_after_start_req_61, s_n_llhttp__internal__n_after_start_req_66, + s_n_llhttp__internal__n_after_start_req_68, s_n_llhttp__internal__n_after_start_req_69, + s_n_llhttp__internal__n_after_start_req_67, + s_n_llhttp__internal__n_after_start_req_70, + s_n_llhttp__internal__n_after_start_req_65, s_n_llhttp__internal__n_after_start_req_64, - s_n_llhttp__internal__n_after_start_req_63, s_n_llhttp__internal__n_after_start_req, s_n_llhttp__internal__n_span_start_llhttp__on_method_1, s_n_llhttp__internal__n_res_line_almost_done, + s_n_llhttp__internal__n_invoke_test_lenient_flags_29, s_n_llhttp__internal__n_res_status, s_n_llhttp__internal__n_span_start_llhttp__on_status, - s_n_llhttp__internal__n_res_status_start, s_n_llhttp__internal__n_res_status_code_otherwise, s_n_llhttp__internal__n_res_status_code_digit_3, s_n_llhttp__internal__n_res_status_code_digit_2, s_n_llhttp__internal__n_res_status_code_digit_1, s_n_llhttp__internal__n_res_after_version, s_n_llhttp__internal__n_invoke_llhttp__on_version_complete_1, - s_n_llhttp__internal__n_error_73, - s_n_llhttp__internal__n_error_85, + s_n_llhttp__internal__n_error_88, + s_n_llhttp__internal__n_error_102, s_n_llhttp__internal__n_res_http_minor, - s_n_llhttp__internal__n_error_86, + s_n_llhttp__internal__n_error_103, s_n_llhttp__internal__n_res_http_dot, - s_n_llhttp__internal__n_error_87, + s_n_llhttp__internal__n_error_104, s_n_llhttp__internal__n_res_http_major, s_n_llhttp__internal__n_span_start_llhttp__on_version_1, s_n_llhttp__internal__n_start_res, @@ -669,7 +679,21 @@ int llhttp__internal__c_test_lenient_flags( return (state->lenient_flags & 1) == 1; } -int llhttp__after_headers_complete( +int llhttp__internal__c_test_lenient_flags_1( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->lenient_flags & 256) == 256; +} + +int llhttp__internal__c_test_flags( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->flags & 128) == 128; +} + +int llhttp__on_chunk_complete( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); @@ -677,6 +701,13 @@ int llhttp__on_message_complete( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); +int llhttp__internal__c_is_equal_upgrade( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return state->upgrade == 1; +} + int llhttp__after_message_complete( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); @@ -719,6 +750,18 @@ int llhttp__internal__c_test_lenient_flags_3( return (state->lenient_flags & 32) == 32; } +int llhttp__before_headers_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + +int llhttp__on_headers_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + +int llhttp__after_headers_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_mul_add_content_length( llhttp__internal_t* state, const unsigned char* p, @@ -745,6 +788,13 @@ int llhttp__internal__c_mul_add_content_length( return 0; } +int llhttp__internal__c_test_lenient_flags_4( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->lenient_flags & 512) == 512; +} + int llhttp__on_chunk_header( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); @@ -756,11 +806,7 @@ int llhttp__internal__c_is_equal_content_length( return state->content_length == 0; } -int llhttp__on_chunk_complete( - llhttp__internal_t* s, const unsigned char* p, - const unsigned char* endp); - -int llhttp__internal__c_test_lenient_flags_4( +int llhttp__internal__c_test_lenient_flags_7( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -775,7 +821,7 @@ int llhttp__internal__c_or_flags( return 0; } -int llhttp__internal__c_test_lenient_flags_5( +int llhttp__internal__c_test_lenient_flags_8( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -790,13 +836,6 @@ int llhttp__on_chunk_extension_value_complete( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); -int llhttp__internal__c_is_equal_upgrade( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return state->upgrade == 1; -} - int llhttp__internal__c_update_finish_3( llhttp__internal_t* state, const unsigned char* p, @@ -805,35 +844,6 @@ int llhttp__internal__c_update_finish_3( return 0; } -int llhttp__internal__c_test_flags( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return (state->flags & 128) == 128; -} - -int llhttp__internal__c_test_flags_1( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return (state->flags & 544) == 544; -} - -int llhttp__internal__c_test_lenient_flags_6( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return (state->lenient_flags & 2) == 2; -} - -int llhttp__before_headers_complete( - llhttp__internal_t* s, const unsigned char* p, - const unsigned char* endp); - -int llhttp__on_headers_complete( - llhttp__internal_t* s, const unsigned char* p, - const unsigned char* endp); - int llhttp__internal__c_or_flags_1( llhttp__internal_t* state, const unsigned char* p, @@ -870,7 +880,21 @@ int llhttp__internal__c_load_header_state( return state->header_state; } -int llhttp__internal__c_or_flags_3( +int llhttp__internal__c_test_flags_4( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->flags & 512) == 512; +} + +int llhttp__internal__c_test_lenient_flags_21( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->lenient_flags & 2) == 2; +} + +int llhttp__internal__c_or_flags_5( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -890,7 +914,7 @@ int llhttp__on_header_value_complete( llhttp__internal_t* s, const unsigned char* p, const unsigned char* endp); -int llhttp__internal__c_or_flags_4( +int llhttp__internal__c_or_flags_6( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -898,7 +922,7 @@ int llhttp__internal__c_or_flags_4( return 0; } -int llhttp__internal__c_or_flags_5( +int llhttp__internal__c_or_flags_7( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -906,7 +930,7 @@ int llhttp__internal__c_or_flags_5( return 0; } -int llhttp__internal__c_or_flags_6( +int llhttp__internal__c_or_flags_8( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -979,7 +1003,7 @@ int llhttp__internal__c_mul_add_content_length_1( return 0; } -int llhttp__internal__c_or_flags_15( +int llhttp__internal__c_or_flags_17( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -994,14 +1018,14 @@ int llhttp__internal__c_test_flags_3( return (state->flags & 8) == 8; } -int llhttp__internal__c_test_lenient_flags_13( +int llhttp__internal__c_test_lenient_flags_19( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { return (state->lenient_flags & 8) == 8; } -int llhttp__internal__c_or_flags_16( +int llhttp__internal__c_or_flags_18( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -1025,7 +1049,7 @@ int llhttp__internal__c_update_header_state_8( return 0; } -int llhttp__internal__c_or_flags_18( +int llhttp__internal__c_or_flags_20( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -1058,7 +1082,7 @@ int llhttp__internal__c_store_http_minor( return 0; } -int llhttp__internal__c_test_lenient_flags_15( +int llhttp__internal__c_test_lenient_flags_23( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -1192,25 +1216,63 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_is_equal_upgrade: + s_n_llhttp__internal__n_invoke_is_equal_upgrade: { + switch (llhttp__internal__c_is_equal_upgrade(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; + default: + goto s_n_llhttp__internal__n_pause_1; + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: + s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: { + switch (llhttp__on_message_complete(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_invoke_is_equal_upgrade; + case 21: + goto s_n_llhttp__internal__n_pause_13; + default: + goto s_n_llhttp__internal__n_error_38; + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_chunk_data_almost_done_1: + s_n_llhttp__internal__n_chunk_data_almost_done_1: { + if (p == endp) { + return s_n_llhttp__internal__n_chunk_data_almost_done_1; + } + switch (*p) { + case 10: { + p++; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; + } + default: { + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7; + } + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_chunk_data_almost_done: s_n_llhttp__internal__n_chunk_data_almost_done: { - llparse_match_t match_seq; - if (p == endp) { return s_n_llhttp__internal__n_chunk_data_almost_done; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob0, 2); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { + switch (*p) { + case 10: { p++; - goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_6; } - case kMatchPause: { - return s_n_llhttp__internal__n_chunk_data_almost_done; + case 13: { + p++; + goto s_n_llhttp__internal__n_chunk_data_almost_done_1; } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4; + default: { + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7; } } /* UNREACHABLE */; @@ -1267,21 +1329,32 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header; } default: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_5; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_8; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_test_lenient_flags_9: + s_n_llhttp__internal__n_invoke_test_lenient_flags_9: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_chunk_size_almost_done; + default: + goto s_n_llhttp__internal__n_error_20; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete: s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete: { switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_chunk_size_almost_done; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_9; case 21: goto s_n_llhttp__internal__n_pause_5; default: - goto s_n_llhttp__internal__n_error_15; + goto s_n_llhttp__internal__n_error_19; } /* UNREACHABLE */; abort(); @@ -1290,11 +1363,35 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_1: { switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_chunk_extensions; + goto s_n_llhttp__internal__n_chunk_size_almost_done; case 21: goto s_n_llhttp__internal__n_pause_6; default: - goto s_n_llhttp__internal__n_error_16; + goto s_n_llhttp__internal__n_error_21; + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: { + switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_chunk_extensions; + case 21: + goto s_n_llhttp__internal__n_pause_7; + default: + goto s_n_llhttp__internal__n_error_22; + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_invoke_test_lenient_flags_10: + s_n_llhttp__internal__n_invoke_test_lenient_flags_10: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_chunk_size_almost_done; + default: + goto s_n_llhttp__internal__n_error_25; } /* UNREACHABLE */; abort(); @@ -1303,11 +1400,24 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete: { switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { case 0: + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_10; + case 21: + goto s_n_llhttp__internal__n_pause_8; + default: + goto s_n_llhttp__internal__n_error_24; + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: { + switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { + case 0: goto s_n_llhttp__internal__n_chunk_size_almost_done; case 21: - goto s_n_llhttp__internal__n_pause_7; + goto s_n_llhttp__internal__n_pause_9; default: - goto s_n_llhttp__internal__n_error_18; + goto s_n_llhttp__internal__n_error_26; } /* UNREACHABLE */; abort(); @@ -1318,6 +1428,9 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_chunk_extension_quoted_value_done; } switch (*p) { + case 10: { + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_11; + } case 13: { p++; goto s_n_llhttp__internal__n_chunk_size_almost_done; @@ -1327,27 +1440,72 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_chunk_extensions; } default: { - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_29; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: - s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1: { + case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: { switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_chunk_extension_quoted_value_done; case 21: - goto s_n_llhttp__internal__n_pause_8; + goto s_n_llhttp__internal__n_pause_10; default: - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_27; } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_21: - s_n_llhttp__internal__n_error_21: { + case s_n_llhttp__internal__n_error_30: + s_n_llhttp__internal__n_error_30: { + state->error = 0x2; + state->reason = "Invalid quoted-pair in chunk extensions quoted value"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair: + s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair: { + static uint8_t lookup_table[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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_extension_quoted_value_quoted_pair; + } + switch (lookup_table[(uint8_t) *p]) { + case 1: { + p++; + goto s_n_llhttp__internal__n_chunk_extension_quoted_value; + } + default: { + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_error_31: + s_n_llhttp__internal__n_error_31: { state->error = 0x2; state->reason = "Invalid character in chunk extensions quoted value"; state->error_pos = (const char*) p; @@ -1364,7 +1522,7 @@ static llparse_state_t llhttp__internal__run( 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1386,30 +1544,34 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1; + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2; + } + case 3: { + p++; + goto s_n_llhttp__internal__n_chunk_extension_quoted_value_quoted_pair; } default: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2; + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: - s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2: { + case s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3: + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3: { switch (llhttp__on_chunk_extension_value_complete(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_chunk_size_otherwise; + goto s_n_llhttp__internal__n_chunk_extensions; case 21: - goto s_n_llhttp__internal__n_pause_9; + goto s_n_llhttp__internal__n_pause_11; default: - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_32; } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_23: - s_n_llhttp__internal__n_error_23: { + case s_n_llhttp__internal__n_error_33: + s_n_llhttp__internal__n_error_33: { state->error = 0x2; state->reason = "Invalid character in chunk extensions value"; state->error_pos = (const char*) p; @@ -1421,14 +1583,14 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_chunk_extension_value: s_n_llhttp__internal__n_chunk_extension_value: { static uint8_t lookup_table[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 3, 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 4, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 0, + 0, 3, 4, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 5, 0, 0, 0, 0, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1446,18 +1608,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value; } case 2: { + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1; + } + case 3: { p++; goto s_n_llhttp__internal__n_chunk_extension_value; } - case 3: { + case 4: { p++; goto s_n_llhttp__internal__n_chunk_extension_quoted_value; } - case 4: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3; + case 5: { + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5; } default: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4; + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6; } } /* UNREACHABLE */; @@ -1470,12 +1635,12 @@ static llparse_state_t llhttp__internal__run( } state->_span_pos0 = (void*) p; state->_span_cb0 = llhttp__on_chunk_extension_value; - goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3; /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_24: - s_n_llhttp__internal__n_error_24: { + case s_n_llhttp__internal__n_error_34: + s_n_llhttp__internal__n_error_34: { state->error = 0x2; state->reason = "Invalid character in chunk extensions name"; state->error_pos = (const char*) p; @@ -1487,14 +1652,14 @@ static llparse_state_t llhttp__internal__run( case s_n_llhttp__internal__n_chunk_extension_name: s_n_llhttp__internal__n_chunk_extension_name: { static uint8_t lookup_table[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 3, 0, 4, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 0, + 0, 3, 0, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 3, 3, 0, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 5, 0, 0, + 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1512,18 +1677,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name; } case 2: { - p++; - goto s_n_llhttp__internal__n_chunk_extension_name; + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1; } case 3: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_1; + p++; + goto s_n_llhttp__internal__n_chunk_extension_name; } case 4: { goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2; } - default: { + case 5: { goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3; } + default: { + goto s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4; + } } /* UNREACHABLE */; abort(); @@ -1547,11 +1715,11 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 13: { p++; - goto s_n_llhttp__internal__n_error_13; + goto s_n_llhttp__internal__n_error_17; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_14; + goto s_n_llhttp__internal__n_error_18; } default: { goto s_n_llhttp__internal__n_span_start_llhttp__on_chunk_extension_name; @@ -1566,16 +1734,28 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_chunk_size_otherwise; } switch (*p) { + case 9: { + p++; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4; + } + case 10: { + p++; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_5; + } case 13: { p++; goto s_n_llhttp__internal__n_chunk_size_almost_done; } + case ' ': { + p++; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_4; + } case ';': { p++; goto s_n_llhttp__internal__n_chunk_extensions; } default: { - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -1821,7 +2001,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_27; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -1836,30 +2016,6 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_invoke_is_equal_upgrade: - s_n_llhttp__internal__n_invoke_is_equal_upgrade: { - switch (llhttp__internal__c_is_equal_upgrade(state, p, endp)) { - case 0: - goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete; - default: - goto s_n_llhttp__internal__n_pause_1; - } - /* UNREACHABLE */; - abort(); - } - case s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: - s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: { - switch (llhttp__on_message_complete(state, p, endp)) { - case 0: - goto s_n_llhttp__internal__n_invoke_is_equal_upgrade; - case 21: - goto s_n_llhttp__internal__n_pause_11; - default: - goto s_n_llhttp__internal__n_error_28; - } - /* UNREACHABLE */; - abort(); - } case s_n_llhttp__internal__n_consume_content_length_1: s_n_llhttp__internal__n_consume_content_length_1: { size_t avail; @@ -1922,7 +2078,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_29; + goto s_n_llhttp__internal__n_error_39; default: goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete; } @@ -1947,10 +2103,10 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_invoke_test_flags; + goto s_n_llhttp__internal__n_invoke_test_flags_1; } default: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_7; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_12; } } /* UNREACHABLE */; @@ -1979,9 +2135,9 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_header_field_start; case 21: - goto s_n_llhttp__internal__n_pause_14; + goto s_n_llhttp__internal__n_pause_18; default: - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_48; } /* UNREACHABLE */; abort(); @@ -2005,14 +2161,14 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 9: { p++; - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_10; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15; } case ' ': { p++; - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_10; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15; } default: { - goto s_n_llhttp__internal__n_invoke_load_header_state; + goto s_n_llhttp__internal__n_invoke_load_header_state_1; } } /* UNREACHABLE */; @@ -2029,7 +2185,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_invoke_test_lenient_flags_11; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_16; } } /* UNREACHABLE */; @@ -2042,13 +2198,13 @@ 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_load_header_state_4; } case ' ': { - goto s_n_llhttp__internal__n_invoke_load_header_state_3; + goto s_n_llhttp__internal__n_invoke_load_header_state_4; } default: { - goto s_n_llhttp__internal__n_invoke_load_header_state_4; + goto s_n_llhttp__internal__n_invoke_load_header_state_5; } } /* UNREACHABLE */; @@ -2065,12 +2221,23 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_lws; } default: { - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_test_lenient_flags_17: + s_n_llhttp__internal__n_invoke_test_lenient_flags_17: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_header_value_almost_done; + default: + goto s_n_llhttp__internal__n_error_51; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_header_value_lenient: s_n_llhttp__internal__n_header_value_lenient: { if (p == endp) { @@ -2078,10 +2245,10 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case 10: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4; } case 13: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5; } default: { p++; @@ -2091,8 +2258,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_41: - s_n_llhttp__internal__n_error_41: { + case s_n_llhttp__internal__n_error_53: + s_n_llhttp__internal__n_error_53: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -2107,11 +2274,14 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_header_value_otherwise; } switch (*p) { - case 13: { + case 10: { goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1; } + case 13: { + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; + } default: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_12; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_18; } } /* UNREACHABLE */; @@ -2174,7 +2344,7 @@ static llparse_state_t llhttp__internal__run( } case ',': { p++; - goto s_n_llhttp__internal__n_invoke_load_header_state_5; + goto s_n_llhttp__internal__n_invoke_load_header_state_6; } default: { goto s_n_llhttp__internal__n_invoke_update_header_state_5; @@ -2190,7 +2360,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_value_connection_1; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 4); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2214,7 +2384,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_value_connection_2; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 9); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2238,7 +2408,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_value_connection_3; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob5, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2288,8 +2458,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_43: - s_n_llhttp__internal__n_error_43: { + case s_n_llhttp__internal__n_error_55: + s_n_llhttp__internal__n_error_55: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -2298,8 +2468,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_44: - s_n_llhttp__internal__n_error_44: { + case s_n_llhttp__internal__n_error_56: + s_n_llhttp__internal__n_error_56: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -2315,17 +2485,17 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case 10: { - goto s_n_llhttp__internal__n_invoke_or_flags_15; + goto s_n_llhttp__internal__n_invoke_or_flags_17; } case 13: { - goto s_n_llhttp__internal__n_invoke_or_flags_15; + goto s_n_llhttp__internal__n_invoke_or_flags_17; } case ' ': { p++; goto s_n_llhttp__internal__n_header_value_content_length_ws; } default: { - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7; } } /* UNREACHABLE */; @@ -2394,8 +2564,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_46: - s_n_llhttp__internal__n_error_46: { + case s_n_llhttp__internal__n_error_58: + s_n_llhttp__internal__n_error_58: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -2404,8 +2574,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_45: - s_n_llhttp__internal__n_error_45: { + case s_n_llhttp__internal__n_error_57: + s_n_llhttp__internal__n_error_57: { state->error = 0xf; state->reason = "Invalid `Transfer-Encoding` header value"; state->error_pos = (const char*) p; @@ -2467,7 +2637,7 @@ static llparse_state_t llhttp__internal__run( /* Load input */ input = _mm_loadu_si128((__m128i const*) p); - ranges = _mm_loadu_si128((__m128i const*) llparse_blob7); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob6); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 6, @@ -2566,7 +2736,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_value_te_chunked; } - match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob6, 7); + match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob5, 7); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2590,7 +2760,7 @@ static llparse_state_t llhttp__internal__run( } state->_span_pos0 = (void*) p; state->_span_cb0 = llhttp__on_header_value; - goto s_n_llhttp__internal__n_invoke_load_header_state_2; + goto s_n_llhttp__internal__n_invoke_load_header_state_3; /* UNREACHABLE */; abort(); } @@ -2606,7 +2776,7 @@ static llparse_state_t llhttp__internal__run( } case 10: { p++; - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_9; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_14; } case 13: { p++; @@ -2623,15 +2793,28 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_load_header_state: + 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_invoke_test_flags_4; + case 3: + goto s_n_llhttp__internal__n_invoke_test_flags_5; + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete: s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete: { switch (llhttp__on_header_field_complete(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_header_value_discard_ws; + goto s_n_llhttp__internal__n_invoke_load_header_state; case 21: - goto s_n_llhttp__internal__n_pause_15; + goto s_n_llhttp__internal__n_pause_19; default: - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_45; } /* UNREACHABLE */; abort(); @@ -2646,7 +2829,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_47; + goto s_n_llhttp__internal__n_error_61; } } /* UNREACHABLE */; @@ -2684,7 +2867,7 @@ static llparse_state_t llhttp__internal__run( /* Load input */ input = _mm_loadu_si128((__m128i const*) p); - ranges = _mm_loadu_si128((__m128i const*) llparse_blob8); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob7); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 16, @@ -2696,7 +2879,7 @@ static llparse_state_t llhttp__internal__run( p += match_len; goto s_n_llhttp__internal__n_header_field_general; } - ranges = _mm_loadu_si128((__m128i const*) llparse_blob9); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob8); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 2, @@ -2730,7 +2913,7 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case ' ': { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_8; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_13; } case ':': { goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; @@ -2749,7 +2932,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_3; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2774,7 +2957,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_4; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 10); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob9, 10); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2820,7 +3003,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_1; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 2); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob0, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2844,7 +3027,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_5; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 15); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 15); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2869,7 +3052,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_6; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 16); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 16); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2894,7 +3077,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_header_field_7; } - match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob13, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2966,6 +3149,9 @@ static llparse_state_t llhttp__internal__run( p++; goto s_n_llhttp__internal__n_headers_almost_done; } + case ':': { + goto s_n_llhttp__internal__n_error_44; + } default: { goto s_n_llhttp__internal__n_span_start_llhttp__on_header_field; } @@ -3044,7 +3230,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_48; + goto s_n_llhttp__internal__n_error_62; } } /* UNREACHABLE */; @@ -3069,7 +3255,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_48; + goto s_n_llhttp__internal__n_error_62; } } /* UNREACHABLE */; @@ -3082,18 +3268,18 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_pri_upgrade; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 10); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 10); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_error_55; + goto s_n_llhttp__internal__n_error_70; } case kMatchPause: { return s_n_llhttp__internal__n_req_pri_upgrade; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_56; + goto s_n_llhttp__internal__n_error_71; } } /* UNREACHABLE */; @@ -3110,7 +3296,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_headers_start; } default: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_16; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_25; } } /* UNREACHABLE */; @@ -3122,12 +3308,16 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_complete; } switch (*p) { + case 10: { + p++; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_24; + } case 13: { p++; goto s_n_llhttp__internal__n_req_http_complete_crlf; } default: { - goto s_n_llhttp__internal__n_error_54; + goto s_n_llhttp__internal__n_error_69; } } /* UNREACHABLE */; @@ -3150,15 +3340,15 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_invoke_load_method_1; case 21: - goto s_n_llhttp__internal__n_pause_17; + goto s_n_llhttp__internal__n_pause_21; default: - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_66; } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_51: - s_n_llhttp__internal__n_error_51: { + case s_n_llhttp__internal__n_error_65: + s_n_llhttp__internal__n_error_65: { state->error = 0x9; state->reason = "Invalid HTTP version"; state->error_pos = (const char*) p; @@ -3167,8 +3357,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_57: - s_n_llhttp__internal__n_error_57: { + case s_n_llhttp__internal__n_error_72: + s_n_llhttp__internal__n_error_72: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -3240,8 +3430,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_58: - s_n_llhttp__internal__n_error_58: { + case s_n_llhttp__internal__n_error_73: + s_n_llhttp__internal__n_error_73: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -3267,8 +3457,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_59: - s_n_llhttp__internal__n_error_59: { + case s_n_llhttp__internal__n_error_74: + s_n_llhttp__internal__n_error_74: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -3358,7 +3548,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_http_start_1; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob13, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3369,7 +3559,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_62; + goto s_n_llhttp__internal__n_error_77; } } /* UNREACHABLE */; @@ -3382,7 +3572,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_http_start_2; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3393,7 +3583,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_62; + goto s_n_llhttp__internal__n_error_77; } } /* UNREACHABLE */; @@ -3406,7 +3596,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_http_start_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3417,7 +3607,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_http_start_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_62; + goto s_n_llhttp__internal__n_error_77; } } /* UNREACHABLE */; @@ -3446,7 +3636,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_start_3; } default: { - goto s_n_llhttp__internal__n_error_62; + goto s_n_llhttp__internal__n_error_77; } } /* UNREACHABLE */; @@ -3537,7 +3727,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_fragment; } default: { - goto s_n_llhttp__internal__n_error_63; + goto s_n_llhttp__internal__n_error_78; } } /* UNREACHABLE */; @@ -3598,7 +3788,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_64; + goto s_n_llhttp__internal__n_error_79; } } /* UNREACHABLE */; @@ -3636,7 +3826,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_65; + goto s_n_llhttp__internal__n_error_80; } } /* UNREACHABLE */; @@ -3761,10 +3951,10 @@ static llparse_state_t llhttp__internal__run( } case 8: { p++; - goto s_n_llhttp__internal__n_error_66; + goto s_n_llhttp__internal__n_error_81; } default: { - goto s_n_llhttp__internal__n_error_67; + goto s_n_llhttp__internal__n_error_82; } } /* UNREACHABLE */; @@ -3823,7 +4013,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_68; + goto s_n_llhttp__internal__n_error_83; } } /* UNREACHABLE */; @@ -3840,7 +4030,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_69; + goto s_n_llhttp__internal__n_error_84; } } /* UNREACHABLE */; @@ -3877,7 +4067,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_69; + goto s_n_llhttp__internal__n_error_84; } } /* UNREACHABLE */; @@ -3929,7 +4119,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_70; + goto s_n_llhttp__internal__n_error_85; } } /* UNREACHABLE */; @@ -3970,7 +4160,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_71; + goto s_n_llhttp__internal__n_error_86; } } /* UNREACHABLE */; @@ -4068,7 +4258,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_72; + goto s_n_llhttp__internal__n_error_87; } } /* UNREACHABLE */; @@ -4080,9 +4270,9 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_req_first_space_before_url; case 21: - goto s_n_llhttp__internal__n_pause_22; + goto s_n_llhttp__internal__n_pause_26; default: - goto s_n_llhttp__internal__n_error_89; + goto s_n_llhttp__internal__n_error_106; } /* UNREACHABLE */; abort(); @@ -4099,7 +4289,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_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4112,7 +4302,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4124,7 +4314,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4145,7 +4335,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_3; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4158,7 +4348,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_4; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4170,7 +4360,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_4; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4183,7 +4373,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_6; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4195,7 +4385,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_6; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4208,7 +4398,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_8; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4220,7 +4410,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_8; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4238,7 +4428,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_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4259,7 +4449,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_9; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4280,7 +4470,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_7; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4293,7 +4483,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_12; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4305,7 +4495,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_12; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4318,7 +4508,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_13; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4330,7 +4520,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_13; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4351,7 +4541,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_13; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4368,7 +4558,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_11; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4381,7 +4571,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_14; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4393,7 +4583,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_14; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4406,7 +4596,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_17; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 9); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4418,7 +4608,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_17; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4449,7 +4639,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_15; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4460,7 +4650,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_15; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4473,7 +4663,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_18; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4485,7 +4675,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_18; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4498,7 +4688,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_20; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4510,7 +4700,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_20; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4523,7 +4713,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_21; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4535,7 +4725,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_21; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4556,7 +4746,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_21; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4569,7 +4759,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_23; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4581,7 +4771,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_23; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4594,7 +4784,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_24; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4606,7 +4796,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_24; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4619,7 +4809,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_26; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 7); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 7); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4631,7 +4821,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_26; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4644,7 +4834,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_28; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4656,7 +4846,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_28; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4674,7 +4864,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_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4695,7 +4885,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_29; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4716,7 +4906,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_27; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4729,7 +4919,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_30; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4741,7 +4931,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_30; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4770,7 +4960,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_30; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4783,7 +4973,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_31; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4795,7 +4985,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_31; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4808,7 +4998,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_32; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4820,7 +5010,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_32; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4833,7 +5023,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_35; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4845,7 +5035,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_35; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4858,7 +5048,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_36; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4870,7 +5060,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_36; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4891,7 +5081,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_36; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4904,7 +5094,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_37; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4916,7 +5106,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_37; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4929,7 +5119,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_38; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4941,7 +5131,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_38; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4954,7 +5144,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_42; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4966,7 +5156,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_42; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -4979,7 +5169,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_43; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4991,7 +5181,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_43; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5012,7 +5202,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_43; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5029,7 +5219,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_41; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5051,7 +5241,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_40; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5064,7 +5254,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_45; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -5076,7 +5266,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_after_start_req_45; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5098,7 +5288,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_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5131,32 +5321,32 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_after_start_req_44; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_48: - s_n_llhttp__internal__n_after_start_req_48: { + case s_n_llhttp__internal__n_after_start_req_46: + s_n_llhttp__internal__n_after_start_req_46: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_48; + return s_n_llhttp__internal__n_after_start_req_46; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 17; + match = 46; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_48; + return s_n_llhttp__internal__n_after_start_req_46; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5169,19 +5359,19 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_49; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 44; + match = 17; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_after_start_req_49; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5194,19 +5384,19 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_50; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 43; + match = 44; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_after_start_req_50; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5219,6 +5409,31 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_after_start_req_51; } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 5); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 43; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_after_start_req_51; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_107; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_after_start_req_52: + s_n_llhttp__internal__n_after_start_req_52: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_after_start_req_52; + } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 3); p = match_seq.current; switch (match_seq.status) { @@ -5228,67 +5443,67 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_51; + return s_n_llhttp__internal__n_after_start_req_52; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_47: - s_n_llhttp__internal__n_after_start_req_47: { + case s_n_llhttp__internal__n_after_start_req_48: + s_n_llhttp__internal__n_after_start_req_48: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_47; + return s_n_llhttp__internal__n_after_start_req_48; } switch (*p) { case 'B': { p++; - goto s_n_llhttp__internal__n_after_start_req_48; + goto s_n_llhttp__internal__n_after_start_req_49; } case 'C': { p++; - goto s_n_llhttp__internal__n_after_start_req_49; + goto s_n_llhttp__internal__n_after_start_req_50; } case 'D': { p++; - goto s_n_llhttp__internal__n_after_start_req_50; + goto s_n_llhttp__internal__n_after_start_req_51; } case 'P': { p++; - goto s_n_llhttp__internal__n_after_start_req_51; + goto s_n_llhttp__internal__n_after_start_req_52; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_46: - s_n_llhttp__internal__n_after_start_req_46: { + case s_n_llhttp__internal__n_after_start_req_47: + s_n_llhttp__internal__n_after_start_req_47: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_46; + return s_n_llhttp__internal__n_after_start_req_47; } switch (*p) { case 'E': { p++; - goto s_n_llhttp__internal__n_after_start_req_47; + goto s_n_llhttp__internal__n_after_start_req_48; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_54: - s_n_llhttp__internal__n_after_start_req_54: { + case s_n_llhttp__internal__n_after_start_req_55: + s_n_llhttp__internal__n_after_start_req_55: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_54; + return s_n_llhttp__internal__n_after_start_req_55; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 3); p = match_seq.current; @@ -5299,19 +5514,19 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_54; + return s_n_llhttp__internal__n_after_start_req_55; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_56: - s_n_llhttp__internal__n_after_start_req_56: { + case s_n_llhttp__internal__n_after_start_req_57: + s_n_llhttp__internal__n_after_start_req_57: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_56; + return s_n_llhttp__internal__n_after_start_req_57; } switch (*p) { case 'P': { @@ -5320,18 +5535,18 @@ 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_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_57: - s_n_llhttp__internal__n_after_start_req_57: { + case s_n_llhttp__internal__n_after_start_req_58: + s_n_llhttp__internal__n_after_start_req_58: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_57; + return s_n_llhttp__internal__n_after_start_req_58; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 9); p = match_seq.current; @@ -5342,63 +5557,63 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_57; + return s_n_llhttp__internal__n_after_start_req_58; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_55: - s_n_llhttp__internal__n_after_start_req_55: { + case s_n_llhttp__internal__n_after_start_req_56: + s_n_llhttp__internal__n_after_start_req_56: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_55; + return s_n_llhttp__internal__n_after_start_req_56; } switch (*p) { case 'U': { p++; - goto s_n_llhttp__internal__n_after_start_req_56; + goto s_n_llhttp__internal__n_after_start_req_57; } case '_': { p++; - goto s_n_llhttp__internal__n_after_start_req_57; + goto s_n_llhttp__internal__n_after_start_req_58; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_53: - s_n_llhttp__internal__n_after_start_req_53: { + case s_n_llhttp__internal__n_after_start_req_54: + s_n_llhttp__internal__n_after_start_req_54: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_53; + return s_n_llhttp__internal__n_after_start_req_54; } switch (*p) { case 'A': { p++; - goto s_n_llhttp__internal__n_after_start_req_54; + goto s_n_llhttp__internal__n_after_start_req_55; } case 'T': { p++; - goto s_n_llhttp__internal__n_after_start_req_55; + goto s_n_llhttp__internal__n_after_start_req_56; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_58: - s_n_llhttp__internal__n_after_start_req_58: { + case s_n_llhttp__internal__n_after_start_req_59: + s_n_llhttp__internal__n_after_start_req_59: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_58; + return s_n_llhttp__internal__n_after_start_req_59; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 4); p = match_seq.current; @@ -5409,21 +5624,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_58; + return s_n_llhttp__internal__n_after_start_req_59; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_59: - s_n_llhttp__internal__n_after_start_req_59: { + case s_n_llhttp__internal__n_after_start_req_60: + s_n_llhttp__internal__n_after_start_req_60: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_59; + return s_n_llhttp__internal__n_after_start_req_60; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 7); p = match_seq.current; @@ -5434,46 +5649,46 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_59; + return s_n_llhttp__internal__n_after_start_req_60; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_52: - s_n_llhttp__internal__n_after_start_req_52: { + case s_n_llhttp__internal__n_after_start_req_53: + s_n_llhttp__internal__n_after_start_req_53: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_52; + return s_n_llhttp__internal__n_after_start_req_53; } switch (*p) { case 'E': { p++; - goto s_n_llhttp__internal__n_after_start_req_53; + goto s_n_llhttp__internal__n_after_start_req_54; } case 'O': { p++; - goto s_n_llhttp__internal__n_after_start_req_58; + goto s_n_llhttp__internal__n_after_start_req_59; } case 'U': { p++; - goto s_n_llhttp__internal__n_after_start_req_59; + goto s_n_llhttp__internal__n_after_start_req_60; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_61: - s_n_llhttp__internal__n_after_start_req_61: { + case s_n_llhttp__internal__n_after_start_req_62: + s_n_llhttp__internal__n_after_start_req_62: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_61; + return s_n_llhttp__internal__n_after_start_req_62; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob52, 6); p = match_seq.current; @@ -5484,21 +5699,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_61; + return s_n_llhttp__internal__n_after_start_req_62; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_62: - s_n_llhttp__internal__n_after_start_req_62: { + case s_n_llhttp__internal__n_after_start_req_63: + s_n_llhttp__internal__n_after_start_req_63: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_62; + return s_n_llhttp__internal__n_after_start_req_63; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob53, 3); p = match_seq.current; @@ -5509,42 +5724,42 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_62; + return s_n_llhttp__internal__n_after_start_req_63; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_60: - s_n_llhttp__internal__n_after_start_req_60: { + case s_n_llhttp__internal__n_after_start_req_61: + s_n_llhttp__internal__n_after_start_req_61: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_60; + return s_n_llhttp__internal__n_after_start_req_61; } switch (*p) { case 'E': { p++; - goto s_n_llhttp__internal__n_after_start_req_61; + goto s_n_llhttp__internal__n_after_start_req_62; } case 'R': { p++; - goto s_n_llhttp__internal__n_after_start_req_62; + goto s_n_llhttp__internal__n_after_start_req_63; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_65: - s_n_llhttp__internal__n_after_start_req_65: { + case s_n_llhttp__internal__n_after_start_req_66: + s_n_llhttp__internal__n_after_start_req_66: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_65; + return s_n_llhttp__internal__n_after_start_req_66; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob54, 3); p = match_seq.current; @@ -5555,21 +5770,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_65; + return s_n_llhttp__internal__n_after_start_req_66; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_67: - s_n_llhttp__internal__n_after_start_req_67: { + case s_n_llhttp__internal__n_after_start_req_68: + s_n_llhttp__internal__n_after_start_req_68: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_67; + return s_n_llhttp__internal__n_after_start_req_68; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob55, 2); p = match_seq.current; @@ -5580,21 +5795,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_67; + return s_n_llhttp__internal__n_after_start_req_68; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_68: - s_n_llhttp__internal__n_after_start_req_68: { + case s_n_llhttp__internal__n_after_start_req_69: + s_n_llhttp__internal__n_after_start_req_69: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_68; + return s_n_llhttp__internal__n_after_start_req_69; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob56, 2); p = match_seq.current; @@ -5605,42 +5820,42 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_68; + return s_n_llhttp__internal__n_after_start_req_69; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_66: - s_n_llhttp__internal__n_after_start_req_66: { + case s_n_llhttp__internal__n_after_start_req_67: + s_n_llhttp__internal__n_after_start_req_67: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_66; + return s_n_llhttp__internal__n_after_start_req_67; } switch (*p) { case 'I': { p++; - goto s_n_llhttp__internal__n_after_start_req_67; + goto s_n_llhttp__internal__n_after_start_req_68; } case 'O': { p++; - goto s_n_llhttp__internal__n_after_start_req_68; + goto s_n_llhttp__internal__n_after_start_req_69; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_69: - s_n_llhttp__internal__n_after_start_req_69: { + case s_n_llhttp__internal__n_after_start_req_70: + s_n_llhttp__internal__n_after_start_req_70: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_69; + return s_n_llhttp__internal__n_after_start_req_70; } match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob57, 8); p = match_seq.current; @@ -5651,52 +5866,52 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_after_start_req_69; + return s_n_llhttp__internal__n_after_start_req_70; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_64: - s_n_llhttp__internal__n_after_start_req_64: { + case s_n_llhttp__internal__n_after_start_req_65: + s_n_llhttp__internal__n_after_start_req_65: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_64; + return s_n_llhttp__internal__n_after_start_req_65; } switch (*p) { case 'B': { p++; - goto s_n_llhttp__internal__n_after_start_req_65; + goto s_n_llhttp__internal__n_after_start_req_66; } case 'L': { p++; - goto s_n_llhttp__internal__n_after_start_req_66; + goto s_n_llhttp__internal__n_after_start_req_67; } case 'S': { p++; - goto s_n_llhttp__internal__n_after_start_req_69; + goto s_n_llhttp__internal__n_after_start_req_70; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_after_start_req_63: - s_n_llhttp__internal__n_after_start_req_63: { + case s_n_llhttp__internal__n_after_start_req_64: + s_n_llhttp__internal__n_after_start_req_64: { if (p == endp) { - return s_n_llhttp__internal__n_after_start_req_63; + return s_n_llhttp__internal__n_after_start_req_64; } switch (*p) { case 'N': { p++; - goto s_n_llhttp__internal__n_after_start_req_64; + goto s_n_llhttp__internal__n_after_start_req_65; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5756,24 +5971,28 @@ static llparse_state_t llhttp__internal__run( p++; goto s_n_llhttp__internal__n_after_start_req_33; } - case 'R': { + case 'Q': { p++; goto s_n_llhttp__internal__n_after_start_req_46; } + case 'R': { + p++; + goto s_n_llhttp__internal__n_after_start_req_47; + } case 'S': { p++; - goto s_n_llhttp__internal__n_after_start_req_52; + goto s_n_llhttp__internal__n_after_start_req_53; } case 'T': { p++; - goto s_n_llhttp__internal__n_after_start_req_60; + goto s_n_llhttp__internal__n_after_start_req_61; } case 'U': { p++; - goto s_n_llhttp__internal__n_after_start_req_63; + goto s_n_llhttp__internal__n_after_start_req_64; } default: { - goto s_n_llhttp__internal__n_error_90; + goto s_n_llhttp__internal__n_error_107; } } /* UNREACHABLE */; @@ -5805,12 +6024,23 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; } default: { - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_18; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_28; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_test_lenient_flags_29: + s_n_llhttp__internal__n_invoke_test_lenient_flags_29: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; + default: + goto s_n_llhttp__internal__n_error_93; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_res_status: s_n_llhttp__internal__n_res_status: { if (p == endp) { @@ -5842,27 +6072,6 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_res_status_start: - s_n_llhttp__internal__n_res_status_start: { - if (p == endp) { - return s_n_llhttp__internal__n_res_status_start; - } - switch (*p) { - case 10: { - p++; - goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; - } - case 13: { - p++; - goto s_n_llhttp__internal__n_res_line_almost_done; - } - default: { - goto s_n_llhttp__internal__n_span_start_llhttp__on_status; - } - } - /* UNREACHABLE */; - abort(); - } case s_n_llhttp__internal__n_res_status_code_otherwise: s_n_llhttp__internal__n_res_status_code_otherwise: { if (p == endp) { @@ -5870,17 +6079,19 @@ static llparse_state_t llhttp__internal__run( } switch (*p) { case 10: { - goto s_n_llhttp__internal__n_res_status_start; + p++; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_27; } case 13: { - goto s_n_llhttp__internal__n_res_status_start; + p++; + goto s_n_llhttp__internal__n_res_line_almost_done; } case ' ': { p++; - goto s_n_llhttp__internal__n_res_status_start; + goto s_n_llhttp__internal__n_span_start_llhttp__on_status; } default: { - goto s_n_llhttp__internal__n_error_77; + goto s_n_llhttp__internal__n_error_94; } } /* UNREACHABLE */; @@ -5943,7 +6154,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_mul_add_status_code_2; } default: { - goto s_n_llhttp__internal__n_error_79; + goto s_n_llhttp__internal__n_error_96; } } /* UNREACHABLE */; @@ -6006,7 +6217,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_mul_add_status_code_1; } default: { - goto s_n_llhttp__internal__n_error_81; + goto s_n_llhttp__internal__n_error_98; } } /* UNREACHABLE */; @@ -6069,7 +6280,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_mul_add_status_code; } default: { - goto s_n_llhttp__internal__n_error_83; + goto s_n_llhttp__internal__n_error_100; } } /* UNREACHABLE */; @@ -6086,7 +6297,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_84; + goto s_n_llhttp__internal__n_error_101; } } /* UNREACHABLE */; @@ -6098,15 +6309,15 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_res_after_version; case 21: - goto s_n_llhttp__internal__n_pause_21; + goto s_n_llhttp__internal__n_pause_25; default: - goto s_n_llhttp__internal__n_error_74; + goto s_n_llhttp__internal__n_error_89; } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_73: - s_n_llhttp__internal__n_error_73: { + case s_n_llhttp__internal__n_error_88: + s_n_llhttp__internal__n_error_88: { state->error = 0x9; state->reason = "Invalid HTTP version"; state->error_pos = (const char*) p; @@ -6115,8 +6326,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_85: - s_n_llhttp__internal__n_error_85: { + case s_n_llhttp__internal__n_error_102: + s_n_llhttp__internal__n_error_102: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6188,8 +6399,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_86: - s_n_llhttp__internal__n_error_86: { + case s_n_llhttp__internal__n_error_103: + s_n_llhttp__internal__n_error_103: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6215,8 +6426,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_87: - s_n_llhttp__internal__n_error_87: { + case s_n_llhttp__internal__n_error_104: + s_n_llhttp__internal__n_error_104: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6317,7 +6528,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_91; + goto s_n_llhttp__internal__n_error_108; } } /* UNREACHABLE */; @@ -6329,7 +6540,7 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_req_first_space_before_url; case 21: - goto s_n_llhttp__internal__n_pause_19; + goto s_n_llhttp__internal__n_pause_23; default: goto s_n_llhttp__internal__n_error_1; } @@ -6355,7 +6566,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_88; + goto s_n_llhttp__internal__n_error_105; } } /* UNREACHABLE */; @@ -6388,7 +6599,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_88; + goto s_n_llhttp__internal__n_error_105; } } /* UNREACHABLE */; @@ -6409,7 +6620,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_88; + goto s_n_llhttp__internal__n_error_105; } } /* UNREACHABLE */; @@ -6426,7 +6637,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_88; + goto s_n_llhttp__internal__n_error_105; } } /* UNREACHABLE */; @@ -6539,7 +6750,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 = 0x5; state->reason = "Data after `Connection: close`"; state->error_pos = (const char*) p; @@ -6553,7 +6764,7 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_closed; default: - goto s_n_llhttp__internal__n_error_7; + goto s_n_llhttp__internal__n_error_8; } /* UNREACHABLE */; abort(); @@ -6576,6 +6787,54 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_pause_13: { + state->error = 0x15; + state->reason = "on_message_complete pause"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_upgrade; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_38: { + state->error = 0x12; + state->reason = "`on_message_complete` callback error"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_15: { + state->error = 0x15; + state->reason = "on_chunk_complete pause"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_40: { + state->error = 0x14; + state->reason = "`on_chunk_complete` callback error"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1: { + switch (llhttp__on_chunk_complete(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; + case 21: + goto s_n_llhttp__internal__n_pause_15; + default: + goto s_n_llhttp__internal__n_error_40; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_pause_2: { state->error = 0x15; state->reason = "on_message_complete pause"; @@ -6585,7 +6844,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_8: { + s_n_llhttp__internal__n_error_9: { state->error = 0x12; state->reason = "`on_message_complete` callback error"; state->error_pos = (const char*) p; @@ -6601,12 +6860,12 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_2; default: - goto s_n_llhttp__internal__n_error_8; + goto s_n_llhttp__internal__n_error_9; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_36: { state->error = 0xc; state->reason = "Chunk size overflow"; state->error_pos = (const char*) p; @@ -6615,6 +6874,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_10: { + state->error = 0xc; + state->reason = "Invalid character in chunk size"; + 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_lenient_flags_4: { + switch (llhttp__internal__c_test_lenient_flags_4(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_chunk_size_otherwise; + default: + goto s_n_llhttp__internal__n_error_10; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_pause_3: { state->error = 0x15; state->reason = "on_chunk_complete pause"; @@ -6624,7 +6902,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_10: { + s_n_llhttp__internal__n_error_14: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -6640,12 +6918,31 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_3; default: - goto s_n_llhttp__internal__n_error_10; + goto s_n_llhttp__internal__n_error_14; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_11: { + s_n_llhttp__internal__n_error_13: { + state->error = 0x19; + state->reason = "Missing expected CR after chunk data"; + 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_lenient_flags_6: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; + default: + goto s_n_llhttp__internal__n_error_13; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_15: { state->error = 0x2; state->reason = "Expected LF after chunk data"; state->error_pos = (const char*) p; @@ -6654,12 +6951,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_4: { - switch (llhttp__internal__c_test_lenient_flags_4(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_7: { + switch (llhttp__internal__c_test_lenient_flags_7(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete; default: - goto s_n_llhttp__internal__n_error_11; + goto s_n_llhttp__internal__n_error_15; } /* UNREACHABLE */; abort(); @@ -6698,7 +6995,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_9: { + s_n_llhttp__internal__n_error_12: { state->error = 0x13; state->reason = "`on_chunk_header` callback error"; state->error_pos = (const char*) p; @@ -6714,12 +7011,12 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_4; default: - goto s_n_llhttp__internal__n_error_9; + goto s_n_llhttp__internal__n_error_12; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_12: { + s_n_llhttp__internal__n_error_16: { state->error = 0x2; state->reason = "Expected LF after chunk size"; state->error_pos = (const char*) p; @@ -6728,17 +7025,36 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_5: { - switch (llhttp__internal__c_test_lenient_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_8: { + switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header; default: - goto s_n_llhttp__internal__n_error_12; + goto s_n_llhttp__internal__n_error_16; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_13: { + s_n_llhttp__internal__n_error_11: { + state->error = 0x19; + state->reason = "Missing expected CR after chunk size"; + 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_lenient_flags_5: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_chunk_size_almost_done; + default: + goto s_n_llhttp__internal__n_error_11; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_17: { state->error = 0x2; state->reason = "Invalid character in chunk extensions"; state->error_pos = (const char*) p; @@ -6747,7 +7063,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_14: { + s_n_llhttp__internal__n_error_18: { state->error = 0x2; state->reason = "Invalid character in chunk extensions"; state->error_pos = (const char*) p; @@ -6756,16 +7072,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_20: { + state->error = 0x19; + state->reason = "Missing expected CR after chunk extension name"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_pause_5: { state->error = 0x15; state->reason = "on_chunk_extension_name pause"; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_9; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_15: { + s_n_llhttp__internal__n_error_19: { state->error = 0x22; state->reason = "`on_chunk_extension_name` callback error"; state->error_pos = (const char*) p; @@ -6783,11 +7108,10 @@ static llparse_state_t llhttp__internal__run( err = llhttp__on_chunk_extension_name(state, start, p); if (err != 0) { state->error = err; - state->error_pos = (const char*) (p + 1); + state->error_pos = (const char*) p; state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete; return s_error; } - p++; goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete; /* UNREACHABLE */; abort(); @@ -6796,12 +7120,12 @@ static llparse_state_t llhttp__internal__run( state->error = 0x15; state->reason = "on_chunk_extension_name pause"; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_16: { + s_n_llhttp__internal__n_error_21: { state->error = 0x22; state->reason = "`on_chunk_extension_name` callback error"; state->error_pos = (const char*) p; @@ -6830,14 +7154,59 @@ static llparse_state_t llhttp__internal__run( } s_n_llhttp__internal__n_pause_7: { state->error = 0x15; + state->reason = "on_chunk_extension_name pause"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_22: { + state->error = 0x22; + state->reason = "`on_chunk_extension_name` callback error"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_chunk_extension_name(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_invoke_llhttp__on_chunk_extension_name_complete_2; + return s_error; + } + p++; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_25: { + state->error = 0x19; + state->reason = "Missing expected CR after chunk extension value"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_8: { + state->error = 0x15; state->reason = "on_chunk_extension_value pause"; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_10; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_18: { + s_n_llhttp__internal__n_error_24: { state->error = 0x23; state->reason = "`on_chunk_extension_value` callback error"; state->error_pos = (const char*) p; @@ -6855,16 +7224,70 @@ static llparse_state_t llhttp__internal__run( err = llhttp__on_chunk_extension_value(state, start, p); if (err != 0) { state->error = err; - state->error_pos = (const char*) (p + 1); + state->error_pos = (const char*) p; state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete; return s_error; } - p++; goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_pause_9: { + state->error = 0x15; + state->reason = "on_chunk_extension_value pause"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_almost_done; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_26: { + state->error = 0x23; + state->reason = "`on_chunk_extension_value` callback error"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_chunk_extension_value(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_invoke_llhttp__on_chunk_extension_value_complete_1; + return s_error; + } + p++; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_28: { + state->error = 0x19; + state->reason = "Missing expected CR after chunk extension 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_lenient_flags_11: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_chunk_size_almost_done; + default: + goto s_n_llhttp__internal__n_error_28; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_29: { state->error = 0x2; state->reason = "Invalid character in chunk extensions quote value"; state->error_pos = (const char*) p; @@ -6873,7 +7296,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_8: { + s_n_llhttp__internal__n_pause_10: { state->error = 0x15; state->reason = "on_chunk_extension_value pause"; state->error_pos = (const char*) p; @@ -6882,7 +7305,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_19: { + s_n_llhttp__internal__n_error_27: { state->error = 0x23; state->reason = "`on_chunk_extension_value` callback error"; state->error_pos = (const char*) p; @@ -6891,7 +7314,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_1: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2: { const unsigned char* start; int err; @@ -6901,14 +7324,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_invoke_llhttp__on_chunk_extension_value_complete_1; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2; return s_error; } - goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_1; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_2: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3: { const unsigned char* start; int err; @@ -6918,24 +7341,42 @@ 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_21; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30; return s_error; } p++; - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_30; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_9: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_chunk_extension_value(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_31; + return s_error; + } + p++; + goto s_n_llhttp__internal__n_error_31; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_11: { state->error = 0x15; state->reason = "on_chunk_extension_value pause"; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_size_otherwise; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_extensions; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_22: { + s_n_llhttp__internal__n_error_32: { state->error = 0x23; state->reason = "`on_chunk_extension_value` callback error"; state->error_pos = (const char*) p; @@ -6944,7 +7385,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_3: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_5: { const unsigned char* start; int err; @@ -6954,15 +7395,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_invoke_llhttp__on_chunk_extension_value_complete_2; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3; return s_error; } p++; - goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_2; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_value_complete_3; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_4: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_value_6: { const unsigned char* start; int err; @@ -6972,15 +7413,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_33; return s_error; } p++; - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_33; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_10: { + s_n_llhttp__internal__n_pause_12: { state->error = 0x15; state->reason = "on_chunk_extension_name pause"; state->error_pos = (const char*) p; @@ -6989,7 +7430,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_17: { + s_n_llhttp__internal__n_error_23: { state->error = 0x22; state->reason = "`on_chunk_extension_name` callback error"; state->error_pos = (const char*) p; @@ -6998,19 +7439,19 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_2: { + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_extension_name_complete_3: { switch (llhttp__on_chunk_extension_name_complete(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_chunk_extension_value; case 21: - goto s_n_llhttp__internal__n_pause_10; + goto s_n_llhttp__internal__n_pause_12; default: - goto s_n_llhttp__internal__n_error_17; + goto s_n_llhttp__internal__n_error_23; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_2: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3: { const unsigned char* start; int err; @@ -7028,7 +7469,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_3: { + s_n_llhttp__internal__n_span_end_llhttp__on_chunk_extension_name_4: { const unsigned char* start; int err; @@ -7038,15 +7479,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_24; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_34; return s_error; } p++; - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_34; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_25: { + s_n_llhttp__internal__n_error_35: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -7058,14 +7499,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_26; + goto s_n_llhttp__internal__n_error_36; default: goto s_n_llhttp__internal__n_chunk_size; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_37: { state->error = 0xc; state->reason = "Invalid character in chunk size"; state->error_pos = (const char*) p; @@ -7074,24 +7515,6 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_11: { - state->error = 0x15; - state->reason = "on_message_complete pause"; - state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_upgrade; - return s_error; - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_error_28: { - state->error = 0x12; - state->reason = "`on_message_complete` callback error"; - state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_error; - return s_error; - /* UNREACHABLE */; - abort(); - } s_n_llhttp__internal__n_span_end_llhttp__on_body_1: { const unsigned char* start; int err; @@ -7117,7 +7540,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_39: { state->error = 0xf; state->reason = "Request has invalid `Transfer-Encoding`"; state->error_pos = (const char*) p; @@ -7135,7 +7558,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_6: { + s_n_llhttp__internal__n_error_7: { state->error = 0x12; state->reason = "`on_message_complete` callback error"; state->error_pos = (const char*) p; @@ -7151,22 +7574,98 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause; default: + goto s_n_llhttp__internal__n_error_7; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_or_flags_1: { + switch (llhttp__internal__c_or_flags_1(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_or_flags_2: { + switch (llhttp__internal__c_or_flags_1(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_update_upgrade: { + switch (llhttp__internal__c_update_upgrade(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_invoke_or_flags_2; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_14: { + state->error = 0x15; + state->reason = "Paused by on_headers_complete"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_6: { + state->error = 0x11; + state->reason = "User callback error"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete: { + switch (llhttp__on_headers_complete(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; + case 1: + goto s_n_llhttp__internal__n_invoke_or_flags_1; + case 2: + goto s_n_llhttp__internal__n_invoke_update_upgrade; + case 21: + goto s_n_llhttp__internal__n_pause_14; + default: goto s_n_llhttp__internal__n_error_6; } /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete: { + switch (llhttp__before_headers_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags: { + switch (llhttp__internal__c_test_flags(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1; + default: + goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_test_lenient_flags_1: { - switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; + goto s_n_llhttp__internal__n_invoke_test_flags; default: goto s_n_llhttp__internal__n_error_5; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_13: { + s_n_llhttp__internal__n_pause_17: { state->error = 0x15; state->reason = "on_chunk_complete pause"; state->error_pos = (const char*) p; @@ -7175,7 +7674,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_42: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -7184,28 +7683,19 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1: { + s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2: { switch (llhttp__on_chunk_complete(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2; case 21: - goto s_n_llhttp__internal__n_pause_13; + goto s_n_llhttp__internal__n_pause_17; default: - goto s_n_llhttp__internal__n_error_32; + goto s_n_llhttp__internal__n_error_42; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { - state->error = 0x4; - state->reason = "Content-Length can't be present with Transfer-Encoding"; - state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_error; - return s_error; - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_invoke_or_flags_1: { + s_n_llhttp__internal__n_invoke_or_flags_3: { switch (llhttp__internal__c_or_flags_1(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; @@ -7213,7 +7703,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_2: { + s_n_llhttp__internal__n_invoke_or_flags_4: { switch (llhttp__internal__c_or_flags_1(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; @@ -7221,15 +7711,15 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_update_upgrade: { + s_n_llhttp__internal__n_invoke_update_upgrade_1: { switch (llhttp__internal__c_update_upgrade(state, p, endp)) { default: - goto s_n_llhttp__internal__n_invoke_or_flags_2; + goto s_n_llhttp__internal__n_invoke_or_flags_4; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_12: { + s_n_llhttp__internal__n_pause_16: { state->error = 0x15; state->reason = "Paused by on_headers_complete"; state->error_pos = (const char*) p; @@ -7238,7 +7728,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_41: { state->error = 0x11; state->reason = "User callback error"; state->error_pos = (const char*) p; @@ -7247,61 +7737,41 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete: { + s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1: { switch (llhttp__on_headers_complete(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete; case 1: - goto s_n_llhttp__internal__n_invoke_or_flags_1; + goto s_n_llhttp__internal__n_invoke_or_flags_3; case 2: - goto s_n_llhttp__internal__n_invoke_update_upgrade; + goto s_n_llhttp__internal__n_invoke_update_upgrade_1; case 21: - goto s_n_llhttp__internal__n_pause_12; + goto s_n_llhttp__internal__n_pause_16; default: - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_41; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete: { + s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1: { switch (llhttp__before_headers_complete(state, p, endp)) { default: - goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete; - } - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_invoke_test_lenient_flags_6: { - switch (llhttp__internal__c_test_lenient_flags_6(state, p, endp)) { - case 0: - goto s_n_llhttp__internal__n_error_31; - default: - goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; + goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete_1; } /* UNREACHABLE */; abort(); } s_n_llhttp__internal__n_invoke_test_flags_1: { - switch (llhttp__internal__c_test_flags_1(state, p, endp)) { - case 1: - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_6; - default: - goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; - } - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_invoke_test_flags: { switch (llhttp__internal__c_test_flags(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1; + goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_2; default: - goto s_n_llhttp__internal__n_invoke_test_flags_1; + goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete_1; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_43: { state->error = 0x2; state->reason = "Expected LF after headers"; state->error_pos = (const char*) p; @@ -7310,16 +7780,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_7: { - switch (llhttp__internal__c_test_lenient_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_12: { + switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { case 1: - goto s_n_llhttp__internal__n_invoke_test_flags; + goto s_n_llhttp__internal__n_invoke_test_flags_1; default: - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_43; } /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_44: { + state->error = 0xa; + state->reason = "Invalid header token"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_span_end_llhttp__on_header_field: { const unsigned char* start; int err; @@ -7338,7 +7817,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_8: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_13: { switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_field_colon_discard_ws; @@ -7348,7 +7827,16 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_59: { + state->error = 0xb; + state->reason = "Content-Length can't be present with Transfer-Encoding"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_47: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -7357,17 +7845,17 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_10: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_15: { switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_discard_ws; default: - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_47; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_49: { state->error = 0xb; state->reason = "Empty Content-Length"; state->error_pos = (const char*) p; @@ -7376,7 +7864,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_14: { + s_n_llhttp__internal__n_pause_18: { state->error = 0x15; state->reason = "on_header_value_complete pause"; state->error_pos = (const char*) p; @@ -7385,7 +7873,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_48: { state->error = 0x1d; state->reason = "`on_header_value_complete` callback error"; state->error_pos = (const char*) p; @@ -7419,65 +7907,65 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_3: { - switch (llhttp__internal__c_or_flags_3(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_5: { + switch (llhttp__internal__c_or_flags_5(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_4: { - switch (llhttp__internal__c_or_flags_4(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_6: { + switch (llhttp__internal__c_or_flags_6(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_5: { - switch (llhttp__internal__c_or_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_7: { + switch (llhttp__internal__c_or_flags_7(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_6: { - switch (llhttp__internal__c_or_flags_6(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_8: { + switch (llhttp__internal__c_or_flags_8(state, p, endp)) { default: goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state_1: { + s_n_llhttp__internal__n_invoke_load_header_state_2: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 5: - goto s_n_llhttp__internal__n_invoke_or_flags_3; + goto s_n_llhttp__internal__n_invoke_or_flags_5; case 6: - goto s_n_llhttp__internal__n_invoke_or_flags_4; + goto s_n_llhttp__internal__n_invoke_or_flags_6; case 7: - goto s_n_llhttp__internal__n_invoke_or_flags_5; + goto s_n_llhttp__internal__n_invoke_or_flags_7; case 8: - goto s_n_llhttp__internal__n_invoke_or_flags_6; + goto s_n_llhttp__internal__n_invoke_or_flags_8; default: goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state: { + s_n_llhttp__internal__n_invoke_load_header_state_1: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 2: - goto s_n_llhttp__internal__n_error_38; + goto s_n_llhttp__internal__n_error_49; default: - goto s_n_llhttp__internal__n_invoke_load_header_state_1; + goto s_n_llhttp__internal__n_invoke_load_header_state_2; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_46: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -7486,17 +7974,17 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_9: { - switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_14: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_discard_lws; default: - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_46; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_50: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -7505,12 +7993,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_11: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_16: { switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_discard_lws; default: - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_50; } /* UNREACHABLE */; abort(); @@ -7523,7 +8011,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state_3: { + s_n_llhttp__internal__n_invoke_load_header_state_4: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 8: goto s_n_llhttp__internal__n_invoke_update_header_state_1; @@ -7541,55 +8029,55 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_7: { - switch (llhttp__internal__c_or_flags_3(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_9: { + switch (llhttp__internal__c_or_flags_5(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_2; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_8: { - switch (llhttp__internal__c_or_flags_4(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_10: { + switch (llhttp__internal__c_or_flags_6(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_2; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_9: { - switch (llhttp__internal__c_or_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_11: { + switch (llhttp__internal__c_or_flags_7(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_2; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_10: { - switch (llhttp__internal__c_or_flags_6(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_12: { + switch (llhttp__internal__c_or_flags_8(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state_4: { + s_n_llhttp__internal__n_invoke_load_header_state_5: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 5: - goto s_n_llhttp__internal__n_invoke_or_flags_7; + goto s_n_llhttp__internal__n_invoke_or_flags_9; case 6: - goto s_n_llhttp__internal__n_invoke_or_flags_8; + goto s_n_llhttp__internal__n_invoke_or_flags_10; case 7: - goto s_n_llhttp__internal__n_invoke_or_flags_9; + goto s_n_llhttp__internal__n_invoke_or_flags_11; case 8: - goto s_n_llhttp__internal__n_invoke_or_flags_10; + goto s_n_llhttp__internal__n_invoke_or_flags_12; default: goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_52: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -7598,6 +8086,15 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_51: { + state->error = 0x19; + state->reason = "Missing expected CR 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_span_end_llhttp__on_header_value_1: { const unsigned char* start; int err; @@ -7607,6 +8104,23 @@ static llparse_state_t llhttp__internal__run( err = llhttp__on_header_value(state, start, p); if (err != 0) { state->error = err; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_17; + return s_error; + } + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_17; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: { + const unsigned char* start; + int err; + + start = state->_span_pos0; + state->_span_pos0 = NULL; + err = llhttp__on_header_value(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_header_value_almost_done; return s_error; @@ -7616,7 +8130,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: { const unsigned char* start; int err; @@ -7633,7 +8147,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: { const unsigned char* start; int err; @@ -7651,7 +8165,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: { const unsigned char* start; int err; @@ -7661,19 +8175,19 @@ 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_41; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_53; return s_error; } - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_53; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_12: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_18: { switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; default: - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3; } /* UNREACHABLE */; abort(); @@ -7686,48 +8200,48 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_11: { - switch (llhttp__internal__c_or_flags_3(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_13: { + switch (llhttp__internal__c_or_flags_5(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_4; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_12: { - switch (llhttp__internal__c_or_flags_4(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_14: { + switch (llhttp__internal__c_or_flags_6(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_4; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_13: { - switch (llhttp__internal__c_or_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_15: { + switch (llhttp__internal__c_or_flags_7(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_4; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_14: { - switch (llhttp__internal__c_or_flags_6(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_16: { + switch (llhttp__internal__c_or_flags_8(state, p, endp)) { default: goto s_n_llhttp__internal__n_header_value_connection; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state_5: { + s_n_llhttp__internal__n_invoke_load_header_state_6: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 5: - goto s_n_llhttp__internal__n_invoke_or_flags_11; + goto s_n_llhttp__internal__n_invoke_or_flags_13; case 6: - goto s_n_llhttp__internal__n_invoke_or_flags_12; + goto s_n_llhttp__internal__n_invoke_or_flags_14; case 7: - goto s_n_llhttp__internal__n_invoke_or_flags_13; + goto s_n_llhttp__internal__n_invoke_or_flags_15; case 8: - goto s_n_llhttp__internal__n_invoke_or_flags_14; + goto s_n_llhttp__internal__n_invoke_or_flags_16; default: goto s_n_llhttp__internal__n_header_value_connection; } @@ -7766,7 +8280,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: { const unsigned char* start; int err; @@ -7776,32 +8290,32 @@ 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_43; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_55; return s_error; } - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_55; /* UNREACHABLE */; abort(); } s_n_llhttp__internal__n_invoke_mul_add_content_length_1: { switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6; default: goto s_n_llhttp__internal__n_header_value_content_length; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_15: { - switch (llhttp__internal__c_or_flags_15(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_17: { + switch (llhttp__internal__c_or_flags_17(state, p, endp)) { default: goto s_n_llhttp__internal__n_header_value_otherwise; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: { const unsigned char* start; int err; @@ -7811,14 +8325,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_44; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_56; return s_error; } - goto s_n_llhttp__internal__n_error_44; + goto s_n_llhttp__internal__n_error_56; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_54: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -7832,12 +8346,12 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_54; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9: { const unsigned char* start; int err; @@ -7847,11 +8361,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_46; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_58; return s_error; } p++; - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_58; /* UNREACHABLE */; abort(); } @@ -7863,7 +8377,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: { + s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: { const unsigned char* start; int err; @@ -7873,18 +8387,18 @@ 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_45; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_57; return s_error; } p++; - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_57; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_13: { - switch (llhttp__internal__c_test_lenient_flags_13(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_19: { + switch (llhttp__internal__c_test_lenient_flags_19(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8; default: goto s_n_llhttp__internal__n_header_value_te_chunked; } @@ -7894,7 +8408,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_lenient_flags_13; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_19; default: goto s_n_llhttp__internal__n_header_value_te_chunked; } @@ -7917,20 +8431,20 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_17: { - switch (llhttp__internal__c_or_flags_16(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_19: { + switch (llhttp__internal__c_or_flags_18(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_and_flags; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_14: { - switch (llhttp__internal__c_test_lenient_flags_13(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_20: { + switch (llhttp__internal__c_test_lenient_flags_19(state, p, endp)) { case 0: - goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8; + goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_9; default: - goto s_n_llhttp__internal__n_invoke_or_flags_17; + goto s_n_llhttp__internal__n_invoke_or_flags_19; } /* UNREACHABLE */; abort(); @@ -7938,15 +8452,15 @@ 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_lenient_flags_14; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_20; default: - goto s_n_llhttp__internal__n_invoke_or_flags_17; + goto s_n_llhttp__internal__n_invoke_or_flags_19; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_16: { - switch (llhttp__internal__c_or_flags_16(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_18: { + switch (llhttp__internal__c_or_flags_18(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_and_flags; } @@ -7958,20 +8472,20 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_invoke_load_type_2; default: - goto s_n_llhttp__internal__n_invoke_or_flags_16; + goto s_n_llhttp__internal__n_invoke_or_flags_18; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_or_flags_18: { - switch (llhttp__internal__c_or_flags_18(state, p, endp)) { + s_n_llhttp__internal__n_invoke_or_flags_20: { + switch (llhttp__internal__c_or_flags_20(state, p, endp)) { default: goto s_n_llhttp__internal__n_invoke_update_header_state_9; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_load_header_state_2: { + s_n_llhttp__internal__n_invoke_load_header_state_3: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_connection; @@ -7980,23 +8494,72 @@ static llparse_state_t llhttp__internal__run( case 3: goto s_n_llhttp__internal__n_invoke_test_flags_3; case 4: - goto s_n_llhttp__internal__n_invoke_or_flags_18; + goto s_n_llhttp__internal__n_invoke_or_flags_20; default: goto s_n_llhttp__internal__n_header_value; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_15: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_21: { + switch (llhttp__internal__c_test_lenient_flags_21(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_error_59; + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_test_flags_4: { + switch (llhttp__internal__c_test_flags_4(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_21; + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_60: { + state->error = 0xf; + state->reason = "Transfer-Encoding can't be present with Content-Length"; + 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_lenient_flags_22: { + switch (llhttp__internal__c_test_lenient_flags_21(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_error_60; + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } + 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_invoke_test_lenient_flags_22; + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_19: { state->error = 0x15; state->reason = "on_header_field_complete pause"; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_discard_ws; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_header_state; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_45: { state->error = 0x1c; state->reason = "`on_header_field_complete` callback error"; state->error_pos = (const char*) p; @@ -8041,7 +8604,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_61: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -8093,7 +8656,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_16: { + s_n_llhttp__internal__n_pause_20: { state->error = 0x15; state->reason = "on_url_complete pause"; state->error_pos = (const char*) p; @@ -8116,7 +8679,7 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_headers_start; case 21: - goto s_n_llhttp__internal__n_pause_16; + goto s_n_llhttp__internal__n_pause_20; default: goto s_n_llhttp__internal__n_error_3; } @@ -8156,7 +8719,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_48: { + s_n_llhttp__internal__n_error_62: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -8182,7 +8745,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_55: { + s_n_llhttp__internal__n_error_70: { state->error = 0x17; state->reason = "Pause on PRI/Upgrade"; state->error_pos = (const char*) p; @@ -8191,7 +8754,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_56: { + s_n_llhttp__internal__n_error_71: { state->error = 0x9; state->reason = "Expected HTTP/2 Connection Preface"; state->error_pos = (const char*) p; @@ -8200,7 +8763,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_53: { + s_n_llhttp__internal__n_error_68: { state->error = 0x2; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -8209,17 +8772,17 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_16: { - switch (llhttp__internal__c_test_lenient_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_25: { + switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_headers_start; default: - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_68; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_54: { + s_n_llhttp__internal__n_error_67: { state->error = 0x9; state->reason = "Expected CRLF after version"; state->error_pos = (const char*) p; @@ -8228,7 +8791,26 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_17: { + s_n_llhttp__internal__n_invoke_test_lenient_flags_24: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_req_http_complete_crlf; + default: + goto s_n_llhttp__internal__n_error_67; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_69: { + state->error = 0x9; + state->reason = "Expected CRLF after version"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_pause_21: { state->error = 0x15; state->reason = "on_version_complete pause"; state->error_pos = (const char*) p; @@ -8237,7 +8819,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_52: { + s_n_llhttp__internal__n_error_66: { state->error = 0x21; state->reason = "`on_version_complete` callback error"; state->error_pos = (const char*) p; @@ -8273,10 +8855,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_51; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_65; return s_error; } - goto s_n_llhttp__internal__n_error_51; + goto s_n_llhttp__internal__n_error_65; /* UNREACHABLE */; abort(); } @@ -8326,8 +8908,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_15: { - switch (llhttp__internal__c_test_lenient_flags_15(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_23: { + switch (llhttp__internal__c_test_lenient_flags_23(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_span_end_llhttp__on_version_1; default: @@ -8339,7 +8921,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_store_http_minor: { switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) { default: - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_15; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_23; } /* UNREACHABLE */; abort(); @@ -8354,10 +8936,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_57; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_72; return s_error; } - goto s_n_llhttp__internal__n_error_57; + goto s_n_llhttp__internal__n_error_72; /* UNREACHABLE */; abort(); } @@ -8371,10 +8953,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_58; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_73; return s_error; } - goto s_n_llhttp__internal__n_error_58; + goto s_n_llhttp__internal__n_error_73; /* UNREACHABLE */; abort(); } @@ -8396,14 +8978,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_59; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_74; return s_error; } - goto s_n_llhttp__internal__n_error_59; + goto s_n_llhttp__internal__n_error_74; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_50: { + s_n_llhttp__internal__n_error_64: { state->error = 0x8; state->reason = "Invalid method for HTTP/x.x request"; state->error_pos = (const char*) p; @@ -8484,13 +9066,15 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_start_llhttp__on_version; case 34: goto s_n_llhttp__internal__n_span_start_llhttp__on_version; + case 46: + goto s_n_llhttp__internal__n_span_start_llhttp__on_version; default: - goto s_n_llhttp__internal__n_error_50; + goto s_n_llhttp__internal__n_error_64; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_62: { + s_n_llhttp__internal__n_error_77: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -8499,7 +9083,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_60: { + s_n_llhttp__internal__n_error_75: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -8513,12 +9097,12 @@ static llparse_state_t llhttp__internal__run( case 33: goto s_n_llhttp__internal__n_span_start_llhttp__on_version; default: - goto s_n_llhttp__internal__n_error_60; + goto s_n_llhttp__internal__n_error_75; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_61: { + s_n_llhttp__internal__n_error_76: { state->error = 0x8; state->reason = "Invalid method for RTSP/x.x request"; state->error_pos = (const char*) p; @@ -8558,12 +9142,12 @@ static llparse_state_t llhttp__internal__run( case 45: goto s_n_llhttp__internal__n_span_start_llhttp__on_version; default: - goto s_n_llhttp__internal__n_error_61; + goto s_n_llhttp__internal__n_error_76; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_18: { + s_n_llhttp__internal__n_pause_22: { state->error = 0x15; state->reason = "on_url_complete pause"; state->error_pos = (const char*) p; @@ -8572,7 +9156,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_49: { + s_n_llhttp__internal__n_error_63: { state->error = 0x1a; state->reason = "`on_url_complete` callback error"; state->error_pos = (const char*) p; @@ -8586,9 +9170,9 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_req_http_start; case 21: - goto s_n_llhttp__internal__n_pause_18; + goto s_n_llhttp__internal__n_pause_22; default: - goto s_n_llhttp__internal__n_error_49; + goto s_n_llhttp__internal__n_error_63; } /* UNREACHABLE */; abort(); @@ -8661,7 +9245,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_63: { + s_n_llhttp__internal__n_error_78: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -8721,7 +9305,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_64: { + s_n_llhttp__internal__n_error_79: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -8730,7 +9314,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_65: { + s_n_llhttp__internal__n_error_80: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -8841,7 +9425,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_66: { + s_n_llhttp__internal__n_error_81: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -8850,7 +9434,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_67: { + s_n_llhttp__internal__n_error_82: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -8859,7 +9443,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_68: { + s_n_llhttp__internal__n_error_83: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -8868,7 +9452,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_69: { + s_n_llhttp__internal__n_error_84: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -8877,7 +9461,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_70: { + s_n_llhttp__internal__n_error_85: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -8886,7 +9470,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_71: { + s_n_llhttp__internal__n_error_86: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -8905,7 +9489,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_72: { + s_n_llhttp__internal__n_error_87: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -8914,7 +9498,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_22: { + s_n_llhttp__internal__n_pause_26: { state->error = 0x15; state->reason = "on_method_complete pause"; state->error_pos = (const char*) p; @@ -8923,7 +9507,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_89: { + s_n_llhttp__internal__n_error_106: { state->error = 0x20; state->reason = "`on_method_complete` callback error"; state->error_pos = (const char*) p; @@ -8957,7 +9541,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_90: { + s_n_llhttp__internal__n_error_107: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -8966,7 +9550,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_82: { + s_n_llhttp__internal__n_error_99: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -8975,7 +9559,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_80: { + s_n_llhttp__internal__n_error_97: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -8984,7 +9568,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_78: { + s_n_llhttp__internal__n_error_95: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -8993,7 +9577,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_20: { + s_n_llhttp__internal__n_pause_24: { state->error = 0x15; state->reason = "on_status_complete pause"; state->error_pos = (const char*) p; @@ -9002,7 +9586,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_75: { + s_n_llhttp__internal__n_error_91: { state->error = 0x1b; state->reason = "`on_status_complete` callback error"; state->error_pos = (const char*) p; @@ -9016,14 +9600,33 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_headers_start; case 21: - goto s_n_llhttp__internal__n_pause_20; + goto s_n_llhttp__internal__n_pause_24; default: - goto s_n_llhttp__internal__n_error_75; + goto s_n_llhttp__internal__n_error_91; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_76: { + s_n_llhttp__internal__n_error_90: { + state->error = 0xd; + state->reason = "Invalid response status"; + 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_lenient_flags_27: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; + default: + goto s_n_llhttp__internal__n_error_90; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_92: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -9032,16 +9635,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_18: { - switch (llhttp__internal__c_test_lenient_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_28: { + switch (llhttp__internal__c_test_lenient_flags_8(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; default: - goto s_n_llhttp__internal__n_error_76; + goto s_n_llhttp__internal__n_error_92; } /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_93: { + state->error = 0x19; + state->reason = "Missing expected CR after response line"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_span_end_llhttp__on_status: { const unsigned char* start; int err; @@ -9052,11 +9664,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_res_line_almost_done; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_test_lenient_flags_29; return s_error; } p++; - goto s_n_llhttp__internal__n_res_line_almost_done; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_29; /* UNREACHABLE */; abort(); } @@ -9078,7 +9690,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_77: { + s_n_llhttp__internal__n_error_94: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -9090,14 +9702,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code_2: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_78; + goto s_n_llhttp__internal__n_error_95; default: goto s_n_llhttp__internal__n_res_status_code_otherwise; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_79: { + s_n_llhttp__internal__n_error_96: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -9109,14 +9721,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code_1: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_80; + goto s_n_llhttp__internal__n_error_97; default: goto s_n_llhttp__internal__n_res_status_code_digit_3; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_81: { + s_n_llhttp__internal__n_error_98: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -9128,14 +9740,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_82; + goto s_n_llhttp__internal__n_error_99; default: goto s_n_llhttp__internal__n_res_status_code_digit_2; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_83: { + s_n_llhttp__internal__n_error_100: { state->error = 0xd; state->reason = "Invalid status code"; state->error_pos = (const char*) p; @@ -9152,7 +9764,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_84: { + s_n_llhttp__internal__n_error_101: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -9161,7 +9773,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_21: { + s_n_llhttp__internal__n_pause_25: { state->error = 0x15; state->reason = "on_version_complete pause"; state->error_pos = (const char*) p; @@ -9170,7 +9782,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_74: { + s_n_llhttp__internal__n_error_89: { state->error = 0x21; state->reason = "`on_version_complete` callback error"; state->error_pos = (const char*) p; @@ -9206,10 +9818,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_73; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_88; return s_error; } - goto s_n_llhttp__internal__n_error_73; + goto s_n_llhttp__internal__n_error_88; /* UNREACHABLE */; abort(); } @@ -9259,8 +9871,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_lenient_flags_17: { - switch (llhttp__internal__c_test_lenient_flags_15(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_26: { + switch (llhttp__internal__c_test_lenient_flags_23(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_span_end_llhttp__on_version_6; default: @@ -9272,7 +9884,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_store_http_minor_1: { switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) { default: - goto s_n_llhttp__internal__n_invoke_test_lenient_flags_17; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_26; } /* UNREACHABLE */; abort(); @@ -9287,10 +9899,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_85; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_102; return s_error; } - goto s_n_llhttp__internal__n_error_85; + goto s_n_llhttp__internal__n_error_102; /* UNREACHABLE */; abort(); } @@ -9304,10 +9916,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_86; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_103; return s_error; } - goto s_n_llhttp__internal__n_error_86; + goto s_n_llhttp__internal__n_error_103; /* UNREACHABLE */; abort(); } @@ -9329,14 +9941,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_87; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_104; return s_error; } - goto s_n_llhttp__internal__n_error_87; + goto s_n_llhttp__internal__n_error_104; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_91: { + s_n_llhttp__internal__n_error_108: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -9345,7 +9957,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_19: { + s_n_llhttp__internal__n_pause_23: { state->error = 0x15; state->reason = "on_method_complete pause"; state->error_pos = (const char*) p; @@ -9396,7 +10008,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_88: { + s_n_llhttp__internal__n_error_105: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; @@ -9430,7 +10042,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_23: { + s_n_llhttp__internal__n_pause_27: { state->error = 0x15; state->reason = "on_message_begin pause"; state->error_pos = (const char*) p; @@ -9453,14 +10065,14 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_invoke_load_type; case 21: - goto s_n_llhttp__internal__n_pause_23; + goto s_n_llhttp__internal__n_pause_27; default: goto s_n_llhttp__internal__n_error; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_pause_24: { + s_n_llhttp__internal__n_pause_28: { state->error = 0x15; state->reason = "on_reset pause"; state->error_pos = (const char*) p; @@ -9469,7 +10081,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_92: { + s_n_llhttp__internal__n_error_109: { state->error = 0x1f; state->reason = "`on_reset` callback error"; state->error_pos = (const char*) p; @@ -9483,9 +10095,9 @@ static llparse_state_t llhttp__internal__run( case 0: goto s_n_llhttp__internal__n_invoke_update_finish; case 21: - goto s_n_llhttp__internal__n_pause_24; + goto s_n_llhttp__internal__n_pause_28; default: - goto s_n_llhttp__internal__n_error_92; + goto s_n_llhttp__internal__n_error_109; } /* UNREACHABLE */; abort(); |