diff --git a/ktor-server/ktor-server-test-host/jvmAndNix/src/io/ktor/server/testing/client/TestHttpClientEngine.kt b/ktor-server/ktor-server-test-host/jvmAndNix/src/io/ktor/server/testing/client/TestHttpClientEngine.kt index ae7a2c6c46a..32e12aa6a30 100644 --- a/ktor-server/ktor-server-test-host/jvmAndNix/src/io/ktor/server/testing/client/TestHttpClientEngine.kt +++ b/ktor-server/ktor-server-test-host/jvmAndNix/src/io/ktor/server/testing/client/TestHttpClientEngine.kt @@ -114,7 +114,9 @@ class TestHttpClientEngine(override val config: TestHttpClientConfig) : HttpClie } } - private fun OutgoingContent.toByteReadChannel(timeoutAttributes: HttpTimeout.HttpTimeoutCapabilityConfiguration?): ByteReadChannel = + private fun OutgoingContent.toByteReadChannel( + timeoutAttributes: HttpTimeout.HttpTimeoutCapabilityConfiguration? + ): ByteReadChannel = when (this) { is OutgoingContent.NoContent -> ByteReadChannel.Empty is OutgoingContent.ByteArrayContent -> ByteReadChannel(bytes())