Skip to content

Commit 3ae24a2

Browse files
committed
Override Content-Length rather than appending
1 parent 7f69efb commit 3ae24a2

File tree

1 file changed

+1
-1
lines changed
  • runtime/protocol/http-client-engines/http-client-engine-crt/jvm/src/aws/smithy/kotlin/runtime/http/engine/crt

1 file changed

+1
-1
lines changed

runtime/protocol/http-client-engines/http-client-engine-crt/jvm/src/aws/smithy/kotlin/runtime/http/engine/crt/RequestUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ internal fun HttpRequest.toCrtRequest(callContext: CoroutineContext): aws.sdk.ko
6868
}
6969

7070
val contentLength = body.contentLength?.takeIf { it >= 0 }?.toString() ?: headers[CONTENT_LENGTH_HEADER]
71-
contentLength?.let { crtHeaders.append(CONTENT_LENGTH_HEADER, it) }
71+
contentLength?.let { crtHeaders[CONTENT_LENGTH_HEADER] = it }
7272

7373
return aws.sdk.kotlin.crt.http.HttpRequest(method.name, url.requestRelativePath, crtHeaders.build(), bodyStream)
7474
}

0 commit comments

Comments
 (0)