From 6a1986d50a8f511ae20eb0cdc32659e67d79852b Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 7 Apr 2021 21:04:06 -0700 Subject: [PATCH] deps: update llhttp to 5.1.0 PR-URL: https://github.com/nodejs/node/pull/38146 Reviewed-By: Matteo Collina Reviewed-By: Robert Nagy Reviewed-By: Jiawen Geng Reviewed-By: Daniele Belardi --- deps/llhttp/README.md | 10 +- deps/llhttp/include/llhttp.h | 145 +- deps/llhttp/src/api.c | 134 +- deps/llhttp/src/http.c | 7 +- deps/llhttp/src/llhttp.c | 4175 +++++++++++------ lib/_http_client.js | 8 +- lib/_http_server.js | 11 +- src/node_http_parser.cc | 50 +- test/parallel/test-http-methods.js | 55 +- .../test-http-parser-timeout-reset.js | 2 +- ...est-http-pipeline-assertionerror-finish.js | 2 +- ...p-server-destroy-socket-on-client-error.js | 2 +- .../test-http2-client-http1-server.js | 15 +- 13 files changed, 3241 insertions(+), 1375 deletions(-) diff --git a/deps/llhttp/README.md b/deps/llhttp/README.md index c95e8d045843e0..ff72e07f8ba99d 100644 --- a/deps/llhttp/README.md +++ b/deps/llhttp/README.md @@ -1,4 +1,5 @@ # llhttp +[![CI](https://github.com/nodejs/llhttp/workflows/CI/badge.svg)](https://github.com/nodejs/llhttp/actions?query=workflow%3ACI) Port of [http_parser][0] to [llparse][1]. @@ -31,7 +32,7 @@ So far llhttp outperforms http_parser: | | input size | bandwidth | reqs/sec | time | |:----------------|-----------:|-------------:|-----------:|--------:| -| **llhttp** | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s | +| **llhttp** | 8192.00 mb | 1777.24 mb/s | 3583799.39 req/sec | 4.61 s | | **http_parser** | 8192.00 mb | 694.66 mb/s | 1406180.33 req/sec | 11.79 s | llhttp is faster by approximately **156%**. @@ -92,6 +93,11 @@ if (err == HPE_OK) { --- +### Bindings to other languages + +* Python: [pallas/pyllhttp][8] +* Ruby: [metabahn/llhttp][9] + #### LICENSE This software is licensed under the MIT License. @@ -125,3 +131,5 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. [5]: https://llvm.org/docs/LangRef.html#call-instruction [6]: https://clang.llvm.org/ [7]: https://github.com/nodejs/node +[8]: https://github.com/pallas/pyllhttp +[9]: https://github.com/metabahn/llhttp diff --git a/deps/llhttp/include/llhttp.h b/deps/llhttp/include/llhttp.h index 4bf4d8b0cef85f..8f9590d350c749 100644 --- a/deps/llhttp/include/llhttp.h +++ b/deps/llhttp/include/llhttp.h @@ -1,9 +1,9 @@ #ifndef INCLUDE_LLHTTP_H_ #define INCLUDE_LLHTTP_H_ -#define LLHTTP_VERSION_MAJOR 2 +#define LLHTTP_VERSION_MAJOR 5 #define LLHTTP_VERSION_MINOR 1 -#define LLHTTP_VERSION_PATCH 3 +#define LLHTTP_VERSION_PATCH 0 #ifndef LLHTTP_STRICT_MODE # define LLHTTP_STRICT_MODE 0 @@ -33,10 +33,11 @@ struct llhttp__internal_s { uint8_t http_major; uint8_t http_minor; uint8_t header_state; - uint16_t flags; + uint8_t lenient_flags; uint8_t upgrade; - uint16_t status_code; uint8_t finish; + uint16_t flags; + uint16_t status_code; void* settings; }; @@ -78,7 +79,8 @@ enum llhttp_errno { HPE_CB_CHUNK_COMPLETE = 20, HPE_PAUSED = 21, HPE_PAUSED_UPGRADE = 22, - HPE_USER = 23 + HPE_PAUSED_H2_UPGRADE = 23, + HPE_USER = 24 }; typedef enum llhttp_errno llhttp_errno_t; @@ -91,11 +93,17 @@ enum llhttp_flags { F_CONTENT_LENGTH = 0x20, F_SKIPBODY = 0x40, F_TRAILING = 0x80, - F_LENIENT = 0x100, F_TRANSFER_ENCODING = 0x200 }; typedef enum llhttp_flags llhttp_flags_t; +enum llhttp_lenient_flags { + LENIENT_HEADERS = 0x1, + LENIENT_CHUNKED_LENGTH = 0x2, + LENIENT_KEEP_ALIVE = 0x4 +}; +typedef enum llhttp_lenient_flags llhttp_lenient_flags_t; + enum llhttp_type { HTTP_BOTH = 0, HTTP_REQUEST = 1, @@ -145,7 +153,18 @@ enum llhttp_method { HTTP_LINK = 31, HTTP_UNLINK = 32, HTTP_SOURCE = 33, - HTTP_PRI = 34 + HTTP_PRI = 34, + HTTP_DESCRIBE = 35, + HTTP_ANNOUNCE = 36, + HTTP_SETUP = 37, + HTTP_PLAY = 38, + HTTP_PAUSE = 39, + HTTP_TEARDOWN = 40, + HTTP_GET_PARAMETER = 41, + HTTP_SET_PARAMETER = 42, + HTTP_REDIRECT = 43, + HTTP_RECORD = 44, + HTTP_FLUSH = 45 }; typedef enum llhttp_method llhttp_method_t; @@ -173,7 +192,8 @@ typedef enum llhttp_method llhttp_method_t; XX(20, CB_CHUNK_COMPLETE, CB_CHUNK_COMPLETE) \ XX(21, PAUSED, PAUSED) \ XX(22, PAUSED_UPGRADE, PAUSED_UPGRADE) \ - XX(23, USER, USER) \ + XX(23, PAUSED_H2_UPGRADE, PAUSED_H2_UPGRADE) \ + XX(24, USER, USER) \ #define HTTP_METHOD_MAP(XX) \ @@ -212,6 +232,17 @@ typedef enum llhttp_method llhttp_method_t; XX(32, UNLINK, UNLINK) \ XX(33, SOURCE, SOURCE) \ XX(34, PRI, PRI) \ + XX(35, DESCRIBE, DESCRIBE) \ + XX(36, ANNOUNCE, ANNOUNCE) \ + XX(37, SETUP, SETUP) \ + XX(38, PLAY, PLAY) \ + XX(39, PAUSE, PAUSE) \ + XX(40, TEARDOWN, TEARDOWN) \ + XX(41, GET_PARAMETER, GET_PARAMETER) \ + XX(42, SET_PARAMETER, SET_PARAMETER) \ + XX(43, REDIRECT, REDIRECT) \ + XX(44, RECORD, RECORD) \ + XX(45, FLUSH, FLUSH) \ @@ -227,6 +258,12 @@ extern "C" { #endif #include +#if defined(__wasm__) +#define LLHTTP_EXPORT __attribute__((visibility("default"))) +#else +#define LLHTTP_EXPORT +#endif + typedef llhttp__internal_t llhttp_t; typedef struct llhttp_settings_s llhttp_settings_t; @@ -264,13 +301,59 @@ struct llhttp_settings_s { */ llhttp_cb on_chunk_header; llhttp_cb on_chunk_complete; + + llhttp_cb on_url_complete; + llhttp_cb on_status_complete; + llhttp_cb on_header_field_complete; + llhttp_cb on_header_value_complete; }; -/* Initialize the parser with specific type and user settings */ +/* Initialize the parser with specific type and user settings. + * + * NOTE: lifetime of `settings` has to be at least the same as the lifetime of + * the `parser` here. In practice, `settings` has to be either a static + * variable or be allocated with `malloc`, `new`, etc. + */ +LLHTTP_EXPORT void llhttp_init(llhttp_t* parser, llhttp_type_t type, const llhttp_settings_t* settings); +#if defined(__wasm__) + +LLHTTP_EXPORT +llhttp_t* llhttp_alloc(llhttp_type_t type); + +LLHTTP_EXPORT +void llhttp_free(llhttp_t* parser); + +LLHTTP_EXPORT +uint8_t llhttp_get_type(llhttp_t* parser); + +LLHTTP_EXPORT +uint8_t llhttp_get_http_major(llhttp_t* parser); + +LLHTTP_EXPORT +uint8_t llhttp_get_http_minor(llhttp_t* parser); + +LLHTTP_EXPORT +uint8_t llhttp_get_method(llhttp_t* parser); + +LLHTTP_EXPORT +int llhttp_get_status_code(llhttp_t* parser); + +LLHTTP_EXPORT +uint8_t llhttp_get_upgrade(llhttp_t* parser); + +#endif // defined(__wasm__) + +/* Reset an already initialized parser back to the start state, preserving the + * existing parser type, callback settings, user data, and lenient flags. + */ +LLHTTP_EXPORT +void llhttp_reset(llhttp_t* parser); + /* Initialize the settings object */ +LLHTTP_EXPORT void llhttp_settings_init(llhttp_settings_t* settings); /* Parse full or partial request/response, invoking user callbacks along the @@ -289,6 +372,7 @@ void llhttp_settings_init(llhttp_settings_t* settings); * to return the same error upon each successive call up until `llhttp_init()` * is called. */ +LLHTTP_EXPORT llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len); /* This method should be called when the other side has no further bytes to @@ -299,16 +383,19 @@ llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len); * connection. This method will invoke `on_message_complete()` callback if the * request was terminated safely. Otherwise a error code would be returned. */ +LLHTTP_EXPORT llhttp_errno_t llhttp_finish(llhttp_t* parser); /* Returns `1` if the incoming message is parsed until the last byte, and has * to be completed by calling `llhttp_finish()` on EOF */ +LLHTTP_EXPORT int llhttp_message_needs_eof(const llhttp_t* parser); /* Returns `1` if there might be any other messages following the last that was * successfully parsed. */ +LLHTTP_EXPORT int llhttp_should_keep_alive(const llhttp_t* parser); /* Make further calls of `llhttp_execute()` return `HPE_PAUSED` and set @@ -317,6 +404,7 @@ int llhttp_should_keep_alive(const llhttp_t* parser); * Important: do not call this from user callbacks! User callbacks must return * `HPE_PAUSED` if pausing is required. */ +LLHTTP_EXPORT void llhttp_pause(llhttp_t* parser); /* Might be called to resume the execution after the pause in user's callback. @@ -324,6 +412,7 @@ void llhttp_pause(llhttp_t* parser); * * Call this only if `llhttp_execute()` returns `HPE_PAUSED`. */ +LLHTTP_EXPORT void llhttp_resume(llhttp_t* parser); /* Might be called to resume the execution after the pause in user's callback. @@ -331,9 +420,11 @@ void llhttp_resume(llhttp_t* parser); * * Call this only if `llhttp_execute()` returns `HPE_PAUSED_UPGRADE` */ +LLHTTP_EXPORT void llhttp_resume_after_upgrade(llhttp_t* parser); /* Returns the latest return error */ +LLHTTP_EXPORT llhttp_errno_t llhttp_get_errno(const llhttp_t* parser); /* Returns the verbal explanation of the latest returned error. @@ -341,6 +432,7 @@ llhttp_errno_t llhttp_get_errno(const llhttp_t* parser); * Note: User callback should set error reason when returning the error. See * `llhttp_set_error_reason()` for details. */ +LLHTTP_EXPORT const char* llhttp_get_error_reason(const llhttp_t* parser); /* Assign verbal description to the returned error. Must be called in user @@ -348,6 +440,7 @@ const char* llhttp_get_error_reason(const llhttp_t* parser); * * Note: `HPE_USER` error code might be useful in user callbacks. */ +LLHTTP_EXPORT void llhttp_set_error_reason(llhttp_t* parser, const char* reason); /* Returns the pointer to the last parsed byte before the returned error. The @@ -355,12 +448,15 @@ void llhttp_set_error_reason(llhttp_t* parser, const char* reason); * * Note: this method might be useful for counting the number of parsed bytes. */ +LLHTTP_EXPORT const char* llhttp_get_error_pos(const llhttp_t* parser); /* Returns textual name of error code */ +LLHTTP_EXPORT const char* llhttp_errno_name(llhttp_errno_t err); /* Returns textual name of HTTP method */ +LLHTTP_EXPORT const char* llhttp_method_name(llhttp_method_t method); @@ -373,7 +469,36 @@ const char* llhttp_method_name(llhttp_method_t method); * * **(USE AT YOUR OWN RISK)** */ -void llhttp_set_lenient(llhttp_t* parser, int enabled); +LLHTTP_EXPORT +void llhttp_set_lenient_headers(llhttp_t* parser, int enabled); + + +/* Enables/disables lenient handling of conflicting `Transfer-Encoding` and + * `Content-Length` headers (disabled by default). + * + * Normally `llhttp` would error when `Transfer-Encoding` is present in + * conjunction with `Content-Length`. This error is important to prevent HTTP + * request smuggling, but may be less desirable for small number of cases + * involving legacy servers. + * + * **(USE AT YOUR OWN RISK)** + */ +LLHTTP_EXPORT +void llhttp_set_lenient_chunked_length(llhttp_t* parser, int enabled); + + +/* Enables/disables lenient handling of `Connection: close` and HTTP/1.0 + * requests responses. + * + * Normally `llhttp` would error on (in strict mode) or discard (in loose mode) + * the HTTP request/response after the request/response with `Connection: close` + * and `Content-Length`. This is important to prevent cache poisoning attacks, + * but might interact badly with outdated and insecure clients. With this flag + * the extra request/response will be parsed normally. + * + * **(USE AT YOUR OWN RISK)** + */ +void llhttp_set_lenient_keep_alive(llhttp_t* parser, int enabled); #ifdef __cplusplus } /* extern "C" */ diff --git a/deps/llhttp/src/api.c b/deps/llhttp/src/api.c index 6f7246546dfe1a..8a4bdd26bb771a 100644 --- a/deps/llhttp/src/api.c +++ b/deps/llhttp/src/api.c @@ -6,8 +6,8 @@ #define CALLBACK_MAYBE(PARSER, NAME, ...) \ do { \ - llhttp_settings_t* settings; \ - settings = (llhttp_settings_t*) (PARSER)->settings; \ + const llhttp_settings_t* settings; \ + settings = (const llhttp_settings_t*) (PARSER)->settings; \ if (settings == NULL || settings->NAME == NULL) { \ err = 0; \ break; \ @@ -24,6 +24,85 @@ void llhttp_init(llhttp_t* parser, llhttp_type_t type, } +#if defined(__wasm__) + +extern int wasm_on_message_begin(llhttp_t * p); +extern int wasm_on_url(llhttp_t* p, const char* at, size_t length); +extern int wasm_on_status(llhttp_t* p, const char* at, size_t length); +extern int wasm_on_header_field(llhttp_t* p, const char* at, size_t length); +extern int wasm_on_header_value(llhttp_t* p, const char* at, size_t length); +extern int wasm_on_headers_complete(llhttp_t * p); +extern int wasm_on_body(llhttp_t* p, const char* at, size_t length); +extern int wasm_on_message_complete(llhttp_t * p); + +const llhttp_settings_t wasm_settings = { + wasm_on_message_begin, + wasm_on_url, + wasm_on_status, + wasm_on_header_field, + wasm_on_header_value, + wasm_on_headers_complete, + wasm_on_body, + wasm_on_message_complete, + NULL, + NULL, +}; + + +llhttp_t* llhttp_alloc(llhttp_type_t type) { + llhttp_t* parser = malloc(sizeof(llhttp_t)); + llhttp_init(parser, type, &wasm_settings); + return parser; +} + +void llhttp_free(llhttp_t* parser) { + free(parser); +} + +/* Some getters required to get stuff from the parser */ + +uint8_t llhttp_get_type(llhttp_t* parser) { + return parser->type; +} + +uint8_t llhttp_get_http_major(llhttp_t* parser) { + return parser->http_major; +} + +uint8_t llhttp_get_http_minor(llhttp_t* parser) { + return parser->http_minor; +} + +uint8_t llhttp_get_method(llhttp_t* parser) { + return parser->method; +} + +int llhttp_get_status_code(llhttp_t* parser) { + return parser->status_code; +} + +uint8_t llhttp_get_upgrade(llhttp_t* parser) { + return parser->upgrade; +} + +#endif // defined(__wasm__) + + +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; + + llhttp__internal_init(parser); + + parser->type = type; + parser->settings = (void*) settings; + parser->data = data; + parser->lenient_flags = lenient_flags; +} + + llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len) { return llhttp__internal_execute(parser, data, data + len); } @@ -127,15 +206,32 @@ const char* llhttp_method_name(llhttp_method_t method) { } -void llhttp_set_lenient(llhttp_t* parser, int enabled) { +void llhttp_set_lenient_headers(llhttp_t* parser, int enabled) { + if (enabled) { + parser->lenient_flags |= LENIENT_HEADERS; + } else { + parser->lenient_flags &= ~LENIENT_HEADERS; + } +} + + +void llhttp_set_lenient_chunked_length(llhttp_t* parser, int enabled) { if (enabled) { - parser->flags |= F_LENIENT; + parser->lenient_flags |= LENIENT_CHUNKED_LENGTH; } else { - parser->flags &= ~F_LENIENT; + parser->lenient_flags &= ~LENIENT_CHUNKED_LENGTH; } } +void llhttp_set_lenient_keep_alive(llhttp_t* parser, int enabled) { + if (enabled) { + parser->lenient_flags |= LENIENT_KEEP_ALIVE; + } else { + parser->lenient_flags &= ~LENIENT_KEEP_ALIVE; + } +} + /* Callbacks */ @@ -153,6 +249,13 @@ int llhttp__on_url(llhttp_t* s, const char* p, const char* endp) { } +int llhttp__on_url_complete(llhttp_t* s, const char* p, const char* endp) { + int err; + CALLBACK_MAYBE(s, on_url_complete, s); + return err; +} + + int llhttp__on_status(llhttp_t* s, const char* p, const char* endp) { int err; CALLBACK_MAYBE(s, on_status, s, p, endp - p); @@ -160,6 +263,13 @@ int llhttp__on_status(llhttp_t* s, const char* p, const char* endp) { } +int llhttp__on_status_complete(llhttp_t* s, const char* p, const char* endp) { + int err; + CALLBACK_MAYBE(s, on_status_complete, s); + return err; +} + + int llhttp__on_header_field(llhttp_t* s, const char* p, const char* endp) { int err; CALLBACK_MAYBE(s, on_header_field, s, p, endp - p); @@ -167,6 +277,13 @@ int llhttp__on_header_field(llhttp_t* s, const char* p, const char* endp) { } +int llhttp__on_header_field_complete(llhttp_t* s, const char* p, const char* endp) { + int err; + CALLBACK_MAYBE(s, on_header_field_complete, s); + return err; +} + + int llhttp__on_header_value(llhttp_t* s, const char* p, const char* endp) { int err; CALLBACK_MAYBE(s, on_header_value, s, p, endp - p); @@ -174,6 +291,13 @@ int llhttp__on_header_value(llhttp_t* s, const char* p, const char* endp) { } +int llhttp__on_header_value_complete(llhttp_t* s, const char* p, const char* endp) { + int err; + CALLBACK_MAYBE(s, on_header_value_complete, s); + return err; +} + + int llhttp__on_headers_complete(llhttp_t* s, const char* p, const char* endp) { int err; CALLBACK_MAYBE(s, on_headers_complete, s); diff --git a/deps/llhttp/src/http.c b/deps/llhttp/src/http.c index 6e4906d840b0ee..e6279f3bc2cab9 100644 --- a/deps/llhttp/src/http.c +++ b/deps/llhttp/src/http.c @@ -51,7 +51,8 @@ int llhttp__after_headers_complete(llhttp_t* parser, const char* p, /* chunked encoding - ignore Content-Length header, prepare for a chunk */ return 2; } else if (parser->flags & F_TRANSFER_ENCODING) { - if (parser->type == HTTP_REQUEST && (parser->flags & F_LENIENT) == 0) { + if (parser->type == HTTP_REQUEST && + (parser->lenient_flags & LENIENT_CHUNKED_LENGTH) == 0) { /* RFC 7230 3.3.3 */ /* If a Transfer-Encoding header field @@ -97,9 +98,7 @@ int llhttp__after_message_complete(llhttp_t* parser, const char* p, should_keep_alive = llhttp_should_keep_alive(parser); parser->finish = HTTP_FINISH_SAFE; - - /* Keep `F_LENIENT` flag between messages, but reset every other flag */ - parser->flags &= F_LENIENT; + parser->flags = 0; /* NOTE: this is ignored in loose parsing mode */ return should_keep_alive; diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c index 3019c410963acc..a8efce1033e319 100644 --- a/deps/llhttp/src/llhttp.c +++ b/deps/llhttp/src/llhttp.c @@ -24,164 +24,197 @@ typedef int (*llhttp__internal__span_cb)( llhttp__internal_t*, const char*, const char*); static const unsigned char llparse_blob0[] = { - 'C', 'L' -}; -static const unsigned char llparse_blob1[] = { 0xd, 0xa }; -static const unsigned char llparse_blob2[] = { +static const unsigned char llparse_blob1[] = { 'o', 'n' }; -static const unsigned char llparse_blob3[] = { +static const unsigned char llparse_blob2[] = { 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob4[] = { +static const unsigned char llparse_blob3[] = { 'l', 'o', 's', 'e' }; -static const unsigned char llparse_blob5[] = { +static const unsigned char llparse_blob4[] = { 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e' }; -static const unsigned char llparse_blob6[] = { +static const unsigned char llparse_blob5[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob7[] = { +static const unsigned char llparse_blob6[] = { 'c', 'h', 'u', 'n', 'k', 'e', 'd' }; #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob8[] = { +static const unsigned char ALIGN(16) llparse_blob7[] = { 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_blob9[] = { +static const unsigned char ALIGN(16) llparse_blob8[] = { '!', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A', 'Z', '^', 'z', '|', '|' }; #endif /* __SSE4_2__ */ #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob10[] = { +static const unsigned char ALIGN(16) llparse_blob9[] = { '~', '~', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; #endif /* __SSE4_2__ */ -static const unsigned char llparse_blob11[] = { +static const unsigned char llparse_blob10[] = { 'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h' }; -static const unsigned char llparse_blob12[] = { +static const unsigned char llparse_blob11[] = { 'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob13[] = { +static const unsigned char llparse_blob12[] = { 'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g' }; -static const unsigned char llparse_blob14[] = { +static const unsigned char llparse_blob13[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob15[] = { +static const unsigned char llparse_blob14[] = { 'T', 'T', 'P', '/' }; +static const unsigned char llparse_blob15[] = { + 0xd, 0xa, 0xd, 0xa, 'S', 'M', 0xd, 0xa, 0xd, 0xa +}; static const unsigned char llparse_blob16[] = { 'C', 'E', '/' }; static const unsigned char llparse_blob17[] = { - 'I', 'N', 'D' + 'T', 'S', 'P', '/' }; static const unsigned char llparse_blob18[] = { - 'E', 'C', 'K', 'O', 'U', 'T' + 'N', 'O', 'U', 'N', 'C', 'E' }; static const unsigned char llparse_blob19[] = { - 'N', 'E', 'C', 'T' + 'I', 'N', 'D' }; static const unsigned char llparse_blob20[] = { - 'E', 'L', 'E', 'T', 'E' + 'E', 'C', 'K', 'O', 'U', 'T' }; static const unsigned char llparse_blob21[] = { - 'E', 'T' + 'N', 'E', 'C', 'T' }; static const unsigned char llparse_blob22[] = { - 'E', 'A', 'D' + 'E', 'T', 'E' }; static const unsigned char llparse_blob23[] = { - 'N', 'K' + 'C', 'R', 'I', 'B', 'E' }; static const unsigned char llparse_blob24[] = { - 'C', 'K' + 'L', 'U', 'S', 'H' }; static const unsigned char llparse_blob25[] = { - 'S', 'E', 'A', 'R', 'C', 'H' + 'E', 'T' }; static const unsigned char llparse_blob26[] = { - 'R', 'G', 'E' + 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' }; static const unsigned char llparse_blob27[] = { - 'C', 'T', 'I', 'V', 'I', 'T', 'Y' + 'E', 'A', 'D' }; static const unsigned char llparse_blob28[] = { - 'L', 'E', 'N', 'D', 'A', 'R' + 'N', 'K' }; static const unsigned char llparse_blob29[] = { - 'V', 'E' + 'C', 'K' }; static const unsigned char llparse_blob30[] = { - 'O', 'T', 'I', 'F', 'Y' + 'S', 'E', 'A', 'R', 'C', 'H' }; static const unsigned char llparse_blob31[] = { - 'P', 'T', 'I', 'O', 'N', 'S' + 'R', 'G', 'E' }; static const unsigned char llparse_blob32[] = { - 'T', 'C', 'H' + 'C', 'T', 'I', 'V', 'I', 'T', 'Y' }; static const unsigned char llparse_blob33[] = { - 'S', 'T' + 'L', 'E', 'N', 'D', 'A', 'R' }; static const unsigned char llparse_blob34[] = { - 'I', 'N', 'D' + 'V', 'E' }; static const unsigned char llparse_blob35[] = { - 'A', 'T', 'C', 'H' + 'O', 'T', 'I', 'F', 'Y' }; static const unsigned char llparse_blob36[] = { - 'G', 'E' + 'P', 'T', 'I', 'O', 'N', 'S' }; static const unsigned char llparse_blob37[] = { - 'I', 'N', 'D' + 'C', 'H' }; static const unsigned char llparse_blob38[] = { - 'O', 'R', 'T' + 'S', 'E' }; static const unsigned char llparse_blob39[] = { - 'A', 'R', 'C', 'H' + 'A', 'Y' }; static const unsigned char llparse_blob40[] = { - 'U', 'R', 'C', 'E' + 'S', 'T' }; static const unsigned char llparse_blob41[] = { - 'B', 'S', 'C', 'R', 'I', 'B', 'E' + 'I', 'N', 'D' }; static const unsigned char llparse_blob42[] = { - 'R', 'A', 'C', 'E' + 'A', 'T', 'C', 'H' }; static const unsigned char llparse_blob43[] = { - 'I', 'N', 'D' + 'G', 'E' }; static const unsigned char llparse_blob44[] = { - 'N', 'K' + 'I', 'N', 'D' }; static const unsigned char llparse_blob45[] = { - 'C', 'K' + 'O', 'R', 'D' }; static const unsigned char llparse_blob46[] = { - 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E' + 'I', 'R', 'E', 'C', 'T' }; static const unsigned char llparse_blob47[] = { - 'H', 'T', 'T', 'P', '/' + 'O', 'R', 'T' }; static const unsigned char llparse_blob48[] = { - 'A', 'D' + 'R', 'C', 'H' }; static const unsigned char llparse_blob49[] = { + 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' +}; +static const unsigned char llparse_blob50[] = { + 'U', 'R', 'C', 'E' +}; +static const unsigned char llparse_blob51[] = { + 'B', 'S', 'C', 'R', 'I', 'B', 'E' +}; +static const unsigned char llparse_blob52[] = { + 'A', 'R', 'D', 'O', 'W', 'N' +}; +static const unsigned char llparse_blob53[] = { + 'A', 'C', 'E' +}; +static const unsigned char llparse_blob54[] = { + 'I', 'N', 'D' +}; +static const unsigned char llparse_blob55[] = { + 'N', 'K' +}; +static const unsigned char llparse_blob56[] = { + 'C', 'K' +}; +static const unsigned char llparse_blob57[] = { + 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E' +}; +static const unsigned char llparse_blob58[] = { + 'H', 'T', 'T', 'P', '/' +}; +static const unsigned char llparse_blob59[] = { + 'A', 'D' +}; +static const unsigned char llparse_blob60[] = { 'T', 'P', '/' }; @@ -317,6 +350,7 @@ enum llparse_state_e { s_n_llhttp__internal__n_span_start_llhttp__on_body_2, s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete, s_n_llhttp__internal__n_headers_almost_done, + s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete, s_n_llhttp__internal__n_span_start_llhttp__on_header_value, s_n_llhttp__internal__n_header_value_discard_lws, s_n_llhttp__internal__n_header_value_discard_ws_almost_done, @@ -330,8 +364,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_connection_2, s_n_llhttp__internal__n_header_value_connection_3, s_n_llhttp__internal__n_header_value_connection, + s_n_llhttp__internal__n_error_23, s_n_llhttp__internal__n_error_24, - s_n_llhttp__internal__n_error_25, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, s_n_llhttp__internal__n_header_value_te_chunked_last, @@ -341,6 +375,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_llhttp__on_header_field_complete, s_n_llhttp__internal__n_header_field_general_otherwise, s_n_llhttp__internal__n_header_field_general, s_n_llhttp__internal__n_header_field_colon, @@ -358,13 +393,15 @@ enum llparse_state_e { s_n_llhttp__internal__n_url_skip_to_http09, s_n_llhttp__internal__n_url_skip_lf_to_http09_1, s_n_llhttp__internal__n_url_skip_lf_to_http09, - s_n_llhttp__internal__n_req_http_end_1, - s_n_llhttp__internal__n_req_http_end, + s_n_llhttp__internal__n_req_pri_upgrade, + s_n_llhttp__internal__n_req_http_complete_1, + s_n_llhttp__internal__n_req_http_complete, s_n_llhttp__internal__n_req_http_minor, s_n_llhttp__internal__n_req_http_dot, s_n_llhttp__internal__n_req_http_major, s_n_llhttp__internal__n_req_http_start_1, s_n_llhttp__internal__n_req_http_start_2, + s_n_llhttp__internal__n_req_http_start_3, s_n_llhttp__internal__n_req_http_start, s_n_llhttp__internal__n_url_to_http, s_n_llhttp__internal__n_url_skip_to_http, @@ -389,57 +426,77 @@ enum llparse_state_e { s_n_llhttp__internal__n_url_entry_connect, s_n_llhttp__internal__n_req_spaces_before_url, s_n_llhttp__internal__n_req_first_space_before_url, - s_n_llhttp__internal__n_start_req_1, s_n_llhttp__internal__n_start_req_2, + s_n_llhttp__internal__n_start_req_3, + s_n_llhttp__internal__n_start_req_1, s_n_llhttp__internal__n_start_req_4, s_n_llhttp__internal__n_start_req_6, - s_n_llhttp__internal__n_start_req_7, - s_n_llhttp__internal__n_start_req_5, - s_n_llhttp__internal__n_start_req_3, s_n_llhttp__internal__n_start_req_8, s_n_llhttp__internal__n_start_req_9, - s_n_llhttp__internal__n_start_req_10, + s_n_llhttp__internal__n_start_req_7, + s_n_llhttp__internal__n_start_req_5, s_n_llhttp__internal__n_start_req_12, s_n_llhttp__internal__n_start_req_13, s_n_llhttp__internal__n_start_req_11, - s_n_llhttp__internal__n_start_req_15, + s_n_llhttp__internal__n_start_req_10, + s_n_llhttp__internal__n_start_req_14, + s_n_llhttp__internal__n_start_req_17, s_n_llhttp__internal__n_start_req_16, + s_n_llhttp__internal__n_start_req_15, s_n_llhttp__internal__n_start_req_18, s_n_llhttp__internal__n_start_req_20, s_n_llhttp__internal__n_start_req_21, s_n_llhttp__internal__n_start_req_19, - s_n_llhttp__internal__n_start_req_17, - s_n_llhttp__internal__n_start_req_22, - s_n_llhttp__internal__n_start_req_14, s_n_llhttp__internal__n_start_req_23, s_n_llhttp__internal__n_start_req_24, s_n_llhttp__internal__n_start_req_26, + s_n_llhttp__internal__n_start_req_28, + s_n_llhttp__internal__n_start_req_29, s_n_llhttp__internal__n_start_req_27, + s_n_llhttp__internal__n_start_req_25, + s_n_llhttp__internal__n_start_req_30, + s_n_llhttp__internal__n_start_req_22, s_n_llhttp__internal__n_start_req_31, s_n_llhttp__internal__n_start_req_32, - s_n_llhttp__internal__n_start_req_30, - s_n_llhttp__internal__n_start_req_29, - s_n_llhttp__internal__n_start_req_28, + s_n_llhttp__internal__n_start_req_35, + s_n_llhttp__internal__n_start_req_36, s_n_llhttp__internal__n_start_req_34, - s_n_llhttp__internal__n_start_req_33, - s_n_llhttp__internal__n_start_req_25, s_n_llhttp__internal__n_start_req_37, s_n_llhttp__internal__n_start_req_38, - s_n_llhttp__internal__n_start_req_36, - s_n_llhttp__internal__n_start_req_35, - s_n_llhttp__internal__n_start_req_40, - s_n_llhttp__internal__n_start_req_41, s_n_llhttp__internal__n_start_req_42, - s_n_llhttp__internal__n_start_req_39, s_n_llhttp__internal__n_start_req_43, - s_n_llhttp__internal__n_start_req_46, + s_n_llhttp__internal__n_start_req_41, + s_n_llhttp__internal__n_start_req_40, + s_n_llhttp__internal__n_start_req_39, + s_n_llhttp__internal__n_start_req_45, + s_n_llhttp__internal__n_start_req_44, + s_n_llhttp__internal__n_start_req_33, s_n_llhttp__internal__n_start_req_48, s_n_llhttp__internal__n_start_req_49, - s_n_llhttp__internal__n_start_req_47, s_n_llhttp__internal__n_start_req_50, - s_n_llhttp__internal__n_start_req_45, - s_n_llhttp__internal__n_start_req_44, + s_n_llhttp__internal__n_start_req_51, + s_n_llhttp__internal__n_start_req_47, + s_n_llhttp__internal__n_start_req_46, + s_n_llhttp__internal__n_start_req_54, + s_n_llhttp__internal__n_start_req_56, + s_n_llhttp__internal__n_start_req_57, + s_n_llhttp__internal__n_start_req_55, + s_n_llhttp__internal__n_start_req_53, + s_n_llhttp__internal__n_start_req_58, + s_n_llhttp__internal__n_start_req_59, + s_n_llhttp__internal__n_start_req_52, + s_n_llhttp__internal__n_start_req_61, + s_n_llhttp__internal__n_start_req_62, + s_n_llhttp__internal__n_start_req_60, + s_n_llhttp__internal__n_start_req_65, + s_n_llhttp__internal__n_start_req_67, + s_n_llhttp__internal__n_start_req_68, + s_n_llhttp__internal__n_start_req_66, + s_n_llhttp__internal__n_start_req_69, + s_n_llhttp__internal__n_start_req_64, + s_n_llhttp__internal__n_start_req_63, s_n_llhttp__internal__n_start_req, + s_n_llhttp__internal__n_invoke_llhttp__on_status_complete, s_n_llhttp__internal__n_res_line_almost_done, s_n_llhttp__internal__n_res_status, s_n_llhttp__internal__n_span_start_llhttp__on_status, @@ -532,6 +589,10 @@ int llhttp__internal__c_update_http_minor( return 0; } +int llhttp__on_url_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_test_flags( llhttp__internal_t* state, const unsigned char* p, @@ -566,25 +627,25 @@ int llhttp__internal__c_update_finish_1( return 0; } -int llhttp__internal__c_test_flags_1( +int llhttp__internal__c_test_lenient_flags( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 544) == 544; + return (state->lenient_flags & 4) == 4; } -int llhttp__internal__c_test_flags_2( +int llhttp__internal__c_test_flags_1( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 256) == 256; + return (state->flags & 544) == 544; } -int llhttp__internal__c_test_flags_3( +int llhttp__internal__c_test_lenient_flags_1( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 40) == 40; + return (state->lenient_flags & 2) == 2; } int llhttp__before_headers_complete( @@ -685,6 +746,10 @@ int llhttp__internal__c_store_header_state( return 0; } +int llhttp__on_header_field_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_load_header_state( llhttp__internal_t* state, const unsigned char* p, @@ -708,6 +773,10 @@ int llhttp__internal__c_update_header_state( return 0; } +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( llhttp__internal_t* state, const unsigned char* p, @@ -740,6 +809,13 @@ int llhttp__internal__c_update_header_state_2( return 0; } +int llhttp__internal__c_test_lenient_flags_2( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->lenient_flags & 1) == 1; +} + int llhttp__internal__c_update_header_state_4( llhttp__internal_t* state, const unsigned char* p, @@ -764,7 +840,7 @@ int llhttp__internal__c_update_header_state_6( return 0; } -int llhttp__internal__c_test_flags_5( +int llhttp__internal__c_test_flags_2( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -837,6 +913,13 @@ int llhttp__internal__c_or_flags_17( return 0; } +int llhttp__internal__c_load_method( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return state->method; +} + int llhttp__internal__c_store_http_major( llhttp__internal_t* state, const unsigned char* p, @@ -855,13 +938,6 @@ int llhttp__internal__c_store_http_minor( return 0; } -int llhttp__internal__c_is_equal_method_1( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return state->method == 33; -} - int llhttp__internal__c_update_status_code( llhttp__internal_t* state, const unsigned char* p, @@ -901,6 +977,10 @@ int llhttp__internal__c_mul_add_status_code( return 0; } +int llhttp__on_status_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_update_type( llhttp__internal_t* state, const unsigned char* p, @@ -1003,7 +1083,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_chunk_data_almost_done; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob1, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob0, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -1455,12 +1535,21 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_test_flags; } default: { - goto s_n_llhttp__internal__n_error_18; + goto s_n_llhttp__internal__n_error_17; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: + s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: { + switch (llhttp__on_header_value_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_span_start_llhttp__on_header_value: s_n_llhttp__internal__n_span_start_llhttp__on_header_value: { if (p == endp) { @@ -1504,7 +1593,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_discard_lws; } default: { - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_19; } } /* UNREACHABLE */; @@ -1540,7 +1629,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_lws; } default: { - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_20; } } /* UNREACHABLE */; @@ -1579,7 +1668,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_4; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_2; } } /* UNREACHABLE */; @@ -1658,7 +1747,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_blob4, 4); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -1682,7 +1771,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_blob5, 9); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -1706,7 +1795,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_blob6, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob5, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -1756,8 +1845,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_24: - s_n_llhttp__internal__n_error_24: { + case s_n_llhttp__internal__n_error_23: + s_n_llhttp__internal__n_error_23: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -1766,8 +1855,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_25: - s_n_llhttp__internal__n_error_25: { + case s_n_llhttp__internal__n_error_24: + s_n_llhttp__internal__n_error_24: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -1938,7 +2027,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, 6, @@ -2011,7 +2100,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_blob7, 7); + match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob6, 7); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2068,6 +2157,15 @@ static llparse_state_t llhttp__internal__run( /* 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)) { + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_header_field_general_otherwise: s_n_llhttp__internal__n_header_field_general_otherwise: { if (p == endp) { @@ -2078,7 +2176,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; } default: { - goto s_n_llhttp__internal__n_error_26; + goto s_n_llhttp__internal__n_error_25; } } /* UNREACHABLE */; @@ -2116,7 +2214,7 @@ static llparse_state_t llhttp__internal__run( /* Load input */ input = _mm_loadu_si128((__m128i const*) p); - 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, 16, @@ -2128,7 +2226,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_blob10); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob9); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 2, @@ -2182,7 +2280,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_blob3, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2207,7 +2305,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_blob11, 10); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 10); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2253,7 +2351,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_blob2, 2); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2277,7 +2375,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_blob12, 15); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 15); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2302,7 +2400,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_blob13, 16); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 16); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2327,7 +2425,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_blob14, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob13, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -2459,7 +2557,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_to_http_09; } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_26; } } /* UNREACHABLE */; @@ -2484,16 +2582,40 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_skip_lf_to_http09_1; } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_26; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_req_pri_upgrade: + s_n_llhttp__internal__n_req_pri_upgrade: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_req_pri_upgrade; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 10); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + goto s_n_llhttp__internal__n_error_29; + } + case kMatchPause: { + return s_n_llhttp__internal__n_req_pri_upgrade; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_req_http_end_1: - s_n_llhttp__internal__n_req_http_end_1: { + case s_n_llhttp__internal__n_req_http_complete_1: + s_n_llhttp__internal__n_req_http_complete_1: { if (p == endp) { - return s_n_llhttp__internal__n_req_http_end_1; + return s_n_llhttp__internal__n_req_http_complete_1; } switch (*p) { case 10: { @@ -2507,10 +2629,10 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_req_http_end: - s_n_llhttp__internal__n_req_http_end: { + case s_n_llhttp__internal__n_req_http_complete: + s_n_llhttp__internal__n_req_http_complete: { if (p == endp) { - return s_n_llhttp__internal__n_req_http_end; + return s_n_llhttp__internal__n_req_http_complete; } switch (*p) { case 10: { @@ -2519,7 +2641,7 @@ static llparse_state_t llhttp__internal__run( } case 13: { p++; - goto s_n_llhttp__internal__n_req_http_end_1; + goto s_n_llhttp__internal__n_req_http_complete_1; } default: { goto s_n_llhttp__internal__n_error_28; @@ -2585,7 +2707,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor; } default: { - goto s_n_llhttp__internal__n_error_29; + goto s_n_llhttp__internal__n_error_31; } } /* UNREACHABLE */; @@ -2602,7 +2724,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_minor; } default: { - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_32; } } /* UNREACHABLE */; @@ -2665,7 +2787,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major; } default: { - goto s_n_llhttp__internal__n_error_31; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -2678,18 +2800,18 @@ 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_blob15, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_req_http_major; + goto s_n_llhttp__internal__n_invoke_load_method; } case kMatchPause: { return s_n_llhttp__internal__n_req_http_start_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -2707,13 +2829,37 @@ static llparse_state_t llhttp__internal__run( switch (match_seq.status) { case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_invoke_is_equal_method_1; + goto s_n_llhttp__internal__n_invoke_load_method_2; } case kMatchPause: { return s_n_llhttp__internal__n_req_http_start_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_36; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_req_http_start_3: + s_n_llhttp__internal__n_req_http_start_3: { + llparse_match_t match_seq; + + 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); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + goto s_n_llhttp__internal__n_invoke_load_method_3; + } + case kMatchPause: { + return s_n_llhttp__internal__n_req_http_start_3; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -2737,8 +2883,12 @@ static llparse_state_t llhttp__internal__run( p++; goto s_n_llhttp__internal__n_req_http_start_2; } - default: { - goto s_n_llhttp__internal__n_error_33; + case 'R': { + p++; + goto s_n_llhttp__internal__n_req_http_start_3; + } + default: { + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -2759,7 +2909,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_error_1; } default: { - goto s_n_llhttp__internal__n_req_http_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1; } } /* UNREACHABLE */; @@ -2829,7 +2979,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_fragment; } default: { - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } } /* UNREACHABLE */; @@ -2890,7 +3040,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_stub_query_3; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -2928,7 +3078,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -3053,10 +3203,10 @@ static llparse_state_t llhttp__internal__run( } case 8: { p++; - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_40; } default: { - goto s_n_llhttp__internal__n_error_38; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; @@ -3115,7 +3265,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server_with_at; } default: { - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_42; } } /* UNREACHABLE */; @@ -3132,7 +3282,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -3150,7 +3300,7 @@ static llparse_state_t llhttp__internal__run( } case 10: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } case 12: { p++; @@ -3158,18 +3308,18 @@ static llparse_state_t llhttp__internal__run( } case 13: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -3215,7 +3365,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } case 3: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -3225,7 +3375,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_45; } } /* UNREACHABLE */; @@ -3261,7 +3411,7 @@ static llparse_state_t llhttp__internal__run( } case 2: { p++; - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } case 3: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -3270,7 +3420,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_46; } } /* UNREACHABLE */; @@ -3368,45 +3518,84 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_spaces_before_url; } default: { - goto s_n_llhttp__internal__n_error_44; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_1: - s_n_llhttp__internal__n_start_req_1: { + case s_n_llhttp__internal__n_start_req_2: + s_n_llhttp__internal__n_start_req_2: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_2; + } + switch (*p) { + case 'L': { + p++; + match = 19; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_3: + s_n_llhttp__internal__n_start_req_3: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_1; + return s_n_llhttp__internal__n_start_req_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob0, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 19; + match = 36; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_1; + return s_n_llhttp__internal__n_start_req_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_2: - s_n_llhttp__internal__n_start_req_2: { + case s_n_llhttp__internal__n_start_req_1: + s_n_llhttp__internal__n_start_req_1: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_1; + } + switch (*p) { + case 'C': { + p++; + goto s_n_llhttp__internal__n_start_req_2; + } + case 'N': { + p++; + goto s_n_llhttp__internal__n_start_req_3; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_4: + s_n_llhttp__internal__n_start_req_4: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_2; + return s_n_llhttp__internal__n_start_req_4; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3415,23 +3604,23 @@ 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_start_req_2; + return s_n_llhttp__internal__n_start_req_4; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_4: - s_n_llhttp__internal__n_start_req_4: { + case s_n_llhttp__internal__n_start_req_6: + s_n_llhttp__internal__n_start_req_6: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_4; + return s_n_llhttp__internal__n_start_req_6; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3440,23 +3629,23 @@ 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_start_req_4; + return s_n_llhttp__internal__n_start_req_6; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_6: - s_n_llhttp__internal__n_start_req_6: { + case s_n_llhttp__internal__n_start_req_8: + s_n_llhttp__internal__n_start_req_8: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_6; + return s_n_llhttp__internal__n_start_req_8; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3465,19 +3654,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_start_req_6; + return s_n_llhttp__internal__n_start_req_8; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_7: - s_n_llhttp__internal__n_start_req_7: { + case s_n_llhttp__internal__n_start_req_9: + s_n_llhttp__internal__n_start_req_9: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_7; + return s_n_llhttp__internal__n_start_req_9; } switch (*p) { case 'Y': { @@ -3486,62 +3675,62 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_5: - s_n_llhttp__internal__n_start_req_5: { + case s_n_llhttp__internal__n_start_req_7: + s_n_llhttp__internal__n_start_req_7: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_5; + return s_n_llhttp__internal__n_start_req_7; } switch (*p) { case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_6; + goto s_n_llhttp__internal__n_start_req_8; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_7; + goto s_n_llhttp__internal__n_start_req_9; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_3: - s_n_llhttp__internal__n_start_req_3: { + case s_n_llhttp__internal__n_start_req_5: + s_n_llhttp__internal__n_start_req_5: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_3; + return s_n_llhttp__internal__n_start_req_5; } switch (*p) { case 'H': { p++; - goto s_n_llhttp__internal__n_start_req_4; + goto s_n_llhttp__internal__n_start_req_6; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_5; + goto s_n_llhttp__internal__n_start_req_7; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_8: - s_n_llhttp__internal__n_start_req_8: { + case s_n_llhttp__internal__n_start_req_12: + s_n_llhttp__internal__n_start_req_12: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_8; + return s_n_llhttp__internal__n_start_req_12; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3550,35 +3739,56 @@ 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_start_req_8; + return s_n_llhttp__internal__n_start_req_12; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_9: - s_n_llhttp__internal__n_start_req_9: { + case s_n_llhttp__internal__n_start_req_13: + s_n_llhttp__internal__n_start_req_13: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_9; + return s_n_llhttp__internal__n_start_req_13; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 1; + match = 35; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_9; + return s_n_llhttp__internal__n_start_req_13; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_11: + s_n_llhttp__internal__n_start_req_11: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_11; + } + switch (*p) { + case 'L': { + p++; + goto s_n_llhttp__internal__n_start_req_12; + } + case 'S': { + p++; + goto s_n_llhttp__internal__n_start_req_13; + } + default: { + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; @@ -3586,95 +3796,84 @@ static llparse_state_t llhttp__internal__run( } case s_n_llhttp__internal__n_start_req_10: s_n_llhttp__internal__n_start_req_10: { - llparse_match_t match_seq; - if (p == endp) { return s_n_llhttp__internal__n_start_req_10; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 3); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { + switch (*p) { + case 'E': { p++; - match = 2; - goto s_n_llhttp__internal__n_invoke_store_method_1; - } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_10; + goto s_n_llhttp__internal__n_start_req_11; } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + default: { + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_12: - s_n_llhttp__internal__n_start_req_12: { + case s_n_llhttp__internal__n_start_req_14: + s_n_llhttp__internal__n_start_req_14: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_12; + return s_n_llhttp__internal__n_start_req_14; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 31; + match = 45; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_12; + return s_n_llhttp__internal__n_start_req_14; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_13: - s_n_llhttp__internal__n_start_req_13: { + case s_n_llhttp__internal__n_start_req_17: + s_n_llhttp__internal__n_start_req_17: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_13; + return s_n_llhttp__internal__n_start_req_17; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 9; + match = 41; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_13; + return s_n_llhttp__internal__n_start_req_17; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_11: - s_n_llhttp__internal__n_start_req_11: { + case s_n_llhttp__internal__n_start_req_16: + s_n_llhttp__internal__n_start_req_16: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_11; + return s_n_llhttp__internal__n_start_req_16; } switch (*p) { - case 'I': { - p++; - goto s_n_llhttp__internal__n_start_req_12; - } - case 'O': { + case '_': { p++; - goto s_n_llhttp__internal__n_start_req_13; + goto s_n_llhttp__internal__n_start_req_17; } default: { - goto s_n_llhttp__internal__n_error_53; + match = 1; + goto s_n_llhttp__internal__n_invoke_store_method_1; } } /* UNREACHABLE */; @@ -3687,82 +3886,202 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_15; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 24; - goto s_n_llhttp__internal__n_invoke_store_method_1; + goto s_n_llhttp__internal__n_start_req_16; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_15; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_16: - s_n_llhttp__internal__n_start_req_16: { + case s_n_llhttp__internal__n_start_req_18: + s_n_llhttp__internal__n_start_req_18: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_16; + return s_n_llhttp__internal__n_start_req_18; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 23; + match = 2; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_16; + return s_n_llhttp__internal__n_start_req_18; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_18: - s_n_llhttp__internal__n_start_req_18: { + case s_n_llhttp__internal__n_start_req_20: + s_n_llhttp__internal__n_start_req_20: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_18; + return s_n_llhttp__internal__n_start_req_20; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 7); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 21; + match = 31; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_18; + return s_n_llhttp__internal__n_start_req_20; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_20: - s_n_llhttp__internal__n_start_req_20: { + case s_n_llhttp__internal__n_start_req_21: + s_n_llhttp__internal__n_start_req_21: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_20; + return s_n_llhttp__internal__n_start_req_21; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 2); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 9; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_21; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_19: + s_n_llhttp__internal__n_start_req_19: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_19; + } + switch (*p) { + case 'I': { + p++; + goto s_n_llhttp__internal__n_start_req_20; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_21; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_23: + s_n_llhttp__internal__n_start_req_23: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_23; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 6); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 24; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_23; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_24: + s_n_llhttp__internal__n_start_req_24: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_24; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 23; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_24; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_26: + s_n_llhttp__internal__n_start_req_26: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_26; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 7); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 21; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_26; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_28: + s_n_llhttp__internal__n_start_req_28: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_28; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3771,19 +4090,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_start_req_20; + return s_n_llhttp__internal__n_start_req_28; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_21: - s_n_llhttp__internal__n_start_req_21: { + case s_n_llhttp__internal__n_start_req_29: + s_n_llhttp__internal__n_start_req_29: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_21; + return s_n_llhttp__internal__n_start_req_29; } switch (*p) { case 'L': { @@ -3792,62 +4111,62 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_19: - s_n_llhttp__internal__n_start_req_19: { + case s_n_llhttp__internal__n_start_req_27: + s_n_llhttp__internal__n_start_req_27: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_19; + return s_n_llhttp__internal__n_start_req_27; } switch (*p) { case 'A': { p++; - goto s_n_llhttp__internal__n_start_req_20; + goto s_n_llhttp__internal__n_start_req_28; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_21; + goto s_n_llhttp__internal__n_start_req_29; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_17: - s_n_llhttp__internal__n_start_req_17: { + case s_n_llhttp__internal__n_start_req_25: + s_n_llhttp__internal__n_start_req_25: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_17; + return s_n_llhttp__internal__n_start_req_25; } switch (*p) { case 'A': { p++; - goto s_n_llhttp__internal__n_start_req_18; + goto s_n_llhttp__internal__n_start_req_26; } case 'C': { p++; - goto s_n_llhttp__internal__n_start_req_19; + goto s_n_llhttp__internal__n_start_req_27; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_22: - s_n_llhttp__internal__n_start_req_22: { + case s_n_llhttp__internal__n_start_req_30: + s_n_llhttp__internal__n_start_req_30: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_22; + return s_n_llhttp__internal__n_start_req_30; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3856,52 +4175,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_start_req_22; + return s_n_llhttp__internal__n_start_req_30; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_14: - s_n_llhttp__internal__n_start_req_14: { + case s_n_llhttp__internal__n_start_req_22: + s_n_llhttp__internal__n_start_req_22: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_14; + return s_n_llhttp__internal__n_start_req_22; } switch (*p) { case '-': { p++; - goto s_n_llhttp__internal__n_start_req_15; + goto s_n_llhttp__internal__n_start_req_23; } case 'E': { p++; - goto s_n_llhttp__internal__n_start_req_16; + goto s_n_llhttp__internal__n_start_req_24; } case 'K': { p++; - goto s_n_llhttp__internal__n_start_req_17; + goto s_n_llhttp__internal__n_start_req_25; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_22; + goto s_n_llhttp__internal__n_start_req_30; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_23: - s_n_llhttp__internal__n_start_req_23: { + case s_n_llhttp__internal__n_start_req_31: + s_n_llhttp__internal__n_start_req_31: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_23; + return s_n_llhttp__internal__n_start_req_31; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3910,23 +4229,23 @@ 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_start_req_23; + return s_n_llhttp__internal__n_start_req_31; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_24: - s_n_llhttp__internal__n_start_req_24: { + case s_n_llhttp__internal__n_start_req_32: + s_n_llhttp__internal__n_start_req_32: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_24; + return s_n_llhttp__internal__n_start_req_32; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3935,23 +4254,23 @@ 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_start_req_24; + return s_n_llhttp__internal__n_start_req_32; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_26: - s_n_llhttp__internal__n_start_req_26: { + case s_n_llhttp__internal__n_start_req_35: + s_n_llhttp__internal__n_start_req_35: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_26; + return s_n_llhttp__internal__n_start_req_35; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -3960,132 +4279,203 @@ 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_start_req_26; + return s_n_llhttp__internal__n_start_req_35; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_27: - s_n_llhttp__internal__n_start_req_27: { + case s_n_llhttp__internal__n_start_req_36: + s_n_llhttp__internal__n_start_req_36: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_27; + return s_n_llhttp__internal__n_start_req_36; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 3; + match = 39; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_27; + return s_n_llhttp__internal__n_start_req_36; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_31: - s_n_llhttp__internal__n_start_req_31: { + case s_n_llhttp__internal__n_start_req_34: + s_n_llhttp__internal__n_start_req_34: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_34; + } + switch (*p) { + case 'T': { + p++; + goto s_n_llhttp__internal__n_start_req_35; + } + case 'U': { + p++; + goto s_n_llhttp__internal__n_start_req_36; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_37: + s_n_llhttp__internal__n_start_req_37: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_31; + return s_n_llhttp__internal__n_start_req_37; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 12; + match = 38; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_31; + return s_n_llhttp__internal__n_start_req_37; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_32: - s_n_llhttp__internal__n_start_req_32: { + case s_n_llhttp__internal__n_start_req_38: + s_n_llhttp__internal__n_start_req_38: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_32; + return s_n_llhttp__internal__n_start_req_38; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 13; + match = 3; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_32; + return s_n_llhttp__internal__n_start_req_38; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_30: - s_n_llhttp__internal__n_start_req_30: { - if (p == endp) { - return s_n_llhttp__internal__n_start_req_30; - } + case s_n_llhttp__internal__n_start_req_42: + s_n_llhttp__internal__n_start_req_42: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_42; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 12; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_42; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_43: + s_n_llhttp__internal__n_start_req_43: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_43; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 4); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 13; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_43; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_41: + s_n_llhttp__internal__n_start_req_41: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_41; + } switch (*p) { case 'F': { p++; - goto s_n_llhttp__internal__n_start_req_31; + goto s_n_llhttp__internal__n_start_req_42; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_32; + goto s_n_llhttp__internal__n_start_req_43; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_29: - s_n_llhttp__internal__n_start_req_29: { + case s_n_llhttp__internal__n_start_req_40: + s_n_llhttp__internal__n_start_req_40: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_29; + return s_n_llhttp__internal__n_start_req_40; } switch (*p) { case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_30; + goto s_n_llhttp__internal__n_start_req_41; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_28: - s_n_llhttp__internal__n_start_req_28: { + case s_n_llhttp__internal__n_start_req_39: + s_n_llhttp__internal__n_start_req_39: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_28; + return s_n_llhttp__internal__n_start_req_39; } switch (*p) { case 'I': { @@ -4095,23 +4485,23 @@ static llparse_state_t llhttp__internal__run( } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_29; + goto s_n_llhttp__internal__n_start_req_40; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_34: - s_n_llhttp__internal__n_start_req_34: { + case s_n_llhttp__internal__n_start_req_45: + s_n_llhttp__internal__n_start_req_45: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_34; + return s_n_llhttp__internal__n_start_req_45; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4120,24 +4510,24 @@ 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_start_req_34; + return s_n_llhttp__internal__n_start_req_45; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_33: - s_n_llhttp__internal__n_start_req_33: { + case s_n_llhttp__internal__n_start_req_44: + s_n_llhttp__internal__n_start_req_44: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_33; + return s_n_llhttp__internal__n_start_req_44; } switch (*p) { case 'R': { p++; - goto s_n_llhttp__internal__n_start_req_34; + goto s_n_llhttp__internal__n_start_req_45; } case 'T': { p++; @@ -4145,49 +4535,53 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_25: - s_n_llhttp__internal__n_start_req_25: { + case s_n_llhttp__internal__n_start_req_33: + s_n_llhttp__internal__n_start_req_33: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_25; + return s_n_llhttp__internal__n_start_req_33; } switch (*p) { case 'A': { p++; - goto s_n_llhttp__internal__n_start_req_26; + goto s_n_llhttp__internal__n_start_req_34; + } + case 'L': { + p++; + goto s_n_llhttp__internal__n_start_req_37; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_27; + goto s_n_llhttp__internal__n_start_req_38; } case 'R': { p++; - goto s_n_llhttp__internal__n_start_req_28; + goto s_n_llhttp__internal__n_start_req_39; } case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_33; + goto s_n_llhttp__internal__n_start_req_44; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_37: - s_n_llhttp__internal__n_start_req_37: { + case s_n_llhttp__internal__n_start_req_48: + s_n_llhttp__internal__n_start_req_48: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_37; + return s_n_llhttp__internal__n_start_req_48; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4196,23 +4590,73 @@ 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_start_req_37; + return s_n_llhttp__internal__n_start_req_48; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_38: - s_n_llhttp__internal__n_start_req_38: { + case s_n_llhttp__internal__n_start_req_49: + s_n_llhttp__internal__n_start_req_49: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_38; + return s_n_llhttp__internal__n_start_req_49; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 44; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_49; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_50: + s_n_llhttp__internal__n_start_req_50: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_50; + } + 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_start_req_50; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 3); + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_51: + s_n_llhttp__internal__n_start_req_51: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_51; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4221,61 +4665,69 @@ 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_start_req_38; + return s_n_llhttp__internal__n_start_req_51; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_36: - s_n_llhttp__internal__n_start_req_36: { + case s_n_llhttp__internal__n_start_req_47: + s_n_llhttp__internal__n_start_req_47: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_36; + return s_n_llhttp__internal__n_start_req_47; } switch (*p) { case 'B': { p++; - goto s_n_llhttp__internal__n_start_req_37; + goto s_n_llhttp__internal__n_start_req_48; + } + case 'C': { + p++; + goto s_n_llhttp__internal__n_start_req_49; + } + case 'D': { + p++; + goto s_n_llhttp__internal__n_start_req_50; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_38; + goto s_n_llhttp__internal__n_start_req_51; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_35: - s_n_llhttp__internal__n_start_req_35: { + case s_n_llhttp__internal__n_start_req_46: + s_n_llhttp__internal__n_start_req_46: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_35; + return s_n_llhttp__internal__n_start_req_46; } switch (*p) { case 'E': { p++; - goto s_n_llhttp__internal__n_start_req_36; + goto s_n_llhttp__internal__n_start_req_47; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_40: - s_n_llhttp__internal__n_start_req_40: { + case s_n_llhttp__internal__n_start_req_54: + s_n_llhttp__internal__n_start_req_54: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_40; + return s_n_llhttp__internal__n_start_req_54; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4284,123 +4736,254 @@ 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_start_req_40; + return s_n_llhttp__internal__n_start_req_54; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_41: - s_n_llhttp__internal__n_start_req_41: { - llparse_match_t match_seq; - + case s_n_llhttp__internal__n_start_req_56: + s_n_llhttp__internal__n_start_req_56: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_41; + return s_n_llhttp__internal__n_start_req_56; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 4); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { + switch (*p) { + case 'P': { p++; - match = 33; + match = 37; goto s_n_llhttp__internal__n_invoke_store_method_1; } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_41; - } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + default: { + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_42: - s_n_llhttp__internal__n_start_req_42: { + case s_n_llhttp__internal__n_start_req_57: + s_n_llhttp__internal__n_start_req_57: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_42; + return s_n_llhttp__internal__n_start_req_57; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 7); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 26; + match = 42; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_42; + return s_n_llhttp__internal__n_start_req_57; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_39: - s_n_llhttp__internal__n_start_req_39: { + case s_n_llhttp__internal__n_start_req_55: + s_n_llhttp__internal__n_start_req_55: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_39; + return s_n_llhttp__internal__n_start_req_55; } switch (*p) { - case 'E': { + case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_40; + goto s_n_llhttp__internal__n_start_req_56; } - case 'O': { + case '_': { p++; - goto s_n_llhttp__internal__n_start_req_41; + goto s_n_llhttp__internal__n_start_req_57; } - case 'U': { + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_53: + s_n_llhttp__internal__n_start_req_53: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_53; + } + switch (*p) { + case 'A': { p++; - goto s_n_llhttp__internal__n_start_req_42; + goto s_n_llhttp__internal__n_start_req_54; + } + case 'T': { + p++; + goto s_n_llhttp__internal__n_start_req_55; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_43: - s_n_llhttp__internal__n_start_req_43: { + case s_n_llhttp__internal__n_start_req_58: + s_n_llhttp__internal__n_start_req_58: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_43; + return s_n_llhttp__internal__n_start_req_58; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 7; + match = 33; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_43; + return s_n_llhttp__internal__n_start_req_58; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_46: - s_n_llhttp__internal__n_start_req_46: { + case s_n_llhttp__internal__n_start_req_59: + s_n_llhttp__internal__n_start_req_59: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_46; + return s_n_llhttp__internal__n_start_req_59; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 7); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 26; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_59; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_52: + s_n_llhttp__internal__n_start_req_52: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_52; + } + switch (*p) { + case 'E': { + p++; + goto s_n_llhttp__internal__n_start_req_53; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_58; + } + case 'U': { + p++; + goto s_n_llhttp__internal__n_start_req_59; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_61: + s_n_llhttp__internal__n_start_req_61: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_61; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob52, 6); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 40; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_61; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_62: + s_n_llhttp__internal__n_start_req_62: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_62; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob53, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 7; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_62; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_60: + s_n_llhttp__internal__n_start_req_60: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_60; + } + switch (*p) { + case 'E': { + p++; + goto s_n_llhttp__internal__n_start_req_61; + } + case 'R': { + p++; + goto s_n_llhttp__internal__n_start_req_62; + } + default: { + goto s_n_llhttp__internal__n_error_56; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_65: + s_n_llhttp__internal__n_start_req_65: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_65; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob54, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4409,23 +4992,23 @@ 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_start_req_46; + return s_n_llhttp__internal__n_start_req_65; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_48: - s_n_llhttp__internal__n_start_req_48: { + case s_n_llhttp__internal__n_start_req_67: + s_n_llhttp__internal__n_start_req_67: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_48; + return s_n_llhttp__internal__n_start_req_67; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob55, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4434,23 +5017,23 @@ 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_start_req_48; + return s_n_llhttp__internal__n_start_req_67; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_49: - s_n_llhttp__internal__n_start_req_49: { + case s_n_llhttp__internal__n_start_req_68: + s_n_llhttp__internal__n_start_req_68: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_49; + return s_n_llhttp__internal__n_start_req_68; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob56, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4459,44 +5042,44 @@ 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_start_req_49; + return s_n_llhttp__internal__n_start_req_68; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_47: - s_n_llhttp__internal__n_start_req_47: { + case s_n_llhttp__internal__n_start_req_66: + s_n_llhttp__internal__n_start_req_66: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_47; + return s_n_llhttp__internal__n_start_req_66; } switch (*p) { case 'I': { p++; - goto s_n_llhttp__internal__n_start_req_48; + goto s_n_llhttp__internal__n_start_req_67; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_49; + goto s_n_llhttp__internal__n_start_req_68; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_50: - s_n_llhttp__internal__n_start_req_50: { + case s_n_llhttp__internal__n_start_req_69: + s_n_llhttp__internal__n_start_req_69: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_50; + return s_n_llhttp__internal__n_start_req_69; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 8); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob57, 8); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4505,52 +5088,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_start_req_50; + return s_n_llhttp__internal__n_start_req_69; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_45: - s_n_llhttp__internal__n_start_req_45: { + case s_n_llhttp__internal__n_start_req_64: + s_n_llhttp__internal__n_start_req_64: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_45; + return s_n_llhttp__internal__n_start_req_64; } switch (*p) { case 'B': { p++; - goto s_n_llhttp__internal__n_start_req_46; + goto s_n_llhttp__internal__n_start_req_65; } case 'L': { p++; - goto s_n_llhttp__internal__n_start_req_47; + goto s_n_llhttp__internal__n_start_req_66; } case 'S': { p++; - goto s_n_llhttp__internal__n_start_req_50; + goto s_n_llhttp__internal__n_start_req_69; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_44: - s_n_llhttp__internal__n_start_req_44: { + case s_n_llhttp__internal__n_start_req_63: + s_n_llhttp__internal__n_start_req_63: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_44; + return s_n_llhttp__internal__n_start_req_63; } switch (*p) { case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_45; + goto s_n_llhttp__internal__n_start_req_64; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; @@ -4568,67 +5151,80 @@ static llparse_state_t llhttp__internal__run( } case 'B': { p++; - goto s_n_llhttp__internal__n_start_req_2; + goto s_n_llhttp__internal__n_start_req_4; } case 'C': { p++; - goto s_n_llhttp__internal__n_start_req_3; + goto s_n_llhttp__internal__n_start_req_5; } case 'D': { p++; - goto s_n_llhttp__internal__n_start_req_8; + goto s_n_llhttp__internal__n_start_req_10; + } + case 'F': { + p++; + goto s_n_llhttp__internal__n_start_req_14; } case 'G': { p++; - goto s_n_llhttp__internal__n_start_req_9; + goto s_n_llhttp__internal__n_start_req_15; } case 'H': { p++; - goto s_n_llhttp__internal__n_start_req_10; + goto s_n_llhttp__internal__n_start_req_18; } case 'L': { p++; - goto s_n_llhttp__internal__n_start_req_11; + goto s_n_llhttp__internal__n_start_req_19; } case 'M': { p++; - goto s_n_llhttp__internal__n_start_req_14; + goto s_n_llhttp__internal__n_start_req_22; } case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_23; + goto s_n_llhttp__internal__n_start_req_31; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_24; + goto s_n_llhttp__internal__n_start_req_32; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_25; + goto s_n_llhttp__internal__n_start_req_33; } case 'R': { p++; - goto s_n_llhttp__internal__n_start_req_35; + goto s_n_llhttp__internal__n_start_req_46; } case 'S': { p++; - goto s_n_llhttp__internal__n_start_req_39; + goto s_n_llhttp__internal__n_start_req_52; } case 'T': { p++; - goto s_n_llhttp__internal__n_start_req_43; + goto s_n_llhttp__internal__n_start_req_60; } case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_44; + goto s_n_llhttp__internal__n_start_req_63; } default: { - goto s_n_llhttp__internal__n_error_53; + goto s_n_llhttp__internal__n_error_56; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: + s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: { + switch (llhttp__on_status_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_res_line_almost_done: s_n_llhttp__internal__n_res_line_almost_done: { if (p == endp) { @@ -4637,10 +5233,10 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -4685,7 +5281,7 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; } case 13: { p++; @@ -4715,7 +5311,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_status_start; } default: { - goto s_n_llhttp__internal__n_error_47; + goto s_n_llhttp__internal__n_error_50; } } /* UNREACHABLE */; @@ -4795,7 +5391,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_update_status_code; } default: { - goto s_n_llhttp__internal__n_error_48; + goto s_n_llhttp__internal__n_error_51; } } /* UNREACHABLE */; @@ -4858,7 +5454,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor_1; } default: { - goto s_n_llhttp__internal__n_error_49; + goto s_n_llhttp__internal__n_error_52; } } /* UNREACHABLE */; @@ -4875,7 +5471,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_http_minor; } default: { - goto s_n_llhttp__internal__n_error_50; + goto s_n_llhttp__internal__n_error_53; } } /* UNREACHABLE */; @@ -4938,7 +5534,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major_1; } default: { - goto s_n_llhttp__internal__n_error_51; + goto s_n_llhttp__internal__n_error_54; } } /* UNREACHABLE */; @@ -4951,7 +5547,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_res; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob58, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4962,7 +5558,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_res; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_54; + goto s_n_llhttp__internal__n_error_57; } } /* UNREACHABLE */; @@ -4975,7 +5571,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_or_res_method_2; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob59, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -4987,7 +5583,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -5000,7 +5596,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_or_res_method_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob60, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -5011,7 +5607,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -5032,7 +5628,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_3; } default: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -5049,7 +5645,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_1; } default: { - goto s_n_llhttp__internal__n_error_52; + goto s_n_llhttp__internal__n_error_55; } } /* UNREACHABLE */; @@ -5118,7 +5714,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_43: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -5144,10 +5740,20 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_test_lenient_flags: { + switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_update_finish_2; + default: + goto s_n_llhttp__internal__n_closed; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_update_finish_1: { switch (llhttp__internal__c_update_finish_1(state, p, endp)) { default: - goto s_n_llhttp__internal__n_closed; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags; } /* UNREACHABLE */; abort(); @@ -5179,7 +5785,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_17: { + s_n_llhttp__internal__n_error_16: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -5195,7 +5801,7 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_7; default: - goto s_n_llhttp__internal__n_error_17; + goto s_n_llhttp__internal__n_error_16; } /* UNREACHABLE */; abort(); @@ -5209,15 +5815,6 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_16: { - state->error = 0x4; - state->reason = "Content-Length can't be present with chunked encoding"; - state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_error; - return s_error; - /* UNREACHABLE */; - abort(); - } s_n_llhttp__internal__n_pause_2: { state->error = 0x15; state->reason = "on_message_complete pause"; @@ -5518,22 +6115,10 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_3: { - switch (llhttp__internal__c_test_flags_3(state, p, endp)) { - case 1: - goto s_n_llhttp__internal__n_error_16; - default: - goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; - } - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_invoke_test_flags_2: { - switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_1: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_error_15; - case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_3; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -5543,7 +6128,7 @@ static llparse_state_t llhttp__internal__run( 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_flags_2; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_1; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -5560,7 +6145,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_18: { + s_n_llhttp__internal__n_error_17: { state->error = 0x2; state->reason = "Expected LF after headers"; state->error_pos = (const char*) p; @@ -5569,7 +6154,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_19: { + s_n_llhttp__internal__n_error_18: { state->error = 0xb; state->reason = "Empty Content-Length"; state->error_pos = (const char*) p; @@ -5588,10 +6173,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_header_field_start; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; return s_error; } - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; /* UNREACHABLE */; abort(); } @@ -5654,14 +6239,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_header_state: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 2: - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_18; default: goto s_n_llhttp__internal__n_invoke_load_header_state_1; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_error_19: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -5673,7 +6258,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_update_header_state_1: { switch (llhttp__internal__c_update_header_state(state, p, endp)) { default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); @@ -5705,7 +6290,7 @@ static llparse_state_t llhttp__internal__run( 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_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); @@ -5721,12 +6306,12 @@ static llparse_state_t llhttp__internal__run( case 8: goto s_n_llhttp__internal__n_invoke_or_flags_10; default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_21: { + s_n_llhttp__internal__n_error_20: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -5788,7 +6373,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_22: { + s_n_llhttp__internal__n_error_21: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -5797,12 +6382,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_4: { - switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_2: { + switch (llhttp__internal__c_test_lenient_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; default: - goto s_n_llhttp__internal__n_error_22; + goto s_n_llhttp__internal__n_error_21; } /* UNREACHABLE */; abort(); @@ -5905,10 +6490,10 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_23; return s_error; } - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_23; /* UNREACHABLE */; abort(); } @@ -5940,14 +6525,14 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_25; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24; return s_error; } - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_24; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_23: { + s_n_llhttp__internal__n_error_22: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -5956,12 +6541,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_5: { - switch (llhttp__internal__c_test_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_2: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_22; } /* UNREACHABLE */; abort(); @@ -6011,7 +6596,7 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_header_value_connection; case 2: - goto s_n_llhttp__internal__n_invoke_test_flags_5; + goto s_n_llhttp__internal__n_invoke_test_flags_2; case 3: goto s_n_llhttp__internal__n_invoke_or_flags_16; case 4: @@ -6032,11 +6617,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_header_value_discard_ws; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_value_discard_ws; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; /* UNREACHABLE */; abort(); } @@ -6050,15 +6635,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_header_value_discard_ws; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_value_discard_ws; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_25: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -6091,10 +6676,18 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_llhttp__on_url_complete: { + switch (llhttp__on_url_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_update_http_minor: { switch (llhttp__internal__c_update_http_minor(state, p, endp)) { default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete; } /* UNREACHABLE */; abort(); @@ -6124,7 +6717,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_26: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -6150,24 +6743,52 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_28: { - state->error = 0x9; - state->reason = "Expected CRLF after version"; + s_n_llhttp__internal__n_error_29: { + state->error = 0x17; + state->reason = "Pause on PRI/Upgrade"; state->error_pos = (const char*) p; state->_current = (void*) (intptr_t) s_error; return s_error; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_store_http_minor: { + s_n_llhttp__internal__n_error_30: { + state->error = 0x9; + state->reason = "Expected HTTP/2 Connection Preface"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_28: { + 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_invoke_load_method_1: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 34: + goto s_n_llhttp__internal__n_req_pri_upgrade; + default: + goto s_n_llhttp__internal__n_req_http_complete; + } + /* UNREACHABLE */; + abort(); + } + 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_req_http_end; + goto s_n_llhttp__internal__n_invoke_load_method_1; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_31: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6176,7 +6797,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_32: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6193,7 +6814,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_33: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6202,7 +6823,94 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_27: { + state->error = 0x8; + state->reason = "Invalid method for HTTP/x.x request"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_load_method: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_req_http_major; + case 1: + goto s_n_llhttp__internal__n_req_http_major; + case 2: + goto s_n_llhttp__internal__n_req_http_major; + case 3: + goto s_n_llhttp__internal__n_req_http_major; + case 4: + goto s_n_llhttp__internal__n_req_http_major; + case 5: + goto s_n_llhttp__internal__n_req_http_major; + case 6: + goto s_n_llhttp__internal__n_req_http_major; + case 7: + goto s_n_llhttp__internal__n_req_http_major; + case 8: + goto s_n_llhttp__internal__n_req_http_major; + case 9: + goto s_n_llhttp__internal__n_req_http_major; + case 10: + goto s_n_llhttp__internal__n_req_http_major; + case 11: + goto s_n_llhttp__internal__n_req_http_major; + case 12: + goto s_n_llhttp__internal__n_req_http_major; + case 13: + goto s_n_llhttp__internal__n_req_http_major; + case 14: + goto s_n_llhttp__internal__n_req_http_major; + case 15: + goto s_n_llhttp__internal__n_req_http_major; + case 16: + goto s_n_llhttp__internal__n_req_http_major; + case 17: + goto s_n_llhttp__internal__n_req_http_major; + case 18: + goto s_n_llhttp__internal__n_req_http_major; + case 19: + goto s_n_llhttp__internal__n_req_http_major; + case 20: + goto s_n_llhttp__internal__n_req_http_major; + case 21: + goto s_n_llhttp__internal__n_req_http_major; + case 22: + goto s_n_llhttp__internal__n_req_http_major; + case 23: + goto s_n_llhttp__internal__n_req_http_major; + case 24: + goto s_n_llhttp__internal__n_req_http_major; + case 25: + goto s_n_llhttp__internal__n_req_http_major; + case 26: + goto s_n_llhttp__internal__n_req_http_major; + case 27: + goto s_n_llhttp__internal__n_req_http_major; + case 28: + goto s_n_llhttp__internal__n_req_http_major; + case 29: + goto s_n_llhttp__internal__n_req_http_major; + case 30: + goto s_n_llhttp__internal__n_req_http_major; + case 31: + goto s_n_llhttp__internal__n_req_http_major; + case 32: + goto s_n_llhttp__internal__n_req_http_major; + case 33: + goto s_n_llhttp__internal__n_req_http_major; + case 34: + goto s_n_llhttp__internal__n_req_http_major; + default: + goto s_n_llhttp__internal__n_error_27; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_36: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -6211,7 +6919,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_34: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -6220,12 +6928,65 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_is_equal_method_1: { - switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) { - case 0: - goto s_n_llhttp__internal__n_error_32; + s_n_llhttp__internal__n_invoke_load_method_2: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 33: + goto s_n_llhttp__internal__n_req_http_major; default: + goto s_n_llhttp__internal__n_error_34; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_35: { + state->error = 0x8; + state->reason = "Invalid method for RTSP/x.x request"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_load_method_3: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_req_http_major; + case 3: + goto s_n_llhttp__internal__n_req_http_major; + case 6: + goto s_n_llhttp__internal__n_req_http_major; + case 35: + goto s_n_llhttp__internal__n_req_http_major; + case 36: goto s_n_llhttp__internal__n_req_http_major; + case 37: + goto s_n_llhttp__internal__n_req_http_major; + case 38: + goto s_n_llhttp__internal__n_req_http_major; + case 39: + goto s_n_llhttp__internal__n_req_http_major; + case 40: + goto s_n_llhttp__internal__n_req_http_major; + case 41: + goto s_n_llhttp__internal__n_req_http_major; + case 42: + goto s_n_llhttp__internal__n_req_http_major; + case 43: + goto s_n_llhttp__internal__n_req_http_major; + case 44: + goto s_n_llhttp__internal__n_req_http_major; + case 45: + goto s_n_llhttp__internal__n_req_http_major; + default: + goto s_n_llhttp__internal__n_error_35; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1: { + switch (llhttp__on_url_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_req_http_start; } /* UNREACHABLE */; abort(); @@ -6298,7 +7059,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_37: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -6358,7 +7119,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_38: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -6367,7 +7128,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_39: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -6478,7 +7239,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_40: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -6487,7 +7248,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_41: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6496,7 +7257,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_42: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -6505,7 +7266,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_44: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6514,7 +7275,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_45: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -6523,7 +7284,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_46: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -6542,7 +7303,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_47: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -6559,7 +7320,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_53: { + s_n_llhttp__internal__n_error_56: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -6568,7 +7329,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_48: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -6580,14 +7341,14 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_48; default: goto s_n_llhttp__internal__n_res_status_code; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_49: { state->error = 0x2; state->reason = "Expected LF after CR"; state->error_pos = (const char*) p; @@ -6606,11 +7367,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_header_field_start; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; /* UNREACHABLE */; abort(); } @@ -6632,7 +7393,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_50: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -6649,7 +7410,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_48: { + s_n_llhttp__internal__n_error_51: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -6666,7 +7427,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_49: { + s_n_llhttp__internal__n_error_52: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -6675,7 +7436,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_50: { + s_n_llhttp__internal__n_error_53: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -6692,7 +7453,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_51: { + s_n_llhttp__internal__n_error_54: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -6701,7 +7462,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_54: { + s_n_llhttp__internal__n_error_57: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -6726,7 +7487,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_52: { + s_n_llhttp__internal__n_error_55: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; @@ -6850,188 +7611,221 @@ int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const cha typedef int (*llhttp__internal__span_cb)( llhttp__internal_t*, const char*, const char*); -static const unsigned char llparse_blob0[] = { - 'C', 'L' -}; #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob1[] = { +static const unsigned char ALIGN(16) llparse_blob0[] = { 0x9, 0x9, 0xc, 0xc, '!', '"', '$', '>', '@', '~', 0x80, 0xff, 0x0, 0x0, 0x0, 0x0 }; #endif /* __SSE4_2__ */ -static const unsigned char llparse_blob2[] = { +static const unsigned char llparse_blob1[] = { 'o', 'n' }; -static const unsigned char llparse_blob3[] = { +static const unsigned char llparse_blob2[] = { 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob4[] = { +static const unsigned char llparse_blob3[] = { 'l', 'o', 's', 'e' }; -static const unsigned char llparse_blob5[] = { +static const unsigned char llparse_blob4[] = { 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e' }; -static const unsigned char llparse_blob6[] = { +static const unsigned char llparse_blob5[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob7[] = { +static const unsigned char llparse_blob6[] = { 'c', 'h', 'u', 'n', 'k', 'e', 'd' }; #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob8[] = { +static const unsigned char ALIGN(16) llparse_blob7[] = { 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_blob9[] = { +static const unsigned char ALIGN(16) llparse_blob8[] = { ' ', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A', 'Z', '^', 'z', '|', '|' }; #endif /* __SSE4_2__ */ #ifdef __SSE4_2__ -static const unsigned char ALIGN(16) llparse_blob10[] = { +static const unsigned char ALIGN(16) llparse_blob9[] = { '~', '~', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; #endif /* __SSE4_2__ */ -static const unsigned char llparse_blob11[] = { +static const unsigned char llparse_blob10[] = { 'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h' }; -static const unsigned char llparse_blob12[] = { +static const unsigned char llparse_blob11[] = { 'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n' }; -static const unsigned char llparse_blob13[] = { +static const unsigned char llparse_blob12[] = { 'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g' }; -static const unsigned char llparse_blob14[] = { +static const unsigned char llparse_blob13[] = { 'p', 'g', 'r', 'a', 'd', 'e' }; -static const unsigned char llparse_blob15[] = { +static const unsigned char llparse_blob14[] = { 0xd, 0xa }; -static const unsigned char llparse_blob16[] = { +static const unsigned char llparse_blob15[] = { 'T', 'T', 'P', '/' }; +static const unsigned char llparse_blob16[] = { + 0xd, 0xa, 0xd, 0xa, 'S', 'M', 0xd, 0xa, 0xd, 0xa +}; static const unsigned char llparse_blob17[] = { 'C', 'E', '/' }; static const unsigned char llparse_blob18[] = { - 'I', 'N', 'D' + 'T', 'S', 'P', '/' }; static const unsigned char llparse_blob19[] = { - 'E', 'C', 'K', 'O', 'U', 'T' + 'N', 'O', 'U', 'N', 'C', 'E' }; static const unsigned char llparse_blob20[] = { - 'N', 'E', 'C', 'T' + 'I', 'N', 'D' }; static const unsigned char llparse_blob21[] = { - 'E', 'L', 'E', 'T', 'E' + 'E', 'C', 'K', 'O', 'U', 'T' }; static const unsigned char llparse_blob22[] = { - 'E', 'T' + 'N', 'E', 'C', 'T' }; static const unsigned char llparse_blob23[] = { - 'E', 'A', 'D' + 'E', 'T', 'E' }; static const unsigned char llparse_blob24[] = { - 'N', 'K' + 'C', 'R', 'I', 'B', 'E' }; static const unsigned char llparse_blob25[] = { - 'C', 'K' + 'L', 'U', 'S', 'H' }; static const unsigned char llparse_blob26[] = { - 'S', 'E', 'A', 'R', 'C', 'H' + 'E', 'T' }; static const unsigned char llparse_blob27[] = { - 'R', 'G', 'E' + 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' }; static const unsigned char llparse_blob28[] = { - 'C', 'T', 'I', 'V', 'I', 'T', 'Y' + 'E', 'A', 'D' }; static const unsigned char llparse_blob29[] = { - 'L', 'E', 'N', 'D', 'A', 'R' + 'N', 'K' }; static const unsigned char llparse_blob30[] = { - 'V', 'E' + 'C', 'K' }; static const unsigned char llparse_blob31[] = { - 'O', 'T', 'I', 'F', 'Y' + 'S', 'E', 'A', 'R', 'C', 'H' }; static const unsigned char llparse_blob32[] = { - 'P', 'T', 'I', 'O', 'N', 'S' + 'R', 'G', 'E' }; static const unsigned char llparse_blob33[] = { - 'T', 'C', 'H' + 'C', 'T', 'I', 'V', 'I', 'T', 'Y' }; static const unsigned char llparse_blob34[] = { - 'S', 'T' + 'L', 'E', 'N', 'D', 'A', 'R' }; static const unsigned char llparse_blob35[] = { - 'I', 'N', 'D' + 'V', 'E' }; static const unsigned char llparse_blob36[] = { - 'A', 'T', 'C', 'H' + 'O', 'T', 'I', 'F', 'Y' }; static const unsigned char llparse_blob37[] = { - 'G', 'E' + 'P', 'T', 'I', 'O', 'N', 'S' }; static const unsigned char llparse_blob38[] = { - 'I', 'N', 'D' + 'C', 'H' }; static const unsigned char llparse_blob39[] = { - 'O', 'R', 'T' + 'S', 'E' }; static const unsigned char llparse_blob40[] = { - 'A', 'R', 'C', 'H' + 'A', 'Y' }; static const unsigned char llparse_blob41[] = { - 'U', 'R', 'C', 'E' + 'S', 'T' }; static const unsigned char llparse_blob42[] = { - 'B', 'S', 'C', 'R', 'I', 'B', 'E' + 'I', 'N', 'D' }; static const unsigned char llparse_blob43[] = { - 'R', 'A', 'C', 'E' + 'A', 'T', 'C', 'H' }; static const unsigned char llparse_blob44[] = { - 'I', 'N', 'D' + 'G', 'E' }; static const unsigned char llparse_blob45[] = { - 'N', 'K' + 'I', 'N', 'D' }; static const unsigned char llparse_blob46[] = { - 'C', 'K' + 'O', 'R', 'D' }; static const unsigned char llparse_blob47[] = { - 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E' + 'I', 'R', 'E', 'C', 'T' }; static const unsigned char llparse_blob48[] = { - 'H', 'T', 'T', 'P', '/' + 'O', 'R', 'T' }; static const unsigned char llparse_blob49[] = { - 'A', 'D' + 'R', 'C', 'H' }; static const unsigned char llparse_blob50[] = { - 'T', 'P', '/' + 'P', 'A', 'R', 'A', 'M', 'E', 'T', 'E', 'R' }; - -enum llparse_match_status_e { - kMatchComplete, - kMatchPause, - kMatchMismatch +static const unsigned char llparse_blob51[] = { + 'U', 'R', 'C', 'E' }; -typedef enum llparse_match_status_e llparse_match_status_t; - -struct llparse_match_s { - llparse_match_status_t status; - const unsigned char* current; +static const unsigned char llparse_blob52[] = { + 'B', 'S', 'C', 'R', 'I', 'B', 'E' +}; +static const unsigned char llparse_blob53[] = { + 'A', 'R', 'D', 'O', 'W', 'N' +}; +static const unsigned char llparse_blob54[] = { + 'A', 'C', 'E' +}; +static const unsigned char llparse_blob55[] = { + 'I', 'N', 'D' +}; +static const unsigned char llparse_blob56[] = { + 'N', 'K' +}; +static const unsigned char llparse_blob57[] = { + 'C', 'K' +}; +static const unsigned char llparse_blob58[] = { + 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E' +}; +static const unsigned char llparse_blob59[] = { + 'H', 'T', 'T', 'P', '/' +}; +static const unsigned char llparse_blob60[] = { + 'A', 'D' +}; +static const unsigned char llparse_blob61[] = { + 'T', 'P', '/' }; -typedef struct llparse_match_s llparse_match_t; -static llparse_match_t llparse__match_sequence_id( +enum llparse_match_status_e { + kMatchComplete, + kMatchPause, + kMatchMismatch +}; +typedef enum llparse_match_status_e llparse_match_status_t; + +struct llparse_match_s { + llparse_match_status_t status; + const unsigned char* current; +}; +typedef struct llparse_match_s llparse_match_t; + +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) { @@ -7042,7 +7836,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; @@ -7063,7 +7857,7 @@ static llparse_match_t llparse__match_sequence_id( 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) { @@ -7074,7 +7868,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; @@ -7095,7 +7889,7 @@ static llparse_match_t llparse__match_sequence_to_lower( 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) { @@ -7106,7 +7900,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; @@ -7129,6 +7923,7 @@ static llparse_match_t llparse__match_sequence_to_lower_unsafe( enum llparse_state_e { s_error, + 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, @@ -7150,6 +7945,7 @@ enum llparse_state_e { s_n_llhttp__internal__n_span_start_llhttp__on_body_2, s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete, s_n_llhttp__internal__n_headers_almost_done, + s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete, s_n_llhttp__internal__n_span_start_llhttp__on_header_value, s_n_llhttp__internal__n_header_value_discard_lws, s_n_llhttp__internal__n_header_value_discard_ws_almost_done, @@ -7163,8 +7959,8 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_value_connection_2, s_n_llhttp__internal__n_header_value_connection_3, s_n_llhttp__internal__n_header_value_connection, + s_n_llhttp__internal__n_error_17, s_n_llhttp__internal__n_error_18, - s_n_llhttp__internal__n_error_19, s_n_llhttp__internal__n_header_value_content_length_ws, s_n_llhttp__internal__n_header_value_content_length, s_n_llhttp__internal__n_header_value_te_chunked_last, @@ -7174,6 +7970,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_llhttp__on_header_field_complete, s_n_llhttp__internal__n_header_field_general_otherwise, s_n_llhttp__internal__n_header_field_general, s_n_llhttp__internal__n_header_field_colon, @@ -7189,13 +7986,15 @@ enum llparse_state_e { s_n_llhttp__internal__n_header_field_start, s_n_llhttp__internal__n_url_skip_to_http09, s_n_llhttp__internal__n_url_skip_lf_to_http09, - s_n_llhttp__internal__n_req_http_end_1, - s_n_llhttp__internal__n_req_http_end, + s_n_llhttp__internal__n_req_pri_upgrade, + s_n_llhttp__internal__n_req_http_complete_1, + s_n_llhttp__internal__n_req_http_complete, s_n_llhttp__internal__n_req_http_minor, s_n_llhttp__internal__n_req_http_dot, s_n_llhttp__internal__n_req_http_major, s_n_llhttp__internal__n_req_http_start_1, s_n_llhttp__internal__n_req_http_start_2, + s_n_llhttp__internal__n_req_http_start_3, s_n_llhttp__internal__n_req_http_start, s_n_llhttp__internal__n_url_skip_to_http, s_n_llhttp__internal__n_url_fragment, @@ -7217,57 +8016,77 @@ enum llparse_state_e { s_n_llhttp__internal__n_span_start_llhttp__on_url, s_n_llhttp__internal__n_req_spaces_before_url, s_n_llhttp__internal__n_req_first_space_before_url, - s_n_llhttp__internal__n_start_req_1, s_n_llhttp__internal__n_start_req_2, + s_n_llhttp__internal__n_start_req_3, + s_n_llhttp__internal__n_start_req_1, s_n_llhttp__internal__n_start_req_4, s_n_llhttp__internal__n_start_req_6, - s_n_llhttp__internal__n_start_req_7, - s_n_llhttp__internal__n_start_req_5, - s_n_llhttp__internal__n_start_req_3, s_n_llhttp__internal__n_start_req_8, s_n_llhttp__internal__n_start_req_9, - s_n_llhttp__internal__n_start_req_10, + s_n_llhttp__internal__n_start_req_7, + s_n_llhttp__internal__n_start_req_5, s_n_llhttp__internal__n_start_req_12, s_n_llhttp__internal__n_start_req_13, s_n_llhttp__internal__n_start_req_11, - s_n_llhttp__internal__n_start_req_15, + s_n_llhttp__internal__n_start_req_10, + s_n_llhttp__internal__n_start_req_14, + s_n_llhttp__internal__n_start_req_17, s_n_llhttp__internal__n_start_req_16, + s_n_llhttp__internal__n_start_req_15, s_n_llhttp__internal__n_start_req_18, s_n_llhttp__internal__n_start_req_20, s_n_llhttp__internal__n_start_req_21, s_n_llhttp__internal__n_start_req_19, - s_n_llhttp__internal__n_start_req_17, - s_n_llhttp__internal__n_start_req_22, - s_n_llhttp__internal__n_start_req_14, s_n_llhttp__internal__n_start_req_23, s_n_llhttp__internal__n_start_req_24, s_n_llhttp__internal__n_start_req_26, + s_n_llhttp__internal__n_start_req_28, + s_n_llhttp__internal__n_start_req_29, s_n_llhttp__internal__n_start_req_27, + s_n_llhttp__internal__n_start_req_25, + s_n_llhttp__internal__n_start_req_30, + s_n_llhttp__internal__n_start_req_22, s_n_llhttp__internal__n_start_req_31, s_n_llhttp__internal__n_start_req_32, - s_n_llhttp__internal__n_start_req_30, - s_n_llhttp__internal__n_start_req_29, - s_n_llhttp__internal__n_start_req_28, + s_n_llhttp__internal__n_start_req_35, + s_n_llhttp__internal__n_start_req_36, s_n_llhttp__internal__n_start_req_34, - s_n_llhttp__internal__n_start_req_33, - s_n_llhttp__internal__n_start_req_25, s_n_llhttp__internal__n_start_req_37, s_n_llhttp__internal__n_start_req_38, - s_n_llhttp__internal__n_start_req_36, - s_n_llhttp__internal__n_start_req_35, - s_n_llhttp__internal__n_start_req_40, - s_n_llhttp__internal__n_start_req_41, s_n_llhttp__internal__n_start_req_42, - s_n_llhttp__internal__n_start_req_39, s_n_llhttp__internal__n_start_req_43, - s_n_llhttp__internal__n_start_req_46, + s_n_llhttp__internal__n_start_req_41, + s_n_llhttp__internal__n_start_req_40, + s_n_llhttp__internal__n_start_req_39, + s_n_llhttp__internal__n_start_req_45, + s_n_llhttp__internal__n_start_req_44, + s_n_llhttp__internal__n_start_req_33, s_n_llhttp__internal__n_start_req_48, s_n_llhttp__internal__n_start_req_49, - s_n_llhttp__internal__n_start_req_47, s_n_llhttp__internal__n_start_req_50, - s_n_llhttp__internal__n_start_req_45, - s_n_llhttp__internal__n_start_req_44, + s_n_llhttp__internal__n_start_req_51, + s_n_llhttp__internal__n_start_req_47, + s_n_llhttp__internal__n_start_req_46, + s_n_llhttp__internal__n_start_req_54, + s_n_llhttp__internal__n_start_req_56, + s_n_llhttp__internal__n_start_req_57, + s_n_llhttp__internal__n_start_req_55, + s_n_llhttp__internal__n_start_req_53, + s_n_llhttp__internal__n_start_req_58, + s_n_llhttp__internal__n_start_req_59, + s_n_llhttp__internal__n_start_req_52, + s_n_llhttp__internal__n_start_req_61, + s_n_llhttp__internal__n_start_req_62, + s_n_llhttp__internal__n_start_req_60, + s_n_llhttp__internal__n_start_req_65, + s_n_llhttp__internal__n_start_req_67, + s_n_llhttp__internal__n_start_req_68, + s_n_llhttp__internal__n_start_req_66, + s_n_llhttp__internal__n_start_req_69, + s_n_llhttp__internal__n_start_req_64, + s_n_llhttp__internal__n_start_req_63, s_n_llhttp__internal__n_start_req, + s_n_llhttp__internal__n_invoke_llhttp__on_status_complete, s_n_llhttp__internal__n_res_line_almost_done, s_n_llhttp__internal__n_res_status, s_n_llhttp__internal__n_span_start_llhttp__on_status, @@ -7360,6 +8179,10 @@ int llhttp__internal__c_update_http_minor( return 0; } +int llhttp__on_url_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_test_flags( llhttp__internal_t* state, const unsigned char* p, @@ -7394,25 +8217,25 @@ int llhttp__internal__c_update_finish_1( return 0; } -int llhttp__internal__c_test_flags_1( +int llhttp__internal__c_test_lenient_flags( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 544) == 544; + return (state->lenient_flags & 4) == 4; } -int llhttp__internal__c_test_flags_2( +int llhttp__internal__c_test_flags_1( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 256) == 256; + return (state->flags & 544) == 544; } -int llhttp__internal__c_test_flags_3( +int llhttp__internal__c_test_lenient_flags_1( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { - return (state->flags & 40) == 40; + return (state->lenient_flags & 2) == 2; } int llhttp__before_headers_complete( @@ -7480,7 +8303,7 @@ int llhttp__internal__c_or_flags( return 0; } -int llhttp__internal__c_update_finish_2( +int llhttp__internal__c_update_finish_3( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -7513,6 +8336,10 @@ int llhttp__internal__c_store_header_state( return 0; } +int llhttp__on_header_field_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_load_header_state( llhttp__internal_t* state, const unsigned char* p, @@ -7536,6 +8363,10 @@ int llhttp__internal__c_update_header_state( return 0; } +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( llhttp__internal_t* state, const unsigned char* p, @@ -7568,6 +8399,13 @@ int llhttp__internal__c_update_header_state_2( return 0; } +int llhttp__internal__c_test_lenient_flags_2( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return (state->lenient_flags & 1) == 1; +} + int llhttp__internal__c_update_header_state_4( llhttp__internal_t* state, const unsigned char* p, @@ -7592,7 +8430,7 @@ int llhttp__internal__c_update_header_state_6( return 0; } -int llhttp__internal__c_test_flags_5( +int llhttp__internal__c_test_flags_2( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { @@ -7665,6 +8503,13 @@ int llhttp__internal__c_or_flags_17( return 0; } +int llhttp__internal__c_load_method( + llhttp__internal_t* state, + const unsigned char* p, + const unsigned char* endp) { + return state->method; +} + int llhttp__internal__c_store_http_major( llhttp__internal_t* state, const unsigned char* p, @@ -7683,13 +8528,6 @@ int llhttp__internal__c_store_http_minor( return 0; } -int llhttp__internal__c_is_equal_method_1( - llhttp__internal_t* state, - const unsigned char* p, - const unsigned char* endp) { - return state->method == 33; -} - int llhttp__internal__c_update_status_code( llhttp__internal_t* state, const unsigned char* p, @@ -7729,6 +8567,10 @@ int llhttp__internal__c_mul_add_status_code( return 0; } +int llhttp__on_status_complete( + llhttp__internal_t* s, const unsigned char* p, + const unsigned char* endp); + int llhttp__internal__c_update_type( llhttp__internal_t* state, const unsigned char* p, @@ -7757,9 +8599,21 @@ static llparse_state_t llhttp__internal__run( const unsigned char* endp) { int match; switch ((llparse_state_t) (intptr_t) state->_current) { + case s_n_llhttp__internal__n_closed: + s_n_llhttp__internal__n_closed: { + if (p == endp) { + return s_n_llhttp__internal__n_closed; + } + p++; + goto s_n_llhttp__internal__n_closed; + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: { switch (llhttp__after_message_complete(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_update_finish_2; default: goto s_n_llhttp__internal__n_invoke_update_finish_1; } @@ -8228,7 +9082,7 @@ static llparse_state_t llhttp__internal__run( case 3: goto s_n_llhttp__internal__n_span_start_llhttp__on_body_1; case 4: - goto s_n_llhttp__internal__n_invoke_update_finish_2; + goto s_n_llhttp__internal__n_invoke_update_finish_3; case 5: goto s_n_llhttp__internal__n_error_10; default: @@ -8247,6 +9101,15 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: + s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete: { + switch (llhttp__on_header_value_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_span_start_llhttp__on_header_value: s_n_llhttp__internal__n_span_start_llhttp__on_header_value: { if (p == endp) { @@ -8319,7 +9182,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_header_value_lws; } default: { - goto s_n_llhttp__internal__n_error_15; + goto s_n_llhttp__internal__n_error_14; } } /* UNREACHABLE */; @@ -8358,7 +9221,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2; } default: { - goto s_n_llhttp__internal__n_invoke_test_flags_4; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_2; } } /* UNREACHABLE */; @@ -8437,7 +9300,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_blob4, 4); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob3, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -8461,7 +9324,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_blob5, 9); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob4, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -8485,7 +9348,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_blob6, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob5, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -8535,8 +9398,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_18: - s_n_llhttp__internal__n_error_18: { + case s_n_llhttp__internal__n_error_17: + s_n_llhttp__internal__n_error_17: { state->error = 0xb; state->reason = "Content-Length overflow"; state->error_pos = (const char*) p; @@ -8545,8 +9408,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_error_19: - s_n_llhttp__internal__n_error_19: { + case s_n_llhttp__internal__n_error_18: + s_n_llhttp__internal__n_error_18: { state->error = 0xb; state->reason = "Invalid character in Content-Length"; state->error_pos = (const char*) p; @@ -8717,7 +9580,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, 6, @@ -8790,7 +9653,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_blob7, 7); + match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob6, 7); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -8847,6 +9710,15 @@ static llparse_state_t llhttp__internal__run( /* 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)) { + default: + goto s_n_llhttp__internal__n_header_value_discard_ws; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_header_field_general_otherwise: s_n_llhttp__internal__n_header_field_general_otherwise: { if (p == endp) { @@ -8857,7 +9729,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1; } default: { - goto s_n_llhttp__internal__n_error_20; + goto s_n_llhttp__internal__n_error_19; } } /* UNREACHABLE */; @@ -8895,7 +9767,7 @@ static llparse_state_t llhttp__internal__run( /* Load input */ input = _mm_loadu_si128((__m128i const*) p); - 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, 16, @@ -8907,7 +9779,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_blob10); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob9); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 2, @@ -8961,7 +9833,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_blob3, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob2, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -8986,7 +9858,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_blob11, 10); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob10, 10); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9032,7 +9904,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_blob2, 2); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob1, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9056,7 +9928,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_blob12, 15); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob11, 15); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9081,7 +9953,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_blob13, 16); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob12, 16); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9106,7 +9978,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_blob14, 6); + match_seq = llparse__match_sequence_to_lower(state, p, endp, llparse_blob13, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9201,7 +10073,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_url_skip_lf_to_http09; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob14, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -9212,16 +10084,40 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_url_skip_lf_to_http09; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_21; + goto s_n_llhttp__internal__n_error_20; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_req_pri_upgrade: + s_n_llhttp__internal__n_req_pri_upgrade: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_req_pri_upgrade; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 10); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + goto s_n_llhttp__internal__n_error_23; + } + case kMatchPause: { + return s_n_llhttp__internal__n_req_pri_upgrade; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_24; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_req_http_end_1: - s_n_llhttp__internal__n_req_http_end_1: { + case s_n_llhttp__internal__n_req_http_complete_1: + s_n_llhttp__internal__n_req_http_complete_1: { if (p == endp) { - return s_n_llhttp__internal__n_req_http_end_1; + return s_n_llhttp__internal__n_req_http_complete_1; } switch (*p) { case 10: { @@ -9235,10 +10131,10 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_req_http_end: - s_n_llhttp__internal__n_req_http_end: { + case s_n_llhttp__internal__n_req_http_complete: + s_n_llhttp__internal__n_req_http_complete: { if (p == endp) { - return s_n_llhttp__internal__n_req_http_end; + return s_n_llhttp__internal__n_req_http_complete; } switch (*p) { case 10: { @@ -9247,7 +10143,7 @@ static llparse_state_t llhttp__internal__run( } case 13: { p++; - goto s_n_llhttp__internal__n_req_http_end_1; + goto s_n_llhttp__internal__n_req_http_complete_1; } default: { goto s_n_llhttp__internal__n_error_22; @@ -9313,7 +10209,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor; } default: { - goto s_n_llhttp__internal__n_error_23; + goto s_n_llhttp__internal__n_error_25; } } /* UNREACHABLE */; @@ -9330,7 +10226,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_http_minor; } default: { - goto s_n_llhttp__internal__n_error_24; + goto s_n_llhttp__internal__n_error_26; } } /* UNREACHABLE */; @@ -9393,7 +10289,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major; } default: { - goto s_n_llhttp__internal__n_error_25; + goto s_n_llhttp__internal__n_error_27; } } /* UNREACHABLE */; @@ -9406,18 +10302,18 @@ 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_blob16, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_req_http_major; + goto s_n_llhttp__internal__n_invoke_load_method; } case kMatchPause: { return s_n_llhttp__internal__n_req_http_start_1; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -9435,13 +10331,37 @@ static llparse_state_t llhttp__internal__run( switch (match_seq.status) { case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_invoke_is_equal_method_1; + goto s_n_llhttp__internal__n_invoke_load_method_2; } case kMatchPause: { return s_n_llhttp__internal__n_req_http_start_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_30; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_req_http_start_3: + s_n_llhttp__internal__n_req_http_start_3: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_req_http_start_3; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 4); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + goto s_n_llhttp__internal__n_invoke_load_method_3; + } + case kMatchPause: { + return s_n_llhttp__internal__n_req_http_start_3; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -9465,8 +10385,12 @@ static llparse_state_t llhttp__internal__run( p++; goto s_n_llhttp__internal__n_req_http_start_2; } + case 'R': { + p++; + goto s_n_llhttp__internal__n_req_http_start_3; + } default: { - goto s_n_llhttp__internal__n_error_27; + goto s_n_llhttp__internal__n_error_30; } } /* UNREACHABLE */; @@ -9478,7 +10402,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_url_skip_to_http; } p++; - goto s_n_llhttp__internal__n_req_http_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1; /* UNREACHABLE */; abort(); } @@ -9520,7 +10444,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8; } default: { - goto s_n_llhttp__internal__n_error_28; + goto s_n_llhttp__internal__n_error_31; } } /* UNREACHABLE */; @@ -9577,7 +10501,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_span_end_stub_query_3; } default: { - goto s_n_llhttp__internal__n_error_29; + goto s_n_llhttp__internal__n_error_32; } } /* UNREACHABLE */; @@ -9607,7 +10531,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_query; } default: { - goto s_n_llhttp__internal__n_error_30; + goto s_n_llhttp__internal__n_error_33; } } /* UNREACHABLE */; @@ -9645,7 +10569,7 @@ static llparse_state_t llhttp__internal__run( /* Load input */ input = _mm_loadu_si128((__m128i const*) p); - ranges = _mm_loadu_si128((__m128i const*) llparse_blob1); + ranges = _mm_loadu_si128((__m128i const*) llparse_blob0); /* Find first character that does not match `ranges` */ match_len = _mm_cmpestri(ranges, 12, @@ -9748,10 +10672,10 @@ static llparse_state_t llhttp__internal__run( } case 7: { p++; - goto s_n_llhttp__internal__n_error_31; + goto s_n_llhttp__internal__n_error_34; } default: { - goto s_n_llhttp__internal__n_error_32; + goto s_n_llhttp__internal__n_error_35; } } /* UNREACHABLE */; @@ -9806,7 +10730,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server_with_at; } default: { - goto s_n_llhttp__internal__n_error_33; + goto s_n_llhttp__internal__n_error_36; } } /* UNREACHABLE */; @@ -9823,7 +10747,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_server; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -9837,22 +10761,22 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } case 13: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } case ' ': { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } case '/': { p++; goto s_n_llhttp__internal__n_url_schema_delim_1; } default: { - goto s_n_llhttp__internal__n_error_35; + goto s_n_llhttp__internal__n_error_38; } } /* UNREACHABLE */; @@ -9894,7 +10818,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } case 2: { goto s_n_llhttp__internal__n_span_end_stub_schema; @@ -9904,7 +10828,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_36; + goto s_n_llhttp__internal__n_error_39; } } /* UNREACHABLE */; @@ -9936,7 +10860,7 @@ static llparse_state_t llhttp__internal__run( switch (lookup_table[(uint8_t) *p]) { case 1: { p++; - goto s_n_llhttp__internal__n_error_34; + goto s_n_llhttp__internal__n_error_37; } case 2: { goto s_n_llhttp__internal__n_span_start_stub_path_2; @@ -9945,7 +10869,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_url_schema; } default: { - goto s_n_llhttp__internal__n_error_37; + goto s_n_llhttp__internal__n_error_40; } } /* UNREACHABLE */; @@ -10001,57 +10925,71 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_spaces_before_url; } default: { - goto s_n_llhttp__internal__n_error_38; + goto s_n_llhttp__internal__n_error_41; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_1: - s_n_llhttp__internal__n_start_req_1: { - llparse_match_t match_seq; - + case s_n_llhttp__internal__n_start_req_2: + s_n_llhttp__internal__n_start_req_2: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_1; + return s_n_llhttp__internal__n_start_req_2; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob0, 2); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { - p++; + switch (*p) { + case 'L': { + p++; match = 19; goto s_n_llhttp__internal__n_invoke_store_method_1; } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_1; - } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + default: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_2: - s_n_llhttp__internal__n_start_req_2: { + case s_n_llhttp__internal__n_start_req_3: + s_n_llhttp__internal__n_start_req_3: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_2; + return s_n_llhttp__internal__n_start_req_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 16; + match = 36; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_2; + return s_n_llhttp__internal__n_start_req_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_1: + s_n_llhttp__internal__n_start_req_1: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_1; + } + switch (*p) { + case 'C': { + p++; + goto s_n_llhttp__internal__n_start_req_2; + } + case 'N': { + p++; + goto s_n_llhttp__internal__n_start_req_3; + } + default: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10064,19 +11002,19 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_4; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 22; + match = 16; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_4; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10089,28 +11027,53 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_6; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 5; + match = 22; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_6; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_7: - s_n_llhttp__internal__n_start_req_7: { + case s_n_llhttp__internal__n_start_req_8: + s_n_llhttp__internal__n_start_req_8: { + llparse_match_t match_seq; + if (p == endp) { - return s_n_llhttp__internal__n_start_req_7; + return s_n_llhttp__internal__n_start_req_8; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 4); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 5; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_8; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_9: + s_n_llhttp__internal__n_start_req_9: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_9; } switch (*p) { case 'Y': { @@ -10119,62 +11082,62 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_method_1; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_5: - s_n_llhttp__internal__n_start_req_5: { + case s_n_llhttp__internal__n_start_req_7: + s_n_llhttp__internal__n_start_req_7: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_5; + return s_n_llhttp__internal__n_start_req_7; } switch (*p) { case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_6; + goto s_n_llhttp__internal__n_start_req_8; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_7; + goto s_n_llhttp__internal__n_start_req_9; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_3: - s_n_llhttp__internal__n_start_req_3: { + case s_n_llhttp__internal__n_start_req_5: + s_n_llhttp__internal__n_start_req_5: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_3; + return s_n_llhttp__internal__n_start_req_5; } switch (*p) { case 'H': { p++; - goto s_n_llhttp__internal__n_start_req_4; + goto s_n_llhttp__internal__n_start_req_6; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_5; + goto s_n_llhttp__internal__n_start_req_7; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_8: - s_n_llhttp__internal__n_start_req_8: { + case s_n_llhttp__internal__n_start_req_12: + s_n_llhttp__internal__n_start_req_12: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_8; + return s_n_llhttp__internal__n_start_req_12; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -10183,35 +11146,56 @@ 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_start_req_8; + return s_n_llhttp__internal__n_start_req_12; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_9: - s_n_llhttp__internal__n_start_req_9: { + case s_n_llhttp__internal__n_start_req_13: + s_n_llhttp__internal__n_start_req_13: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_9; + return s_n_llhttp__internal__n_start_req_13; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 1; + match = 35; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_9; + return s_n_llhttp__internal__n_start_req_13; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_11: + s_n_llhttp__internal__n_start_req_11: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_11; + } + switch (*p) { + case 'L': { + p++; + goto s_n_llhttp__internal__n_start_req_12; + } + case 'S': { + p++; + goto s_n_llhttp__internal__n_start_req_13; + } + default: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10219,95 +11203,84 @@ static llparse_state_t llhttp__internal__run( } case s_n_llhttp__internal__n_start_req_10: s_n_llhttp__internal__n_start_req_10: { - llparse_match_t match_seq; - if (p == endp) { return s_n_llhttp__internal__n_start_req_10; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 3); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { + switch (*p) { + case 'E': { p++; - match = 2; - goto s_n_llhttp__internal__n_invoke_store_method_1; - } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_10; + goto s_n_llhttp__internal__n_start_req_11; } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + default: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_12: - s_n_llhttp__internal__n_start_req_12: { + case s_n_llhttp__internal__n_start_req_14: + s_n_llhttp__internal__n_start_req_14: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_12; + return s_n_llhttp__internal__n_start_req_14; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 31; + match = 45; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_12; + return s_n_llhttp__internal__n_start_req_14; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_13: - s_n_llhttp__internal__n_start_req_13: { + case s_n_llhttp__internal__n_start_req_17: + s_n_llhttp__internal__n_start_req_17: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_13; + return s_n_llhttp__internal__n_start_req_17; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 9; + match = 41; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_13; + return s_n_llhttp__internal__n_start_req_17; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_11: - s_n_llhttp__internal__n_start_req_11: { + case s_n_llhttp__internal__n_start_req_16: + s_n_llhttp__internal__n_start_req_16: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_11; + return s_n_llhttp__internal__n_start_req_16; } switch (*p) { - case 'I': { + case '_': { p++; - goto s_n_llhttp__internal__n_start_req_12; - } - case 'O': { - p++; - goto s_n_llhttp__internal__n_start_req_13; + goto s_n_llhttp__internal__n_start_req_17; } default: { - goto s_n_llhttp__internal__n_error_46; + match = 1; + goto s_n_llhttp__internal__n_invoke_store_method_1; } } /* UNREACHABLE */; @@ -10320,44 +11293,18 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_15; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 24; - goto s_n_llhttp__internal__n_invoke_store_method_1; + goto s_n_llhttp__internal__n_start_req_16; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_15; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; - } - } - /* UNREACHABLE */; - abort(); - } - case s_n_llhttp__internal__n_start_req_16: - s_n_llhttp__internal__n_start_req_16: { - llparse_match_t match_seq; - - if (p == endp) { - return s_n_llhttp__internal__n_start_req_16; - } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 3); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { - p++; - match = 23; - goto s_n_llhttp__internal__n_invoke_store_method_1; - } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_16; - } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10370,19 +11317,19 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_18; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 7); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 21; + match = 2; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_18; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10395,19 +11342,19 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_req_20; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 30; + match = 31; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { return s_n_llhttp__internal__n_start_req_20; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10415,17 +11362,24 @@ static llparse_state_t llhttp__internal__run( } case s_n_llhttp__internal__n_start_req_21: s_n_llhttp__internal__n_start_req_21: { + llparse_match_t match_seq; + if (p == endp) { return s_n_llhttp__internal__n_start_req_21; } - switch (*p) { - case 'L': { + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 2); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { p++; - match = 10; + match = 9; goto s_n_llhttp__internal__n_invoke_store_method_1; } - default: { - goto s_n_llhttp__internal__n_error_46; + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_21; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -10437,7 +11391,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_req_19; } switch (*p) { - case 'A': { + case 'I': { p++; goto s_n_llhttp__internal__n_start_req_20; } @@ -10446,594 +11400,997 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_start_req_21; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_17: - s_n_llhttp__internal__n_start_req_17: { + case s_n_llhttp__internal__n_start_req_23: + s_n_llhttp__internal__n_start_req_23: { + llparse_match_t match_seq; + if (p == endp) { - return s_n_llhttp__internal__n_start_req_17; + return s_n_llhttp__internal__n_start_req_23; } - switch (*p) { - case 'A': { + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 6); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_start_req_18; + match = 24; + goto s_n_llhttp__internal__n_invoke_store_method_1; } - case 'C': { - p++; - goto s_n_llhttp__internal__n_start_req_19; + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_23; } - default: { - goto s_n_llhttp__internal__n_error_46; + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_22: - s_n_llhttp__internal__n_start_req_22: { + case s_n_llhttp__internal__n_start_req_24: + s_n_llhttp__internal__n_start_req_24: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_22; + return s_n_llhttp__internal__n_start_req_24; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 11; + match = 23; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_22; + return s_n_llhttp__internal__n_start_req_24; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_14: - s_n_llhttp__internal__n_start_req_14: { + case s_n_llhttp__internal__n_start_req_26: + s_n_llhttp__internal__n_start_req_26: { + llparse_match_t match_seq; + if (p == endp) { - return s_n_llhttp__internal__n_start_req_14; + return s_n_llhttp__internal__n_start_req_26; } - switch (*p) { - case '-': { - p++; - goto s_n_llhttp__internal__n_start_req_15; - } - case 'E': { - p++; - goto s_n_llhttp__internal__n_start_req_16; - } - case 'K': { + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 7); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { p++; - goto s_n_llhttp__internal__n_start_req_17; + match = 21; + goto s_n_llhttp__internal__n_invoke_store_method_1; } - case 'O': { - p++; - goto s_n_llhttp__internal__n_start_req_22; + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_26; } - default: { - goto s_n_llhttp__internal__n_error_46; + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_23: - s_n_llhttp__internal__n_start_req_23: { + case s_n_llhttp__internal__n_start_req_28: + s_n_llhttp__internal__n_start_req_28: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_23; + return s_n_llhttp__internal__n_start_req_28; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 25; + match = 30; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_23; + return s_n_llhttp__internal__n_start_req_28; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_24: - s_n_llhttp__internal__n_start_req_24: { + case s_n_llhttp__internal__n_start_req_29: + s_n_llhttp__internal__n_start_req_29: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_29; + } + switch (*p) { + case 'L': { + p++; + match = 10; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_27: + s_n_llhttp__internal__n_start_req_27: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_27; + } + switch (*p) { + case 'A': { + p++; + goto s_n_llhttp__internal__n_start_req_28; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_29; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_25: + s_n_llhttp__internal__n_start_req_25: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_25; + } + switch (*p) { + case 'A': { + p++; + goto s_n_llhttp__internal__n_start_req_26; + } + case 'C': { + p++; + goto s_n_llhttp__internal__n_start_req_27; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_30: + s_n_llhttp__internal__n_start_req_30: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_24; + return s_n_llhttp__internal__n_start_req_30; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 6); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 6; + match = 11; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_24; + return s_n_llhttp__internal__n_start_req_30; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_26: - s_n_llhttp__internal__n_start_req_26: { + case s_n_llhttp__internal__n_start_req_22: + s_n_llhttp__internal__n_start_req_22: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_22; + } + switch (*p) { + case '-': { + p++; + goto s_n_llhttp__internal__n_start_req_23; + } + case 'E': { + p++; + goto s_n_llhttp__internal__n_start_req_24; + } + case 'K': { + p++; + goto s_n_llhttp__internal__n_start_req_25; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_30; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_31: + s_n_llhttp__internal__n_start_req_31: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_26; + return s_n_llhttp__internal__n_start_req_31; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 28; + match = 25; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_26; + return s_n_llhttp__internal__n_start_req_31; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_27: - s_n_llhttp__internal__n_start_req_27: { + case s_n_llhttp__internal__n_start_req_32: + s_n_llhttp__internal__n_start_req_32: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_27; + return s_n_llhttp__internal__n_start_req_32; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 3; + match = 6; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_27; + return s_n_llhttp__internal__n_start_req_32; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_31: - s_n_llhttp__internal__n_start_req_31: { + case s_n_llhttp__internal__n_start_req_35: + s_n_llhttp__internal__n_start_req_35: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_31; + return s_n_llhttp__internal__n_start_req_35; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 12; + match = 28; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_31; + return s_n_llhttp__internal__n_start_req_35; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_32: - s_n_llhttp__internal__n_start_req_32: { + case s_n_llhttp__internal__n_start_req_36: + s_n_llhttp__internal__n_start_req_36: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_32; + return s_n_llhttp__internal__n_start_req_36; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 13; + match = 39; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_32; + return s_n_llhttp__internal__n_start_req_36; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_30: - s_n_llhttp__internal__n_start_req_30: { + case s_n_llhttp__internal__n_start_req_34: + s_n_llhttp__internal__n_start_req_34: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_30; + return s_n_llhttp__internal__n_start_req_34; } switch (*p) { - case 'F': { + case 'T': { p++; - goto s_n_llhttp__internal__n_start_req_31; + goto s_n_llhttp__internal__n_start_req_35; } - case 'P': { + case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_32; + goto s_n_llhttp__internal__n_start_req_36; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_29: - s_n_llhttp__internal__n_start_req_29: { + case s_n_llhttp__internal__n_start_req_37: + s_n_llhttp__internal__n_start_req_37: { + llparse_match_t match_seq; + if (p == endp) { - return s_n_llhttp__internal__n_start_req_29; + return s_n_llhttp__internal__n_start_req_37; } - switch (*p) { + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 2); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 38; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_37; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_38: + s_n_llhttp__internal__n_start_req_38: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_38; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 2); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 3; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_38; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_42: + s_n_llhttp__internal__n_start_req_42: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_42; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 12; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_42; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_43: + s_n_llhttp__internal__n_start_req_43: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_43; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 4); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 13; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_43; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_41: + s_n_llhttp__internal__n_start_req_41: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_41; + } + switch (*p) { + case 'F': { + p++; + goto s_n_llhttp__internal__n_start_req_42; + } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_30; + goto s_n_llhttp__internal__n_start_req_43; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_40: + s_n_llhttp__internal__n_start_req_40: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_40; + } + switch (*p) { + case 'P': { + p++; + goto s_n_llhttp__internal__n_start_req_41; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_39: + s_n_llhttp__internal__n_start_req_39: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_39; + } + switch (*p) { + case 'I': { + p++; + match = 34; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_40; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_45: + s_n_llhttp__internal__n_start_req_45: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_45; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 2); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 29; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_45; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_44: + s_n_llhttp__internal__n_start_req_44: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_44; + } + switch (*p) { + case 'R': { + p++; + goto s_n_llhttp__internal__n_start_req_45; + } + case 'T': { + p++; + match = 4; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_33: + s_n_llhttp__internal__n_start_req_33: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_33; + } + switch (*p) { + case 'A': { + p++; + goto s_n_llhttp__internal__n_start_req_34; + } + case 'L': { + p++; + goto s_n_llhttp__internal__n_start_req_37; + } + case 'O': { + p++; + goto s_n_llhttp__internal__n_start_req_38; + } + case 'R': { + p++; + goto s_n_llhttp__internal__n_start_req_39; + } + case 'U': { + p++; + goto s_n_llhttp__internal__n_start_req_44; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_48: + s_n_llhttp__internal__n_start_req_48: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_48; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 17; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_48; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_49: + s_n_llhttp__internal__n_start_req_49: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_49; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 44; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_49; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_50: + s_n_llhttp__internal__n_start_req_50: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_50; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 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_start_req_50; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_51: + s_n_llhttp__internal__n_start_req_51: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_51; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 20; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_51; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_47: + s_n_llhttp__internal__n_start_req_47: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_47; + } + switch (*p) { + case 'B': { + p++; + goto s_n_llhttp__internal__n_start_req_48; + } + case 'C': { + p++; + goto s_n_llhttp__internal__n_start_req_49; + } + case 'D': { + p++; + goto s_n_llhttp__internal__n_start_req_50; + } + case 'P': { + p++; + goto s_n_llhttp__internal__n_start_req_51; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_46: + s_n_llhttp__internal__n_start_req_46: { + if (p == endp) { + return s_n_llhttp__internal__n_start_req_46; + } + switch (*p) { + case 'E': { + p++; + goto s_n_llhttp__internal__n_start_req_47; + } + default: { + goto s_n_llhttp__internal__n_error_49; + } + } + /* UNREACHABLE */; + abort(); + } + case s_n_llhttp__internal__n_start_req_54: + s_n_llhttp__internal__n_start_req_54: { + llparse_match_t match_seq; + + if (p == endp) { + return s_n_llhttp__internal__n_start_req_54; + } + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 3); + p = match_seq.current; + switch (match_seq.status) { + case kMatchComplete: { + p++; + match = 14; + goto s_n_llhttp__internal__n_invoke_store_method_1; + } + case kMatchPause: { + return s_n_llhttp__internal__n_start_req_54; + } + case kMatchMismatch: { + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_28: - s_n_llhttp__internal__n_start_req_28: { + case s_n_llhttp__internal__n_start_req_56: + s_n_llhttp__internal__n_start_req_56: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_28; + return s_n_llhttp__internal__n_start_req_56; } switch (*p) { - case 'I': { + case 'P': { p++; - match = 34; + match = 37; goto s_n_llhttp__internal__n_invoke_store_method_1; } - case 'O': { - p++; - goto s_n_llhttp__internal__n_start_req_29; - } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_34: - s_n_llhttp__internal__n_start_req_34: { + case s_n_llhttp__internal__n_start_req_57: + s_n_llhttp__internal__n_start_req_57: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_34; + return s_n_llhttp__internal__n_start_req_57; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 9); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 29; + match = 42; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_34; + return s_n_llhttp__internal__n_start_req_57; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_33: - s_n_llhttp__internal__n_start_req_33: { + case s_n_llhttp__internal__n_start_req_55: + s_n_llhttp__internal__n_start_req_55: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_33; + return s_n_llhttp__internal__n_start_req_55; } switch (*p) { - case 'R': { + case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_34; + goto s_n_llhttp__internal__n_start_req_56; } - case 'T': { + case '_': { p++; - match = 4; - goto s_n_llhttp__internal__n_invoke_store_method_1; + goto s_n_llhttp__internal__n_start_req_57; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_25: - s_n_llhttp__internal__n_start_req_25: { + case s_n_llhttp__internal__n_start_req_53: + s_n_llhttp__internal__n_start_req_53: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_25; + return s_n_llhttp__internal__n_start_req_53; } switch (*p) { case 'A': { p++; - goto s_n_llhttp__internal__n_start_req_26; - } - case 'O': { - p++; - goto s_n_llhttp__internal__n_start_req_27; - } - case 'R': { - p++; - goto s_n_llhttp__internal__n_start_req_28; + goto s_n_llhttp__internal__n_start_req_54; } - case 'U': { + case 'T': { p++; - goto s_n_llhttp__internal__n_start_req_33; + goto s_n_llhttp__internal__n_start_req_55; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_37: - s_n_llhttp__internal__n_start_req_37: { + case s_n_llhttp__internal__n_start_req_58: + s_n_llhttp__internal__n_start_req_58: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_37; + return s_n_llhttp__internal__n_start_req_58; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 4); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 17; + match = 33; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_37; + return s_n_llhttp__internal__n_start_req_58; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_38: - s_n_llhttp__internal__n_start_req_38: { + case s_n_llhttp__internal__n_start_req_59: + s_n_llhttp__internal__n_start_req_59: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_38; + return s_n_llhttp__internal__n_start_req_59; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob52, 7); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 20; + match = 26; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_38; + return s_n_llhttp__internal__n_start_req_59; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_36: - s_n_llhttp__internal__n_start_req_36: { + case s_n_llhttp__internal__n_start_req_52: + s_n_llhttp__internal__n_start_req_52: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_36; + return s_n_llhttp__internal__n_start_req_52; } switch (*p) { - case 'B': { + case 'E': { p++; - goto s_n_llhttp__internal__n_start_req_37; + goto s_n_llhttp__internal__n_start_req_53; } - case 'P': { + case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_38; - } - default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_start_req_58; } - } - /* UNREACHABLE */; - abort(); - } - case s_n_llhttp__internal__n_start_req_35: - s_n_llhttp__internal__n_start_req_35: { - if (p == endp) { - return s_n_llhttp__internal__n_start_req_35; - } - switch (*p) { - case 'E': { + case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_36; + goto s_n_llhttp__internal__n_start_req_59; } default: { - goto s_n_llhttp__internal__n_error_46; - } - } - /* UNREACHABLE */; - abort(); - } - case s_n_llhttp__internal__n_start_req_40: - s_n_llhttp__internal__n_start_req_40: { - llparse_match_t match_seq; - - if (p == endp) { - return s_n_llhttp__internal__n_start_req_40; - } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 4); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { - p++; - match = 14; - goto s_n_llhttp__internal__n_invoke_store_method_1; - } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_40; - } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_41: - s_n_llhttp__internal__n_start_req_41: { + case s_n_llhttp__internal__n_start_req_61: + s_n_llhttp__internal__n_start_req_61: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_41; + return s_n_llhttp__internal__n_start_req_61; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 4); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob53, 6); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 33; + match = 40; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_41; + return s_n_llhttp__internal__n_start_req_61; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_42: - s_n_llhttp__internal__n_start_req_42: { + case s_n_llhttp__internal__n_start_req_62: + s_n_llhttp__internal__n_start_req_62: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_42; + return s_n_llhttp__internal__n_start_req_62; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 7); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob54, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { p++; - match = 26; + match = 7; goto s_n_llhttp__internal__n_invoke_store_method_1; } case kMatchPause: { - return s_n_llhttp__internal__n_start_req_42; + return s_n_llhttp__internal__n_start_req_62; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_39: - s_n_llhttp__internal__n_start_req_39: { + case s_n_llhttp__internal__n_start_req_60: + s_n_llhttp__internal__n_start_req_60: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_39; + return s_n_llhttp__internal__n_start_req_60; } switch (*p) { case 'E': { p++; - goto s_n_llhttp__internal__n_start_req_40; - } - case 'O': { - p++; - goto s_n_llhttp__internal__n_start_req_41; + goto s_n_llhttp__internal__n_start_req_61; } - case 'U': { + case 'R': { p++; - goto s_n_llhttp__internal__n_start_req_42; + goto s_n_llhttp__internal__n_start_req_62; } default: { - goto s_n_llhttp__internal__n_error_46; - } - } - /* UNREACHABLE */; - abort(); - } - case s_n_llhttp__internal__n_start_req_43: - s_n_llhttp__internal__n_start_req_43: { - llparse_match_t match_seq; - - if (p == endp) { - return s_n_llhttp__internal__n_start_req_43; - } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 4); - p = match_seq.current; - switch (match_seq.status) { - case kMatchComplete: { - p++; - match = 7; - goto s_n_llhttp__internal__n_invoke_store_method_1; - } - case kMatchPause: { - return s_n_llhttp__internal__n_start_req_43; - } - case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_46: - s_n_llhttp__internal__n_start_req_46: { + case s_n_llhttp__internal__n_start_req_65: + s_n_llhttp__internal__n_start_req_65: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_46; + return s_n_llhttp__internal__n_start_req_65; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob55, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11042,23 +12399,23 @@ 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_start_req_46; + return s_n_llhttp__internal__n_start_req_65; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_48: - s_n_llhttp__internal__n_start_req_48: { + case s_n_llhttp__internal__n_start_req_67: + s_n_llhttp__internal__n_start_req_67: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_48; + return s_n_llhttp__internal__n_start_req_67; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob56, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11067,23 +12424,23 @@ 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_start_req_48; + return s_n_llhttp__internal__n_start_req_67; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_49: - s_n_llhttp__internal__n_start_req_49: { + case s_n_llhttp__internal__n_start_req_68: + s_n_llhttp__internal__n_start_req_68: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_49; + return s_n_llhttp__internal__n_start_req_68; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob57, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11092,44 +12449,44 @@ 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_start_req_49; + return s_n_llhttp__internal__n_start_req_68; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_47: - s_n_llhttp__internal__n_start_req_47: { + case s_n_llhttp__internal__n_start_req_66: + s_n_llhttp__internal__n_start_req_66: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_47; + return s_n_llhttp__internal__n_start_req_66; } switch (*p) { case 'I': { p++; - goto s_n_llhttp__internal__n_start_req_48; + goto s_n_llhttp__internal__n_start_req_67; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_49; + goto s_n_llhttp__internal__n_start_req_68; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_50: - s_n_llhttp__internal__n_start_req_50: { + case s_n_llhttp__internal__n_start_req_69: + s_n_llhttp__internal__n_start_req_69: { llparse_match_t match_seq; if (p == endp) { - return s_n_llhttp__internal__n_start_req_50; + return s_n_llhttp__internal__n_start_req_69; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 8); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob58, 8); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11138,52 +12495,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_start_req_50; + return s_n_llhttp__internal__n_start_req_69; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_45: - s_n_llhttp__internal__n_start_req_45: { + case s_n_llhttp__internal__n_start_req_64: + s_n_llhttp__internal__n_start_req_64: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_45; + return s_n_llhttp__internal__n_start_req_64; } switch (*p) { case 'B': { p++; - goto s_n_llhttp__internal__n_start_req_46; + goto s_n_llhttp__internal__n_start_req_65; } case 'L': { p++; - goto s_n_llhttp__internal__n_start_req_47; + goto s_n_llhttp__internal__n_start_req_66; } case 'S': { p++; - goto s_n_llhttp__internal__n_start_req_50; + goto s_n_llhttp__internal__n_start_req_69; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } - case s_n_llhttp__internal__n_start_req_44: - s_n_llhttp__internal__n_start_req_44: { + case s_n_llhttp__internal__n_start_req_63: + s_n_llhttp__internal__n_start_req_63: { if (p == endp) { - return s_n_llhttp__internal__n_start_req_44; + return s_n_llhttp__internal__n_start_req_63; } switch (*p) { case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_45; + goto s_n_llhttp__internal__n_start_req_64; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; @@ -11201,74 +12558,87 @@ static llparse_state_t llhttp__internal__run( } case 'B': { p++; - goto s_n_llhttp__internal__n_start_req_2; + goto s_n_llhttp__internal__n_start_req_4; } case 'C': { p++; - goto s_n_llhttp__internal__n_start_req_3; + goto s_n_llhttp__internal__n_start_req_5; } case 'D': { p++; - goto s_n_llhttp__internal__n_start_req_8; + goto s_n_llhttp__internal__n_start_req_10; + } + case 'F': { + p++; + goto s_n_llhttp__internal__n_start_req_14; } case 'G': { p++; - goto s_n_llhttp__internal__n_start_req_9; + goto s_n_llhttp__internal__n_start_req_15; } case 'H': { p++; - goto s_n_llhttp__internal__n_start_req_10; + goto s_n_llhttp__internal__n_start_req_18; } case 'L': { p++; - goto s_n_llhttp__internal__n_start_req_11; + goto s_n_llhttp__internal__n_start_req_19; } case 'M': { p++; - goto s_n_llhttp__internal__n_start_req_14; + goto s_n_llhttp__internal__n_start_req_22; } case 'N': { p++; - goto s_n_llhttp__internal__n_start_req_23; + goto s_n_llhttp__internal__n_start_req_31; } case 'O': { p++; - goto s_n_llhttp__internal__n_start_req_24; + goto s_n_llhttp__internal__n_start_req_32; } case 'P': { p++; - goto s_n_llhttp__internal__n_start_req_25; + goto s_n_llhttp__internal__n_start_req_33; } case 'R': { p++; - goto s_n_llhttp__internal__n_start_req_35; + goto s_n_llhttp__internal__n_start_req_46; } case 'S': { p++; - goto s_n_llhttp__internal__n_start_req_39; + goto s_n_llhttp__internal__n_start_req_52; } case 'T': { p++; - goto s_n_llhttp__internal__n_start_req_43; + goto s_n_llhttp__internal__n_start_req_60; } case 'U': { p++; - goto s_n_llhttp__internal__n_start_req_44; + goto s_n_llhttp__internal__n_start_req_63; } default: { - goto s_n_llhttp__internal__n_error_46; + goto s_n_llhttp__internal__n_error_49; } } /* UNREACHABLE */; abort(); } + case s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: + s_n_llhttp__internal__n_invoke_llhttp__on_status_complete: { + switch (llhttp__on_status_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } case s_n_llhttp__internal__n_res_line_almost_done: s_n_llhttp__internal__n_res_line_almost_done: { if (p == endp) { return s_n_llhttp__internal__n_res_line_almost_done; } p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; /* UNREACHABLE */; abort(); } @@ -11311,7 +12681,7 @@ static llparse_state_t llhttp__internal__run( switch (*p) { case 10: { p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; } case 13: { p++; @@ -11341,7 +12711,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_status_start; } default: { - goto s_n_llhttp__internal__n_error_40; + goto s_n_llhttp__internal__n_error_43; } } /* UNREACHABLE */; @@ -11421,7 +12791,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_update_status_code; } default: { - goto s_n_llhttp__internal__n_error_41; + goto s_n_llhttp__internal__n_error_44; } } /* UNREACHABLE */; @@ -11484,7 +12854,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_minor_1; } default: { - goto s_n_llhttp__internal__n_error_42; + goto s_n_llhttp__internal__n_error_45; } } /* UNREACHABLE */; @@ -11501,7 +12871,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_res_http_minor; } default: { - goto s_n_llhttp__internal__n_error_43; + goto s_n_llhttp__internal__n_error_46; } } /* UNREACHABLE */; @@ -11564,7 +12934,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_invoke_store_http_major_1; } default: { - goto s_n_llhttp__internal__n_error_44; + goto s_n_llhttp__internal__n_error_47; } } /* UNREACHABLE */; @@ -11577,7 +12947,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_start_res; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 5); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob59, 5); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11588,7 +12958,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_start_res; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_47; + goto s_n_llhttp__internal__n_error_50; } } /* UNREACHABLE */; @@ -11601,7 +12971,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_or_res_method_2; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 2); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob60, 2); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11613,7 +12983,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_2; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11626,7 +12996,7 @@ static llparse_state_t llhttp__internal__run( if (p == endp) { return s_n_llhttp__internal__n_req_or_res_method_3; } - match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 3); + match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob61, 3); p = match_seq.current; switch (match_seq.status) { case kMatchComplete: { @@ -11637,7 +13007,7 @@ static llparse_state_t llhttp__internal__run( return s_n_llhttp__internal__n_req_or_res_method_3; } case kMatchMismatch: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11658,7 +13028,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_3; } default: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11675,7 +13045,7 @@ static llparse_state_t llhttp__internal__run( goto s_n_llhttp__internal__n_req_or_res_method_1; } default: { - goto s_n_llhttp__internal__n_error_45; + goto s_n_llhttp__internal__n_error_48; } } /* UNREACHABLE */; @@ -11735,7 +13105,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */ abort(); } - s_n_llhttp__internal__n_error_34: { + s_n_llhttp__internal__n_error_37: { state->error = 0x7; state->reason = "Invalid characters in url"; state->error_pos = (const char*) p; @@ -11744,7 +13114,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_update_finish_1: { + s_n_llhttp__internal__n_invoke_update_finish_2: { switch (llhttp__internal__c_update_finish_1(state, p, endp)) { default: goto s_n_llhttp__internal__n_start; @@ -11752,6 +13122,24 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_test_lenient_flags: { + switch (llhttp__internal__c_test_lenient_flags(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_invoke_update_finish_2; + default: + goto s_n_llhttp__internal__n_closed; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_update_finish_1: { + switch (llhttp__internal__c_update_finish_1(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_invoke_test_lenient_flags; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_pause_5: { state->error = 0x15; state->reason = "on_message_complete pause"; @@ -11779,7 +13167,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_13: { + s_n_llhttp__internal__n_error_12: { state->error = 0x14; state->reason = "`on_chunk_complete` callback error"; state->error_pos = (const char*) p; @@ -11795,7 +13183,7 @@ static llparse_state_t llhttp__internal__run( case 21: goto s_n_llhttp__internal__n_pause_7; default: - goto s_n_llhttp__internal__n_error_13; + goto s_n_llhttp__internal__n_error_12; } /* UNREACHABLE */; abort(); @@ -11809,15 +13197,6 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_12: { - state->error = 0x4; - state->reason = "Content-Length can't be present with chunked encoding"; - state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_error; - return s_error; - /* UNREACHABLE */; - abort(); - } s_n_llhttp__internal__n_pause_2: { state->error = 0x15; state->reason = "on_message_complete pause"; @@ -11987,8 +13366,8 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_update_finish_2: { - switch (llhttp__internal__c_update_finish_2(state, p, endp)) { + s_n_llhttp__internal__n_invoke_update_finish_3: { + switch (llhttp__internal__c_update_finish_3(state, p, endp)) { default: goto s_n_llhttp__internal__n_span_start_llhttp__on_body_2; } @@ -12100,22 +13479,10 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_3: { - switch (llhttp__internal__c_test_flags_3(state, p, endp)) { - case 1: - goto s_n_llhttp__internal__n_error_12; - default: - goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; - } - /* UNREACHABLE */; - abort(); - } - s_n_llhttp__internal__n_invoke_test_flags_2: { - switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_1: { + switch (llhttp__internal__c_test_lenient_flags_1(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_error_11; - case 1: - goto s_n_llhttp__internal__n_invoke_test_flags_3; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -12125,7 +13492,7 @@ static llparse_state_t llhttp__internal__run( 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_flags_2; + goto s_n_llhttp__internal__n_invoke_test_lenient_flags_1; default: goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete; } @@ -12142,7 +13509,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_14: { + s_n_llhttp__internal__n_error_13: { state->error = 0xb; state->reason = "Empty Content-Length"; state->error_pos = (const char*) p; @@ -12161,10 +13528,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_header_field_start; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; return s_error; } - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; /* UNREACHABLE */; abort(); } @@ -12227,7 +13594,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_load_header_state: { switch (llhttp__internal__c_load_header_state(state, p, endp)) { case 2: - goto s_n_llhttp__internal__n_error_14; + goto s_n_llhttp__internal__n_error_13; default: goto s_n_llhttp__internal__n_invoke_load_header_state_1; } @@ -12237,7 +13604,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_update_header_state_1: { switch (llhttp__internal__c_update_header_state(state, p, endp)) { default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); @@ -12269,7 +13636,7 @@ static llparse_state_t llhttp__internal__run( 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_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); @@ -12285,12 +13652,12 @@ static llparse_state_t llhttp__internal__run( case 8: goto s_n_llhttp__internal__n_invoke_or_flags_10; default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_value_complete; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_15: { + s_n_llhttp__internal__n_error_14: { state->error = 0x3; state->reason = "Missing expected LF after header value"; state->error_pos = (const char*) p; @@ -12352,7 +13719,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_16: { + s_n_llhttp__internal__n_error_15: { state->error = 0xa; state->reason = "Invalid header value char"; state->error_pos = (const char*) p; @@ -12361,12 +13728,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_4: { - switch (llhttp__internal__c_test_flags_2(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_lenient_flags_2: { + switch (llhttp__internal__c_test_lenient_flags_2(state, p, endp)) { case 1: goto s_n_llhttp__internal__n_header_value_lenient; default: - goto s_n_llhttp__internal__n_error_16; + goto s_n_llhttp__internal__n_error_15; } /* UNREACHABLE */; abort(); @@ -12469,10 +13836,10 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_18; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_17; return s_error; } - goto s_n_llhttp__internal__n_error_18; + goto s_n_llhttp__internal__n_error_17; /* UNREACHABLE */; abort(); } @@ -12504,14 +13871,14 @@ static llparse_state_t llhttp__internal__run( if (err != 0) { state->error = err; state->error_pos = (const char*) p; - state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_19; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_18; return s_error; } - goto s_n_llhttp__internal__n_error_19; + goto s_n_llhttp__internal__n_error_18; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_17: { + s_n_llhttp__internal__n_error_16: { state->error = 0x4; state->reason = "Duplicate Content-Length"; state->error_pos = (const char*) p; @@ -12520,12 +13887,12 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_test_flags_5: { - switch (llhttp__internal__c_test_flags_5(state, p, endp)) { + s_n_llhttp__internal__n_invoke_test_flags_2: { + switch (llhttp__internal__c_test_flags_2(state, p, endp)) { case 0: goto s_n_llhttp__internal__n_header_value_content_length; default: - goto s_n_llhttp__internal__n_error_17; + goto s_n_llhttp__internal__n_error_16; } /* UNREACHABLE */; abort(); @@ -12575,7 +13942,7 @@ static llparse_state_t llhttp__internal__run( case 1: goto s_n_llhttp__internal__n_header_value_connection; case 2: - goto s_n_llhttp__internal__n_invoke_test_flags_5; + goto s_n_llhttp__internal__n_invoke_test_flags_2; case 3: goto s_n_llhttp__internal__n_invoke_or_flags_16; case 4: @@ -12596,11 +13963,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_header_value_discard_ws; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_value_discard_ws; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; /* UNREACHABLE */; abort(); } @@ -12614,15 +13981,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_header_value_discard_ws; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_value_discard_ws; + goto s_n_llhttp__internal__n_invoke_llhttp__on_header_field_complete; /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_20: { + s_n_llhttp__internal__n_error_19: { state->error = 0xa; state->reason = "Invalid header token"; state->error_pos = (const char*) p; @@ -12655,10 +14022,18 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_llhttp__on_url_complete: { + switch (llhttp__on_url_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_header_field_start; + } + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_invoke_update_http_minor: { switch (llhttp__internal__c_update_http_minor(state, p, endp)) { default: - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_url_complete; } /* UNREACHABLE */; abort(); @@ -12688,7 +14063,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_21: { + s_n_llhttp__internal__n_error_20: { state->error = 0x7; state->reason = "Expected CRLF"; state->error_pos = (const char*) p; @@ -12714,6 +14089,24 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_error_23: { + state->error = 0x17; + state->reason = "Pause on PRI/Upgrade"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_24: { + state->error = 0x9; + state->reason = "Expected HTTP/2 Connection Preface"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } s_n_llhttp__internal__n_error_22: { state->error = 0x9; state->reason = "Expected CRLF after version"; @@ -12723,15 +14116,25 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } + s_n_llhttp__internal__n_invoke_load_method_1: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 34: + goto s_n_llhttp__internal__n_req_pri_upgrade; + default: + goto s_n_llhttp__internal__n_req_http_complete; + } + /* UNREACHABLE */; + abort(); + } 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_req_http_end; + goto s_n_llhttp__internal__n_invoke_load_method_1; } /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_23: { + s_n_llhttp__internal__n_error_25: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -12740,7 +14143,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_24: { + s_n_llhttp__internal__n_error_26: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -12757,7 +14160,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_25: { + s_n_llhttp__internal__n_error_27: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -12766,7 +14169,94 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_27: { + s_n_llhttp__internal__n_error_21: { + state->error = 0x8; + state->reason = "Invalid method for HTTP/x.x request"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_load_method: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 0: + goto s_n_llhttp__internal__n_req_http_major; + case 1: + goto s_n_llhttp__internal__n_req_http_major; + case 2: + goto s_n_llhttp__internal__n_req_http_major; + case 3: + goto s_n_llhttp__internal__n_req_http_major; + case 4: + goto s_n_llhttp__internal__n_req_http_major; + case 5: + goto s_n_llhttp__internal__n_req_http_major; + case 6: + goto s_n_llhttp__internal__n_req_http_major; + case 7: + goto s_n_llhttp__internal__n_req_http_major; + case 8: + goto s_n_llhttp__internal__n_req_http_major; + case 9: + goto s_n_llhttp__internal__n_req_http_major; + case 10: + goto s_n_llhttp__internal__n_req_http_major; + case 11: + goto s_n_llhttp__internal__n_req_http_major; + case 12: + goto s_n_llhttp__internal__n_req_http_major; + case 13: + goto s_n_llhttp__internal__n_req_http_major; + case 14: + goto s_n_llhttp__internal__n_req_http_major; + case 15: + goto s_n_llhttp__internal__n_req_http_major; + case 16: + goto s_n_llhttp__internal__n_req_http_major; + case 17: + goto s_n_llhttp__internal__n_req_http_major; + case 18: + goto s_n_llhttp__internal__n_req_http_major; + case 19: + goto s_n_llhttp__internal__n_req_http_major; + case 20: + goto s_n_llhttp__internal__n_req_http_major; + case 21: + goto s_n_llhttp__internal__n_req_http_major; + case 22: + goto s_n_llhttp__internal__n_req_http_major; + case 23: + goto s_n_llhttp__internal__n_req_http_major; + case 24: + goto s_n_llhttp__internal__n_req_http_major; + case 25: + goto s_n_llhttp__internal__n_req_http_major; + case 26: + goto s_n_llhttp__internal__n_req_http_major; + case 27: + goto s_n_llhttp__internal__n_req_http_major; + case 28: + goto s_n_llhttp__internal__n_req_http_major; + case 29: + goto s_n_llhttp__internal__n_req_http_major; + case 30: + goto s_n_llhttp__internal__n_req_http_major; + case 31: + goto s_n_llhttp__internal__n_req_http_major; + case 32: + goto s_n_llhttp__internal__n_req_http_major; + case 33: + goto s_n_llhttp__internal__n_req_http_major; + case 34: + goto s_n_llhttp__internal__n_req_http_major; + default: + goto s_n_llhttp__internal__n_error_21; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_30: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -12775,7 +14265,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_26: { + s_n_llhttp__internal__n_error_28: { state->error = 0x8; state->reason = "Expected SOURCE method for ICE/x.x request"; state->error_pos = (const char*) p; @@ -12784,12 +14274,65 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_invoke_is_equal_method_1: { - switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) { - case 0: - goto s_n_llhttp__internal__n_error_26; + s_n_llhttp__internal__n_invoke_load_method_2: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 33: + goto s_n_llhttp__internal__n_req_http_major; default: + goto s_n_llhttp__internal__n_error_28; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_error_29: { + state->error = 0x8; + state->reason = "Invalid method for RTSP/x.x request"; + state->error_pos = (const char*) p; + state->_current = (void*) (intptr_t) s_error; + return s_error; + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_load_method_3: { + switch (llhttp__internal__c_load_method(state, p, endp)) { + case 1: + goto s_n_llhttp__internal__n_req_http_major; + case 3: + goto s_n_llhttp__internal__n_req_http_major; + case 6: + goto s_n_llhttp__internal__n_req_http_major; + case 35: + goto s_n_llhttp__internal__n_req_http_major; + case 36: + goto s_n_llhttp__internal__n_req_http_major; + case 37: + goto s_n_llhttp__internal__n_req_http_major; + case 38: + goto s_n_llhttp__internal__n_req_http_major; + case 39: + goto s_n_llhttp__internal__n_req_http_major; + case 40: + goto s_n_llhttp__internal__n_req_http_major; + case 41: goto s_n_llhttp__internal__n_req_http_major; + case 42: + goto s_n_llhttp__internal__n_req_http_major; + case 43: + goto s_n_llhttp__internal__n_req_http_major; + case 44: + goto s_n_llhttp__internal__n_req_http_major; + case 45: + goto s_n_llhttp__internal__n_req_http_major; + default: + goto s_n_llhttp__internal__n_error_29; + } + /* UNREACHABLE */; + abort(); + } + s_n_llhttp__internal__n_invoke_llhttp__on_url_complete_1: { + switch (llhttp__on_url_complete(state, p, endp)) { + default: + goto s_n_llhttp__internal__n_req_http_start; } /* UNREACHABLE */; abort(); @@ -12862,7 +14405,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_28: { + s_n_llhttp__internal__n_error_31: { state->error = 0x7; state->reason = "Invalid char in url fragment start"; state->error_pos = (const char*) p; @@ -12922,7 +14465,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_29: { + s_n_llhttp__internal__n_error_32: { state->error = 0x7; state->reason = "Invalid char in url query"; state->error_pos = (const char*) p; @@ -12931,7 +14474,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_30: { + s_n_llhttp__internal__n_error_33: { state->error = 0x7; state->reason = "Invalid char in url path"; state->error_pos = (const char*) p; @@ -13042,7 +14585,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_31: { + s_n_llhttp__internal__n_error_34: { state->error = 0x7; state->reason = "Double @ in url"; state->error_pos = (const char*) p; @@ -13051,7 +14594,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_32: { + s_n_llhttp__internal__n_error_35: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13060,7 +14603,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_33: { + s_n_llhttp__internal__n_error_36: { state->error = 0x7; state->reason = "Unexpected char in url server"; state->error_pos = (const char*) p; @@ -13069,7 +14612,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_35: { + s_n_llhttp__internal__n_error_38: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13078,7 +14621,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_36: { + s_n_llhttp__internal__n_error_39: { state->error = 0x7; state->reason = "Unexpected char in url schema"; state->error_pos = (const char*) p; @@ -13087,7 +14630,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_37: { + s_n_llhttp__internal__n_error_40: { state->error = 0x7; state->reason = "Unexpected start char in url"; state->error_pos = (const char*) p; @@ -13106,7 +14649,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_38: { + s_n_llhttp__internal__n_error_41: { state->error = 0x6; state->reason = "Expected space after method"; state->error_pos = (const char*) p; @@ -13123,7 +14666,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_46: { + s_n_llhttp__internal__n_error_49: { state->error = 0x6; state->reason = "Invalid method encountered"; state->error_pos = (const char*) p; @@ -13132,7 +14675,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_39: { + s_n_llhttp__internal__n_error_42: { state->error = 0xd; state->reason = "Response overflow"; state->error_pos = (const char*) p; @@ -13144,7 +14687,7 @@ static llparse_state_t llhttp__internal__run( s_n_llhttp__internal__n_invoke_mul_add_status_code: { switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) { case 1: - goto s_n_llhttp__internal__n_error_39; + goto s_n_llhttp__internal__n_error_42; default: goto s_n_llhttp__internal__n_res_status_code; } @@ -13161,11 +14704,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_header_field_start; + state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; return s_error; } p++; - goto s_n_llhttp__internal__n_header_field_start; + goto s_n_llhttp__internal__n_invoke_llhttp__on_status_complete; /* UNREACHABLE */; abort(); } @@ -13187,7 +14730,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_40: { + s_n_llhttp__internal__n_error_43: { state->error = 0xd; state->reason = "Invalid response status"; state->error_pos = (const char*) p; @@ -13204,7 +14747,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_41: { + s_n_llhttp__internal__n_error_44: { state->error = 0x9; state->reason = "Expected space after version"; state->error_pos = (const char*) p; @@ -13221,7 +14764,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_42: { + s_n_llhttp__internal__n_error_45: { state->error = 0x9; state->reason = "Invalid minor version"; state->error_pos = (const char*) p; @@ -13230,7 +14773,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_43: { + s_n_llhttp__internal__n_error_46: { state->error = 0x9; state->reason = "Expected dot"; state->error_pos = (const char*) p; @@ -13247,7 +14790,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_44: { + s_n_llhttp__internal__n_error_47: { state->error = 0x9; state->reason = "Invalid major version"; state->error_pos = (const char*) p; @@ -13256,7 +14799,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_47: { + s_n_llhttp__internal__n_error_50: { state->error = 0x8; state->reason = "Expected HTTP/"; state->error_pos = (const char*) p; @@ -13281,7 +14824,7 @@ static llparse_state_t llhttp__internal__run( /* UNREACHABLE */; abort(); } - s_n_llhttp__internal__n_error_45: { + s_n_llhttp__internal__n_error_48: { state->error = 0x8; state->reason = "Invalid word encountered"; state->error_pos = (const char*) p; diff --git a/lib/_http_client.js b/lib/_http_client.js index cbd5817d67ba6b..4184191c0fbabc 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -84,6 +84,9 @@ let debug = require('internal/util/debuglog').debuglog('http', (fn) => { const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; const kError = Symbol('kError'); +const kLenientAll = HTTPParser.kLenientAll | 0; +const kLenientNone = HTTPParser.kLenientNone | 0; + function validateHost(host, name) { if (host !== null && host !== undefined && typeof host !== 'string') { throw new ERR_INVALID_ARG_TYPE(`options.${name}`, @@ -717,11 +720,12 @@ function emitFreeNT(req) { function tickOnSocket(req, socket) { const parser = parsers.alloc(); req.socket = socket; + const lenient = req.insecureHTTPParser === undefined ? + isLenient() : req.insecureHTTPParser; parser.initialize(HTTPParser.RESPONSE, new HTTPClientAsyncResource('HTTPINCOMINGMESSAGE', req), req.maxHeaderSize || 0, - req.insecureHTTPParser === undefined ? - isLenient() : req.insecureHTTPParser, + lenient ? kLenientAll : kLenientNone, 0); parser.socket = socket; parser.outgoing = req; diff --git a/lib/_http_server.js b/lib/_http_server.js index aa457687593a54..8ada9e8cfe987a 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -174,6 +174,8 @@ const STATUS_CODES = { const kOnMessageBegin = HTTPParser.kOnMessageBegin | 0; const kOnExecute = HTTPParser.kOnExecute | 0; const kOnTimeout = HTTPParser.kOnTimeout | 0; +const kLenientAll = HTTPParser.kLenientAll | 0; +const kLenientNone = HTTPParser.kLenientNone | 0; class HTTPServerAsyncResource { constructor(type, socket) { @@ -456,6 +458,9 @@ function connectionListenerInternal(server, socket) { const parser = parsers.alloc(); + const lenient = server.insecureHTTPParser === undefined ? + isLenient() : server.insecureHTTPParser; + // TODO(addaleax): This doesn't play well with the // `async_hooks.currentResource()` proposal, see // https://github.com/nodejs/node/pull/21313 @@ -463,8 +468,7 @@ function connectionListenerInternal(server, socket) { HTTPParser.REQUEST, new HTTPServerAsyncResource('HTTPINCOMINGMESSAGE', socket), server.maxHeaderSize || 0, - server.insecureHTTPParser === undefined ? - isLenient() : server.insecureHTTPParser, + lenient ? kLenientAll : kLenientNone, server.headersTimeout || 0, ); parser.socket = socket; @@ -727,6 +731,9 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) { // Got CONNECT method, but have no handler. socket.destroy(); } + } else if (parser.incoming && parser.incoming.method === 'PRI') { + debug('SERVER got PRI request'); + socket.destroy(); } else { // When receiving new requests on the same socket (pipelining or keep alive) // make sure the requestTimeout is active. diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index dfe0273d06f0e3..b2160512c72839 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -79,6 +79,13 @@ const uint32_t kOnTimeout = 6; // Any more fields than this will be flushed into JS const size_t kMaxHeaderFieldsCount = 32; +const uint32_t kLenientNone = 0; +const uint32_t kLenientHeaders = 1 << 0; +const uint32_t kLenientChunkedLength = 1 << 1; +const uint32_t kLenientKeepAlive = 1 << 2; +const uint32_t kLenientAll = kLenientHeaders | kLenientChunkedLength | + kLenientKeepAlive; + inline bool IsOWS(char c) { return c == ' ' || c == '\t'; } @@ -539,10 +546,10 @@ class Parser : public AsyncWrap, public StreamListener { static void Initialize(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - bool lenient = args[3]->IsTrue(); uint64_t max_http_header_size = 0; uint64_t headers_timeout = 0; + uint32_t lenient_flags = kLenientNone; CHECK(args[0]->IsInt32()); CHECK(args[1]->IsObject()); @@ -556,6 +563,11 @@ class Parser : public AsyncWrap, public StreamListener { max_http_header_size = env->options()->max_http_header_size; } + if (args.Length() > 3) { + CHECK(args[3]->IsInt32()); + lenient_flags = args[3].As()->Value(); + } + if (args.Length() > 4) { CHECK(args[4]->IsInt32()); headers_timeout = args[4].As()->Value(); @@ -577,7 +589,7 @@ class Parser : public AsyncWrap, public StreamListener { parser->set_provider_type(provider); parser->AsyncReset(args[1].As()); - parser->Init(type, max_http_header_size, lenient, headers_timeout); + parser->Init(type, max_http_header_size, lenient_flags, headers_timeout); } template @@ -844,9 +856,19 @@ class Parser : public AsyncWrap, public StreamListener { void Init(llhttp_type_t type, uint64_t max_http_header_size, - bool lenient, uint64_t headers_timeout) { + uint32_t lenient_flags, uint64_t headers_timeout) { llhttp_init(&parser_, type, &settings); - llhttp_set_lenient(&parser_, lenient); + + if (lenient_flags & kLenientHeaders) { + llhttp_set_lenient_headers(&parser_, 1); + } + if (lenient_flags & kLenientChunkedLength) { + llhttp_set_lenient_chunked_length(&parser_, 1); + } + if (lenient_flags & kLenientKeepAlive) { + llhttp_set_lenient_keep_alive(&parser_, 1); + } + header_nread_ = 0; url_.Reset(); status_message_.Reset(); @@ -944,6 +966,15 @@ const llhttp_settings_t Parser::settings = { Proxy::Raw, Proxy::Raw, Proxy::Raw, + + // on_url_complete + nullptr, + // on_status_complete + nullptr, + // on_header_field_complete + nullptr, + // on_header_value_complete + nullptr, }; @@ -978,6 +1009,17 @@ void InitializeHttpParser(Local target, t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kOnTimeout"), Integer::NewFromUnsigned(env->isolate(), kOnTimeout)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kLenientNone"), + Integer::NewFromUnsigned(env->isolate(), kLenientNone)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kLenientHeaders"), + Integer::NewFromUnsigned(env->isolate(), kLenientHeaders)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kLenientChunkedLength"), + Integer::NewFromUnsigned(env->isolate(), kLenientChunkedLength)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kLenientKeepAlive"), + Integer::NewFromUnsigned(env->isolate(), kLenientKeepAlive)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kLenientAll"), + Integer::NewFromUnsigned(env->isolate(), kLenientAll)); + Local methods = Array::New(env->isolate()); #define V(num, name, string) \ methods->Set(env->context(), \ diff --git a/test/parallel/test-http-methods.js b/test/parallel/test-http-methods.js index 5bea399a447254..606126fe74d389 100644 --- a/test/parallel/test-http-methods.js +++ b/test/parallel/test-http-methods.js @@ -28,41 +28,52 @@ const http = require('http'); // to http library const methods = [ + 'ACL', + 'ANNOUNCE', + 'BIND', + 'CHECKOUT', + 'CONNECT', + 'COPY', 'DELETE', + 'DESCRIBE', + 'FLUSH', 'GET', + 'GET_PARAMETER', 'HEAD', - 'POST', - 'PUT', - 'CONNECT', - 'OPTIONS', - 'TRACE', - 'COPY', + 'LINK', 'LOCK', + 'M-SEARCH', + 'MERGE', + 'MKACTIVITY', + 'MKCALENDAR', 'MKCOL', 'MOVE', + 'NOTIFY', + 'OPTIONS', + 'PATCH', + 'PAUSE', + 'PLAY', + 'POST', 'PRI', 'PROPFIND', 'PROPPATCH', - 'SEARCH', - 'UNLOCK', - 'BIND', + 'PURGE', + 'PUT', 'REBIND', - 'UNBIND', - 'ACL', + 'RECORD', + 'REDIRECT', 'REPORT', - 'MKACTIVITY', - 'CHECKOUT', - 'MERGE', - 'M-SEARCH', - 'NOTIFY', + 'SEARCH', + 'SETUP', + 'SET_PARAMETER', + 'SOURCE', 'SUBSCRIBE', - 'UNSUBSCRIBE', - 'PATCH', - 'PURGE', - 'MKCALENDAR', - 'LINK', + 'TEARDOWN', + 'TRACE', + 'UNBIND', 'UNLINK', - 'SOURCE', + 'UNLOCK', + 'UNSUBSCRIBE', ]; assert.deepStrictEqual(http.METHODS, methods.sort()); diff --git a/test/parallel/test-http-parser-timeout-reset.js b/test/parallel/test-http-parser-timeout-reset.js index 1ba72d865f73fb..ffc3d81c381b7b 100644 --- a/test/parallel/test-http-parser-timeout-reset.js +++ b/test/parallel/test-http-parser-timeout-reset.js @@ -26,7 +26,7 @@ const server = net.createServer((socket) => { HTTPParser.RESPONSE, {}, 0, - false, + 0, 1e3 ); diff --git a/test/parallel/test-http-pipeline-assertionerror-finish.js b/test/parallel/test-http-pipeline-assertionerror-finish.js index 2780d4bdf676ad..c82161bf00e28c 100644 --- a/test/parallel/test-http-pipeline-assertionerror-finish.js +++ b/test/parallel/test-http-pipeline-assertionerror-finish.js @@ -27,7 +27,7 @@ const server = http .listen(0, function() { const s = net.connect(this.address().port); - const big = 'GET / HTTP/1.0\r\n\r\n'.repeat(COUNT); + const big = 'GET / HTTP/1.1\r\n\r\n'.repeat(COUNT); s.write(big); s.resume(); diff --git a/test/parallel/test-http-server-destroy-socket-on-client-error.js b/test/parallel/test-http-server-destroy-socket-on-client-error.js index da5c532d9e35c2..3cd38a4a7ec9d2 100644 --- a/test/parallel/test-http-server-destroy-socket-on-client-error.js +++ b/test/parallel/test-http-server-destroy-socket-on-client-error.js @@ -16,7 +16,7 @@ server.on('connection', mustCall((socket) => { name: 'Error', message: 'Parse Error: Invalid method encountered', code: 'HPE_INVALID_METHOD', - bytesParsed: 0, + bytesParsed: 1, rawPacket: Buffer.from('FOO /\r\n') })); })); diff --git a/test/parallel/test-http2-client-http1-server.js b/test/parallel/test-http2-client-http1-server.js index a6052bff8412e7..e6680ee14bdf50 100644 --- a/test/parallel/test-http2-client-http1-server.js +++ b/test/parallel/test-http2-client-http1-server.js @@ -11,12 +11,15 @@ const http2 = require('http2'); const { NghttpError } = require('internal/http2/util'); // Creating an http1 server here... -// NOTE: PRI method is supported by our HTTP parser - thus the response handling -// function must be called once before error. -const server = http.createServer(common.mustCall((req, res) => { - assert.strictEqual(req.method, 'PRI'); - res.end(); -})); +const server = http.createServer(common.mustNotCall(() => {})) + .on('clientError', common.mustCall((error, socket) => { + assert.strictEqual(error.code, 'HPE_PAUSED_H2_UPGRADE'); + assert.strictEqual(error.bytesParsed, 24); + socket.write('HTTP/1.1 400 No H2 support\r\n\r\n'); + + // Don't give client a chance to send a preamble. + socket.destroy(); + })); server.listen(0, common.mustCall(() => { const client = http2.connect(`http://localhost:${server.address().port}`);