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

Update ffi to llhttp 6.0.5 #23

Merged
merged 1 commit into from
Sep 9, 2021
Merged
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: 8 additions & 2 deletions ffi/ext/llhttp/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,23 @@ 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_headers_complete(llhttp_t * p, int status_code,
uint8_t upgrade, int should_keep_alive);
extern int wasm_on_body(llhttp_t* p, const char* at, size_t length);
extern int wasm_on_message_complete(llhttp_t * p);

static int wasm_on_headers_complete_wrap(llhttp_t* p) {
return wasm_on_headers_complete(p, p->status_code, p->upgrade,
llhttp_should_keep_alive(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_headers_complete_wrap,
wasm_on_body,
wasm_on_message_complete,
NULL,
Expand Down
8 changes: 4 additions & 4 deletions ffi/ext/llhttp/llhttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ static llparse_state_t llhttp__internal__run(
case s_n_llhttp__internal__n_consume_content_length:
s_n_llhttp__internal__n_consume_content_length: {
size_t avail;
size_t need;
uint64_t need;

avail = endp - p;
need = state->content_length;
Expand Down Expand Up @@ -1481,7 +1481,7 @@ static llparse_state_t llhttp__internal__run(
case s_n_llhttp__internal__n_consume_content_length_1:
s_n_llhttp__internal__n_consume_content_length_1: {
size_t avail;
size_t need;
uint64_t need;

avail = endp - p;
need = state->content_length;
Expand Down Expand Up @@ -8700,7 +8700,7 @@ static llparse_state_t llhttp__internal__run(
case s_n_llhttp__internal__n_consume_content_length:
s_n_llhttp__internal__n_consume_content_length: {
size_t avail;
size_t need;
uint64_t need;

avail = endp - p;
need = state->content_length;
Expand Down Expand Up @@ -9048,7 +9048,7 @@ static llparse_state_t llhttp__internal__run(
case s_n_llhttp__internal__n_consume_content_length_1:
s_n_llhttp__internal__n_consume_content_length_1: {
size_t avail;
size_t need;
uint64_t need;

avail = endp - p;
need = state->content_length;
Expand Down
2 changes: 1 addition & 1 deletion ffi/ext/llhttp/llhttp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#define LLHTTP_VERSION_MAJOR 6
#define LLHTTP_VERSION_MINOR 0
#define LLHTTP_VERSION_PATCH 1
#define LLHTTP_VERSION_PATCH 5

#ifndef LLHTTP_STRICT_MODE
# define LLHTTP_STRICT_MODE 0
Expand Down