From 8019856689a2d4a00c1a8a95d2afd2e475469ddf Mon Sep 17 00:00:00 2001 From: Ben Luddy Date: Fri, 1 Nov 2024 13:14:06 -0400 Subject: [PATCH] Use application/cbor-seq media type in streaming CBOR responses. The media type application/cbor describes exactly one encoded item. As a new (to Kubernetes) format with no existing clients, streaming/watch responses will use the application/cbor-seq media type. CBOR watch responses conform to the specification of CBOR Sequences and are encoded as the concatenation of zero or more items with no additional framing. Kubernetes-commit: 504f14998e920ca8837b3310094b3da11c62a070 --- pkg/runtime/types.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/runtime/types.go b/pkg/runtime/types.go index 1680c149f..ca7b7cc2d 100644 --- a/pkg/runtime/types.go +++ b/pkg/runtime/types.go @@ -43,10 +43,11 @@ type TypeMeta struct { } const ( - ContentTypeJSON string = "application/json" - ContentTypeYAML string = "application/yaml" - ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" - ContentTypeCBOR string = "application/cbor" + ContentTypeJSON string = "application/json" + ContentTypeYAML string = "application/yaml" + ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" + ContentTypeCBOR string = "application/cbor" // RFC 8949 + ContentTypeCBORSequence string = "application/cbor-seq" // RFC 8742 ) // RawExtension is used to hold extensions in external versions.