deps: update llhttp to 1.1.1
PR-URL: https://github.com/nodejs/node/pull/25753 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
02601c247d
commit
8855d1df72
10
deps/llhttp/include/llhttp.h
vendored
10
deps/llhttp/include/llhttp.h
vendored
@ -2,7 +2,7 @@
|
|||||||
#define INCLUDE_LLHTTP_H_
|
#define INCLUDE_LLHTTP_H_
|
||||||
|
|
||||||
#define LLHTTP_VERSION_MAJOR 1
|
#define LLHTTP_VERSION_MAJOR 1
|
||||||
#define LLHTTP_VERSION_MINOR 0
|
#define LLHTTP_VERSION_MINOR 1
|
||||||
#define LLHTTP_VERSION_PATCH 1
|
#define LLHTTP_VERSION_PATCH 1
|
||||||
|
|
||||||
#ifndef INCLUDE_LLHTTP_ITSELF_H_
|
#ifndef INCLUDE_LLHTTP_ITSELF_H_
|
||||||
@ -215,6 +215,7 @@ typedef enum llhttp_method llhttp_method_t;
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
typedef llhttp__internal_t llhttp_t;
|
typedef llhttp__internal_t llhttp_t;
|
||||||
typedef struct llhttp_settings_s llhttp_settings_t;
|
typedef struct llhttp_settings_s llhttp_settings_t;
|
||||||
@ -273,6 +274,10 @@ void llhttp_settings_init(llhttp_settings_t* settings);
|
|||||||
* In a special case of CONNECT/Upgrade request/response `HPE_PAUSED_UPGRADE`
|
* In a special case of CONNECT/Upgrade request/response `HPE_PAUSED_UPGRADE`
|
||||||
* is returned after fully parsing the request/response. If the user wishes to
|
* is returned after fully parsing the request/response. If the user wishes to
|
||||||
* continue parsing, they need to invoke `llhttp_resume_after_upgrade()`.
|
* continue parsing, they need to invoke `llhttp_resume_after_upgrade()`.
|
||||||
|
*
|
||||||
|
* NOTE: if this function ever returns a non-pause type error, it will continue
|
||||||
|
* to return the same error upon each successive call up until `llhttp_init()`
|
||||||
|
* call.
|
||||||
*/
|
*/
|
||||||
llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len);
|
llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len);
|
||||||
|
|
||||||
@ -345,6 +350,9 @@ const char* llhttp_get_error_pos(const llhttp_t* parser);
|
|||||||
/* Returns textual name of error code */
|
/* Returns textual name of error code */
|
||||||
const char* llhttp_errno_name(llhttp_errno_t err);
|
const char* llhttp_errno_name(llhttp_errno_t err);
|
||||||
|
|
||||||
|
/* Returns textual name of HTTP method */
|
||||||
|
const char* llhttp_method_name(llhttp_method_t method);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
10
deps/llhttp/src/api.c
vendored
10
deps/llhttp/src/api.c
vendored
@ -117,6 +117,16 @@ const char* llhttp_errno_name(llhttp_errno_t err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* llhttp_method_name(llhttp_method_t method) {
|
||||||
|
#define HTTP_METHOD_GEN(NUM, NAME, STRING) case HTTP_##NAME: return #STRING;
|
||||||
|
switch (method) {
|
||||||
|
HTTP_METHOD_MAP(HTTP_METHOD_GEN)
|
||||||
|
default: abort();
|
||||||
|
}
|
||||||
|
#undef HTTP_METHOD_GEN
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user