diff --git a/WORKSPACE b/WORKSPACE index 4d1dc388e04..c6a795745f0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -38,7 +38,7 @@ git_repository( ) # When updating envoy sha manually please update the sha in istio.deps file also -ENVOY_SHA = "d55f4990889da5d6874ab70ec5f4e5e0a9053160" +ENVOY_SHA = "d338e45e31be628f19c895003d0aeee6be18d32f" http_archive( name = "envoy", diff --git a/istio.deps b/istio.deps index 333616a7fcb..0a62a53ff55 100644 --- a/istio.deps +++ b/istio.deps @@ -13,6 +13,6 @@ "repoName": "envoyproxy/envoy", "prodBranch": "master", "file": "WORKSPACE", - "lastStableSHA": "d55f4990889da5d6874ab70ec5f4e5e0a9053160" + "lastStableSHA": "d338e45e31be628f19c895003d0aeee6be18d32f" } ] \ No newline at end of file diff --git a/src/envoy/http/authn/filter_context.h b/src/envoy/http/authn/filter_context.h index 39a3c79b763..7907479d55f 100644 --- a/src/envoy/http/authn/filter_context.h +++ b/src/envoy/http/authn/filter_context.h @@ -18,6 +18,8 @@ #include "authentication/v1alpha1/policy.pb.h" #include "common/common/logger.h" #include "envoy/config/filter/http/authn/v2alpha1/config.pb.h" +#include "envoy/http/header_map.h" +#include "envoy/network/connection.h" #include "src/istio/authn/context.pb.h" namespace Envoy { diff --git a/src/envoy/http/jwt_auth/token_extractor.h b/src/envoy/http/jwt_auth/token_extractor.h index da8a74ad459..4efd808afa4 100644 --- a/src/envoy/http/jwt_auth/token_extractor.h +++ b/src/envoy/http/jwt_auth/token_extractor.h @@ -17,6 +17,7 @@ #include "common/common/logger.h" #include "envoy/config/filter/http/jwt_authn/v2alpha/config.pb.h" +#include "envoy/http/header_map.h" namespace Envoy { namespace Http { diff --git a/src/envoy/http/mixer/filter.cc b/src/envoy/http/mixer/filter.cc index a2c67664143..2c186bdd9c5 100644 --- a/src/envoy/http/mixer/filter.cc +++ b/src/envoy/http/mixer/filter.cc @@ -211,6 +211,7 @@ void Filter::onDestroy() { void Filter::log(const HeaderMap* request_headers, const HeaderMap* response_headers, + const HeaderMap* response_trailers, const RequestInfo::RequestInfo& request_info) { ENVOY_LOG(debug, "Called Mixer::Filter : {}", __func__); if (!handler_) { @@ -227,7 +228,8 @@ void Filter::log(const HeaderMap* request_headers, handler_->ExtractRequestAttributes(&check_data); } // response trailer header is not counted to response total size. - ReportData report_data(response_headers, request_info, request_total_size_); + ReportData report_data(response_headers, response_trailers, request_info, + request_total_size_); handler_->Report(&report_data); } diff --git a/src/envoy/http/mixer/filter.h b/src/envoy/http/mixer/filter.h index 9b38bb54ccc..6c31add3993 100644 --- a/src/envoy/http/mixer/filter.h +++ b/src/envoy/http/mixer/filter.h @@ -55,6 +55,7 @@ class Filter : public Http::StreamDecoderFilter, // Called when the request is completed. virtual void log(const HeaderMap* request_headers, const HeaderMap* response_headers, + const HeaderMap* response_trailers, const RequestInfo::RequestInfo& request_info) override; private: diff --git a/src/envoy/http/mixer/report_data.h b/src/envoy/http/mixer/report_data.h index 7cd16e5c317..46658b60b5f 100644 --- a/src/envoy/http/mixer/report_data.h +++ b/src/envoy/http/mixer/report_data.h @@ -36,8 +36,8 @@ class ReportData : public ::istio::control::http::ReportData { uint64_t request_total_size_; public: - ReportData(const HeaderMap *headers, const RequestInfo::RequestInfo &info, - uint64_t request_total_size) + ReportData(const HeaderMap *headers, const HeaderMap *response_trailers, + const RequestInfo::RequestInfo &info, uint64_t request_total_size) : headers_(headers), info_(info), response_total_size_(info.bytesSent()), @@ -45,6 +45,9 @@ class ReportData : public ::istio::control::http::ReportData { if (headers != nullptr) { response_total_size_ += headers->byteSize(); } + if (response_trailers != nullptr) { + response_total_size_ += response_trailers->byteSize(); + } } std::map GetResponseHeaders() const override {