From 0ff6ff47c312ca57189206b6fb88714e15ed2fd8 Mon Sep 17 00:00:00 2001 From: Matt Muller Date: Tue, 8 Oct 2024 20:18:34 -0400 Subject: [PATCH] Always add accept header for cbor protocol --- .../lib/aws-sdk-core/rpc_v2/content_type_handler.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/content_type_handler.rb b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/content_type_handler.rb index 77aeb01f255..917e24a2692 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/content_type_handler.rb @@ -13,11 +13,13 @@ def call(context) accept = if eventstream_output?(context) 'application/vnd.amazon.eventstream' + else + 'application/cbor' end headers = context.http_request.headers headers['Content-Type'] ||= content_type if content_type - headers['Accept'] ||= accept if accept + headers['Accept'] ||= accept @handler.call(context) end