Skip to content

Commit

Permalink
Add the required Accept header for RPCv2 (#5649)
Browse files Browse the repository at this point in the history
  • Loading branch information
sugmanue authored Oct 8, 2024
1 parent 0677684 commit 85857b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public boolean generatesBody(OperationInfo info) {
*/
ProtocolFact SMITHY_RPC_V2_CBOR = new ProtocolFact() {
private final Map<String, String> extraHeaders = Collections.unmodifiableMap(MapUtils.of("smithy-protocol",
"rpc-v2-cbor"));
"rpc-v2-cbor",
"Accept",
"application/cbor"));
/**
* Smithy RPCv2 only skips body generation for operation without input defined. These operations mark themselves using
* the {@link BaseAwsJsonProtocolFactory#GENERATES_BODY} metadata attribute. Otherwise, the protocol default is to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -56,6 +57,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -88,6 +90,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -119,6 +122,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -149,6 +153,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -181,6 +186,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -211,6 +217,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -242,6 +249,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -318,6 +326,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -343,6 +352,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -368,6 +378,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand Down Expand Up @@ -402,6 +413,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -427,6 +439,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -453,6 +466,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -479,6 +493,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -505,6 +520,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
}
}
Expand All @@ -528,6 +544,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
"doesNotContain": [
Expand All @@ -554,6 +571,7 @@
"headers": {
"contains": {
"Content-Type": "application/cbor",
"Accept": "application/cbor",
"smithy-protocol": "rpc-v2-cbor"
},
"doesNotContain": [
Expand Down Expand Up @@ -589,4 +607,4 @@
}
}
}
]
]

0 comments on commit 85857b5

Please sign in to comment.