-
Notifications
You must be signed in to change notification settings - Fork 977
Description
Describe the bug
The SDK uses the request's content-type header to set the initial-request's :content-type header. AWS/JSON has the base request's content-type set to the correct value but RPCv2 CBOR uses the event-stream mime type from the start. This causes the initial request for an RPCv2 CBOR event stream to always have a content-type of application/vnd.amazon.eventstream instead of the type it's actually serialized as, application/cbor.
This code works as-is for rest-json because rest-json does not use an initial-request event.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
CBOR initial-event has application/cbor content type
Current Behavior
CBOR initial-event has application/vnd.amazon.eventstream content type
Reproduction Steps
Initiate an RPCv2 event streaming request and see the :content-type on the initial event
Possible Solution
Move RPCv2 CBOR to
Line 283 in 9fa37f9
| if (protocol == AwsJsonProtocol.AWS_JSON) { |
Additional Information/Context
No response
AWS Java SDK version used
n/a
JDK version used
n/a
Operating System and version
n/a