Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update llhttp to 1.1.1 #25753

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion deps/llhttp/include/llhttp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define INCLUDE_LLHTTP_H_

#define LLHTTP_VERSION_MAJOR 1
#define LLHTTP_VERSION_MINOR 0
#define LLHTTP_VERSION_MINOR 1
#define LLHTTP_VERSION_PATCH 1

#ifndef INCLUDE_LLHTTP_ITSELF_H_
Expand Down Expand Up @@ -215,6 +215,7 @@ typedef enum llhttp_method llhttp_method_t;
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>

typedef llhttp__internal_t llhttp_t;
typedef struct llhttp_settings_s llhttp_settings_t;
Expand Down Expand Up @@ -273,6 +274,10 @@ void llhttp_settings_init(llhttp_settings_t* settings);
* 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
* 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"call" -> "is called"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! This could be fixed in the next release. Would you be interested in submitting a PR: https://github.com/nodejs/llhttp/blob/master/src/native/api.h#L68 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@indutny I tried to submit a quick grammar fix through the GitHub UI and accidentally committed it directly (I thought it was still under your account, not the Node.js one): nodejs/llhttp@4ed1a54

Happy to back it out if it's a problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem 😂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

*/
llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len);

Expand Down Expand Up @@ -345,6 +350,9 @@ const char* llhttp_get_error_pos(const llhttp_t* parser);
/* Returns textual name of error code */
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
} /* extern "C" */
#endif
Expand Down
10 changes: 10 additions & 0 deletions deps/llhttp/src/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */


Expand Down