diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 0b871192ffb8..a61063095cd4 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -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( diff --git a/source/common/http/http1/parser_impl.cc b/source/common/http/http1/parser_impl.cc index 0ec747669189..f9c567c0bac0 100644 --- a/source/common/http/http1/parser_impl.cc +++ b/source/common/http/http1/parser_impl.cc @@ -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_); }