Skip to content

Commit 89f9fca

Browse files
authored
Add AwsJsonProtocol.SMITHY_RPC_V2_CBOR to properly handle the content type for event streams (#5722)
1 parent 1ac77be commit 89f9fca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/protocols/aws-json-protocol/src/main/java/software/amazon/awssdk/protocols/json/internal/marshall/JsonProtocolMarshaller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private SdkHttpFullRequest finishMarshalling() {
283283
if (protocol == AwsJsonProtocol.AWS_JSON) {
284284
// For RPC formats, this content type will later be pushed down into the `initial-event` in the body
285285
request.putHeader(CONTENT_TYPE, contentType);
286-
} else if (protocol == AwsJsonProtocol.REST_JSON) {
286+
} else if (protocol == AwsJsonProtocol.REST_JSON || protocol == AwsJsonProtocol.SMITHY_RPC_V2_CBOR) {
287287
request.putHeader(CONTENT_TYPE, MIMETYPE_EVENT_STREAM);
288288
} else {
289289
throw new IllegalArgumentException("Unknown AwsJsonProtocol: " + protocol);

0 commit comments

Comments
 (0)