From a2dce2ae9c9c80db1831fe243097fb1cb3fb936b Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Tue, 25 Jun 2019 22:39:40 +0000 Subject: [PATCH] [router] Add scope key builder impl and tests. (#7234) Add scope key builder implementation + unit tests. Risk Level: LOW (not fully implemented) Testing: Unit test Docs Changes: comment of hcm proto updated. Signed-off-by: Xin Zhuang Mirrored from https://github.com/envoyproxy/envoy @ d09ce412f96eb6c7a689ed66927879b5983a27d4 --- .../v2/http_connection_manager.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto index 4cee964e..f0c7b0f5 100644 --- a/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto +++ b/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto @@ -490,6 +490,10 @@ message ScopedRoutes { // Specifies a header field's key value pair to match on. message KvElement { // The separator between key and value (e.g., '=' separates 'k=v;...'). + // If an element is an empty string, the element is ignored. + // If an element contains no separator, the whole element is parsed as key and the + // fragment value is an empty string. + // If there are multiple values for a matched key, the first value is returned. string separator = 1 [(validate.rules).string.min_bytes = 1]; // The key to match on. @@ -498,6 +502,8 @@ message ScopedRoutes { oneof extract_type { // Specifies the zero based index of the element to extract. + // Note Envoy concatenates multiple values of the same header key into a comma separated + // string, the splitting always happens after the concatenation. uint32 index = 3; // Specifies the key value pair to extract the value from.