mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(cbor): lowercase smithy-protocol response header casing (#968)
The Smithy RPC v2 CBOR protocol spec requires the response header to be sent as `smithy-protocol` (lowercase). The previous casing `Smithy-Protocol` caused SDK clients that perform a case-sensitive check on the response header to fail protocol negotiation.
This commit is contained in:
1 parent
70958b1091
commit
eda92677dd
1 file changed
+2
-2
@@ -154,12 +154,12 @@ public class AwsJsonCborController {
|
||||
byte[] cborBytes = nodeToSmithyCbor(responseNode);
|
||||
String responseContentType = responseContentType(httpHeaders);
|
||||
return Response.status(delegated.getStatus())
|
||||
.header("Smithy-Protocol", "rpc-v2-cbor")
|
||||
.header("smithy-protocol", "rpc-v2-cbor")
|
||||
.type(responseContentType)
|
||||
.entity(cborBytes)
|
||||
.build();
|
||||
} catch (AwsException e) {
|
||||
return cborErrorResponse(e, "Smithy-Protocol", responseContentType(httpHeaders));
|
||||
return cborErrorResponse(e, "smithy-protocol", responseContentType(httpHeaders));
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error processing Smithy CBOR request: " + serviceId + "." + operation, e);
|
||||
return Response.status(500).build();
|
||||
|
||||
Reference in new issue
Block a user