Skip to content

Commit

Permalink
bump llhttp
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <[email protected]>
  • Loading branch information
asraa committed Apr 5, 2021
1 parent d458ac4 commit 591811f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "llhttp",
project_desc = "Parser for HTTP messages written in C",
project_url = "https://github.com/nodejs/llhttp",
version = "4.0.0",
sha256 = "0b83fd2db4300e85b3a73763b4c2599998089722c2ab8507383e02517b274cb7",
version = "5.0.0",
sha256 = "1c575cf37c748fd0d67fd8ff9761c71ef28e7c1c3dc336c4e8a7f9787b34e470",
strip_prefix = "llhttp-release-v{version}",
urls = ["https://github.com/nodejs/llhttp/archive/release/v{version}.tar.gz"],
use_category = ["dataplane_core"],
release_date = "2021-02-16",
release_date = "2021-04-03",
cpe = "N/A",
),
com_github_tencent_rapidjson = dict(
Expand Down
14 changes: 7 additions & 7 deletions source/common/http/http1/parser_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@ class HttpParserImpl::Impl {
}

RcVal execute(const char* slice, int len) {
llhttp_errno_t err;
llhttp_errno_t error;
if (slice == nullptr || len == 0) {
err = llhttp_finish(&parser_);
error = llhttp_finish(&parser_);
} else {
err = llhttp_execute(&parser_, slice, len);
error = llhttp_execute(&parser_, slice, len);
}
size_t nread = len;
// Adjust number of bytes read in case of error.
if (err != HPE_OK) {
if (error != HPE_OK) {
nread = llhttp_get_error_pos(&parser_) - slice;
// Resume after upgrade.
if (err == HPE_PAUSED_UPGRADE) {
err = HPE_OK;
if (error == HPE_PAUSED_UPGRADE) {
error = HPE_OK;
llhttp_resume_after_upgrade(&parser_);
}
}
return {nread, err};
return {nread, error};
}

void resume() { llhttp_resume(&parser_); }
Expand Down

0 comments on commit 591811f

Please sign in to comment.