Skip to content

Wrong :content-type header is set on RPCv2 CBOR event stream initial-request events #5894

@rhernandez35

Description

@rhernandez35

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

Additional Information/Context

No response

AWS Java SDK version used

n/a

JDK version used

n/a

Operating System and version

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions