From 23a73eb929a13cddbd7d1cc01ce5a3039f616954 Mon Sep 17 00:00:00 2001 From: Harry Bagdi Date: Thu, 12 Aug 2021 15:41:46 -0700 Subject: [PATCH] document multi-value headers as undefined For #213 --- apis/v1alpha2/httproute_types.go | 10 ++++++++-- .../bases/gateway.networking.k8s.io_httproutes.yaml | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apis/v1alpha2/httproute_types.go b/apis/v1alpha2/httproute_types.go index c533f16441..0cd65e6924 100644 --- a/apis/v1alpha2/httproute_types.go +++ b/apis/v1alpha2/httproute_types.go @@ -343,12 +343,18 @@ type HTTPHeaderMatch struct { // Name is the name of the HTTP Header to be matched. Name matching MUST be // case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). // - // If multiple entries specify equivalent header names, only the first entry - // with an equivalent name MUST be considered for a match. Subsequent + // If multiple entries specify equivalent header names, only the first + // entry with an equivalent name MUST be considered for a match. Subsequent // entries with an equivalent header name MUST be ignored. Due to the // case-insensitivity of header names, "foo" and "Foo" are considered // equivalent. // + // When a header is repeated in an HTTP request, it is + // implementation-specific behavior as to how this is represented. + // Generally, proxies should follow the guidance from the RFC: + // https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding + // processing a repeated header, with special handling for "Set-Cookie". + // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 Name string `json:"name"` diff --git a/config/crd/bases/gateway.networking.k8s.io_httproutes.yaml b/config/crd/bases/gateway.networking.k8s.io_httproutes.yaml index 73415a4c3d..6b4ee9431c 100644 --- a/config/crd/bases/gateway.networking.k8s.io_httproutes.yaml +++ b/config/crd/bases/gateway.networking.k8s.io_httproutes.yaml @@ -872,7 +872,13 @@ spec: name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header - names, \"foo\" and \"Foo\" are considered equivalent." + names, \"foo\" and \"Foo\" are considered equivalent. + \n When a header is repeated in an HTTP request, + it is implementation-specific behavior as to how + this is represented. Generally, proxies should + follow the guidance from the RFC: https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 + regarding processing a repeated header, with special + handling for \"Set-Cookie\"." maxLength: 256 minLength: 1 type: string