Skip to content

Commit 8019856

Browse files
benluddyk8s-publishing-bot
authored andcommitted
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
1 parent d70754f commit 8019856

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/runtime/types.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ type TypeMeta struct {
4343
}
4444

4545
const (
46-
ContentTypeJSON string = "application/json"
47-
ContentTypeYAML string = "application/yaml"
48-
ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf"
49-
ContentTypeCBOR string = "application/cbor"
46+
ContentTypeJSON string = "application/json"
47+
ContentTypeYAML string = "application/yaml"
48+
ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf"
49+
ContentTypeCBOR string = "application/cbor" // RFC 8949
50+
ContentTypeCBORSequence string = "application/cbor-seq" // RFC 8742
5051
)
5152

5253
// RawExtension is used to hold extensions in external versions.

0 commit comments

Comments
 (0)