envoyproxy / envoyproxy/envoy

error default value of header append for ext_proc/ext_authz

Open
#22,845 11 comments 0 reactions 1 assignee Claimed by @wbpcode View on GitHub
area/ext_authz area/ext_proc no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

The default value of `append` of `HeaderValueOption` should be true according to the API.

```
// Should the value be appended? If true (default), the value is appended to
// existing values. Otherwise it replaces any existing values.
// This field is deprecated and please use
// :ref:`append_action ` as replacement.
google.protobuf.BoolValue append = 2;
```

However, both the ext_authz & ext_proc use false as the default value of `append`.

Snippet of ext_proc:
```
const bool append = PROTOBUF_GET_WRAPPED_OR_DEFAULT(sh, append, false);
```

Snippet of ext_authz:
```
if (header.append().value()) {
authz_response->response_headers_to_add.emplace_back(
Http::LowerCaseString(header.header().key()), header.header().value());
} else {
authz_response->response_headers_to_set.emplace_back(
Http::LowerCaseString(header.header().key()), header.header().value());
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.