Skip to content
Merged
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions source/extensions/filters/http/ext_authz/ext_authz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ Http::FilterHeadersStatus Filter::encode100ContinueHeaders(Http::ResponseHeaderM

Http::FilterHeadersStatus Filter::encodeHeaders(Http::ResponseHeaderMap& headers, bool) {
ENVOY_STREAM_LOG(trace,
"ext_authz filter has {} response header(s) to add and {} response header(s) to "
"set to the encoded response:",
"ext_authz filter has {} response header(s) to add",
*encoder_callbacks_, response_headers_to_add_.size());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May be we can just add response_headers_to_set_.size().

ENVOY_STREAM_LOG(trace,
                 "ext_authz filter has {} response header(s) to add and {} response header(s) to "
                 "set to the encoded response:", 
                 *encoder_callbacks_, response_headers_to_add_.size(), response_headers_to_set_.size());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 to adding the missing argument.

@dyfrgi dyfrgi Oct 8, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, good call. Done.

EDIT: Oh and confirmed that the log line does now appear when running ext_authz_test.
[2021-10-07 15:33:39.952][12][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:162] [C0][S0] ext_authz filter has 1 response header(s) to add and 1 response header(s) to set to the encoded response:

if (!response_headers_to_add_.empty()) {
ENVOY_STREAM_LOG(
Expand Down