envoyproxy / envoyproxy/envoy

User defined header interpolation inconsistent around empty values

Đang mở
#3,971 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/docs help wanted
Ngôn ngữ chính
C++
Star
28.9k
Fork
5.6k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
430

Mô tả

*Title*: User defined header interpolation inconsistent around empty values

*Description*:
Envoy's mechanism for configuration specified user-defined headers (https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/headers#config-http-conn-man-headers-custom-request-headers) is inconsistent in the case of variables that may or may not have a value. This is specifically an issue when using the %UPSTREAM_METADATA(["namespace", "key"])% variable interpolation. If a header is defined as *only* composed of that value, and the value does not exist, the header is not output. However, if the header is a compound header (e.g. "prefix-%UPSTREAM_METADATA(["namespace", "key"])%-suffix") then the header is output regardless of whether or not the variable interpolation returns any text.

*Relevant Links*:

Source link to not outputting the header if the value interpolated is empty: https://github.com/envoyproxy/envoy/blob/master/source/common/router/header_parser.cc#L240

Source link to combination of headers which may have null values: https://github.com/envoyproxy/envoy/blob/master/source/common/router/header_formatter.h#L80

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.