Skip to content

Commit 764fea6

Browse files
committed
Fix "Stream must be replayable to calculate a body hash" error
1 parent 6791e40 commit 764fea6

File tree

1 file changed

+1
-1
lines changed
  • runtime/serde/serde-cbor/common/src/aws/smithy/kotlin/runtime/serde/cbor

1 file changed

+1
-1
lines changed

runtime/serde/serde-cbor/common/src/aws/smithy/kotlin/runtime/serde/cbor/CborSerializer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CborSerializer :
2727
StructSerializer {
2828
private val buffer = SdkBuffer()
2929

30-
public fun toHttpBody(): HttpBody = buffer.toHttpBody(contentLength = buffer.size)
30+
public fun toHttpBody(): HttpBody = buffer.readByteArray().toHttpBody()
3131

3232
override fun toByteArray(): ByteArray = buffer.readByteArray()
3333

0 commit comments

Comments
 (0)