Skip to content

Commit 51e7e5f

Browse files
e5lSebmastert-bastrenovate[bot]marychatte
authored
Release 2.3.5 (#3771)
* KTOR-6221: Fix reduced concurrent reqs in Apache5 (#3738) When using the Apache5 engine, total concurrent requests to a single route were limited to 5 requests. This is due to the code which tried to increase the concurrency to the ktor-standard 1000 concurrent having a typo and setting the total max connections twice and missing the max connections completely. (cherry picked from commit fa5cba1) * Avoid crashing when TLS TCP socket is closed (#3690) * Avoid crashing when TLS TCP socket is closed When using a plain TCP socket with TLS, two worker jobs are spawned: - cio-tls-input-loop - cio-tls-output-loop These worker jobs live in their own scope, and exceptions they throw can't easily be caught by the caller: the only option is to install a `CoroutineExceptionHandler` for the whole TLS socket, which is quite hacky and may hide bugs. When the TCP socket is closed, this is only caught when trying to write on the output channel, which throws a `ClosedSendChannelException`. We now catch that exception and cleanly stop the background job. Fixes https://youtrack.jetbrains.com/issue/KTOR-5178/TLSSocket-cannot-catch-the-exception-thrown-by-appDataOutputLoop Fixes https://youtrack.jetbrains.com/issue/KTOR-4360/Android-Impossible-to-catch-the-ClosedSendChannelException-when-TLS-connection-socket-is-closed * fixup! Avoid crashing when TLS TCP socket is closed (cherry picked from commit 1905329) * KTOR-6229 Fix hostname verification in CIO (#3746) (cherry picked from commit 53fa31a) * KTOR-5540 Fix darwin ws pong message (#3747) * KTOR-5540 Fix darwin ws pong message * Update ktor-client/ktor-client-darwin/darwin/test/DarwinEngineTest.kt Co-authored-by: Vitor Hugo Schwaab <[email protected]> --------- Co-authored-by: Rustam <[email protected]> Co-authored-by: Vitor Hugo Schwaab <[email protected]> (cherry picked from commit 375b0d3) * Update netty monorepo to v4.1.97.Final (#3627) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (cherry picked from commit a0ae1eb) * KTOR-6292 Make client use Dispatchers.IO by default (#3748) * KTOR-6292 Make client use Dispatchers.IO by default (cherry picked from commit a22852c) * Update kotlin to 1.9.10 (#3761) * Fix mingwX64 compilation * Update kotlin to 1.9.10 * Fix CallLogging tests * Fix js compilation (cherry picked from commit 8a9f4a5) * fixup! Update kotlin to 1.9.10 (#3761) * KTOR-6286 Update xmlutil to 0.86.2 (#3770) (cherry picked from commit 87181e4) --------- Co-authored-by: Sebastian Mayr <[email protected]> Co-authored-by: Bastien Teinturier <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mariia Skripchenko <[email protected]>
1 parent 32b9395 commit 51e7e5f

File tree

155 files changed

+1360
-1166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+1360
-1166
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ apply(from = "gradle/compatibility.gradle")
9292

9393
plugins {
9494
id("org.jetbrains.dokka") version "1.7.20" apply false
95-
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.12.1"
96-
id("kotlinx-atomicfu") version "0.19.0" apply false
95+
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
96+
id("kotlinx-atomicfu") version "0.22.0" apply false
9797
id("com.osacky.doctor") version "0.8.1"
9898
}
9999

buildSrc/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
plugins {
6-
id("org.gradle.kotlin.kotlin-dsl") version "3.2.4"
7-
kotlin("plugin.serialization") version "1.7.21"
6+
id("org.gradle.kotlin.kotlin-dsl") version "4.1.0"
7+
kotlin("plugin.serialization") version "1.9.0"
88
}
99

1010
val buildSnapshotTrain = properties["build_snapshot_train"]?.toString()?.toBoolean() == true
@@ -24,8 +24,8 @@ sourceSets.main {
2424
val ktor_version = "2.3.2"
2525

2626
dependencies {
27-
implementation(kotlin("gradle-plugin", "1.8.22"))
28-
implementation(kotlin("serialization", "1.8.22"))
27+
implementation(kotlin("gradle-plugin", "1.9.10"))
28+
implementation(kotlin("serialization", "1.9.10"))
2929

3030
val ktlint_version = libs.versions.ktlint.version.get()
3131
implementation("org.jmailen.gradle:kotlinter-gradle:$ktlint_version")

buildSrc/src/main/kotlin/CommonConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ fun Project.configureCommon() {
99

1010
kotlin {
1111
sourceSets {
12-
val commonMain by getting {
12+
commonMain {
1313
dependencies {
1414
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
1515
}
1616
}
1717

18-
val commonTest by getting {
18+
commonTest {
1919
dependencies {
2020
implementation(kotlin("test"))
2121
}

buildSrc/src/main/kotlin/JsConfig.kt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,24 @@ private fun Project.configureJsTasks() {
2727
kotlin {
2828
js(IR) {
2929
nodejs {
30-
testTask {
31-
useMocha {
32-
timeout = "10000"
30+
testTask(
31+
Action {
32+
useMocha {
33+
timeout = "10000"
34+
}
3335
}
34-
}
36+
)
3537
}
3638

3739
browser {
38-
testTask {
39-
useKarma {
40-
useChromeHeadless()
41-
useConfigDirectory(File(project.rootProject.projectDir, "karma"))
40+
testTask(
41+
Action {
42+
useKarma {
43+
useChromeHeadless()
44+
useConfigDirectory(File(project.rootProject.projectDir, "karma"))
45+
}
4246
}
43-
}
47+
)
4448
}
4549

4650
binaries.library()

buildSrc/src/main/kotlin/KotlinExtensions.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ fun KotlinMultiplatformExtension.createCInterop(
2727
}
2828
}
2929

30+
fun NamedDomainObjectContainer<KotlinSourceSet>.commonMain(block: KotlinSourceSet.() -> Unit) {
31+
val sourceSet = getByName("commonMain")
32+
block(sourceSet)
33+
}
34+
35+
fun NamedDomainObjectContainer<KotlinSourceSet>.commonTest(block: KotlinSourceSet.() -> Unit) {
36+
val sourceSet = getByName("commonTest")
37+
block(sourceSet)
38+
}
39+
3040
fun NamedDomainObjectContainer<KotlinSourceSet>.jvmAndNixMain(block: KotlinSourceSet.() -> Unit) {
3141
val sourceSet = findByName("jvmAndNixMain") ?: getByName("jvmMain")
3242
block(sourceSet)

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright 2014-2023 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
object Versions {
6+
val kotlin = "1.9.10"
7+
val coroutines = "1.7.2"
8+
val slf4j = "1.7.36"
9+
val junit = "4.13.2"
10+
val logback = "1.2.11"
11+
}

buildSrc/src/main/kotlin/test/server/ServerUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ fun List<PartData>.makeString(): String = buildString {
2929
}
3030
}
3131

32+
@Suppress("DEPRECATION")
3233
private fun filenameContentTypeAndContentString(provider: () -> Input, headers: Headers): String {
3334
val dispositionHeader: String = headers.getAll(HttpHeaders.ContentDisposition)!!.joinToString(";")
3435
val disposition: ContentDisposition = ContentDisposition.parse(dispositionHeader)

buildSrc/src/main/kotlin/test/server/TestServer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ internal fun startServer(): Closeable {
2828
tests()
2929
}.start()
3030

31-
scope.use(Closeable { server.stop(0L, 0L, TimeUnit.MILLISECONDS) })
31+
scope.use { server.stop(0L, 0L, TimeUnit.MILLISECONDS) }
3232

3333
val tlsServer = setupTLSServer()
3434
tlsServer.start()
35-
scope.use(Closeable { tlsServer.stop(0L, 0L, TimeUnit.MILLISECONDS) })
35+
scope.use { tlsServer.stop(0L, 0L, TimeUnit.MILLISECONDS) }
3636

3737
Thread.sleep(1000)
3838
} catch (cause: Throwable) {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ktor.ide.jvmAndCommonOnly=true
1010
kotlin.code.style=official
1111

1212
# config
13-
version=2.3.4
13+
version=2.3.5
1414

1515
# gradle
1616
org.gradle.daemon=true
@@ -34,7 +34,7 @@ kotlin.native.binary.memoryModel=experimental
3434

3535
kotlin_version=1.8.22
3636
coroutines_version=1.7.1
37-
atomicfu_version=0.20.2
37+
atomicfu_version=0.22.2
3838
slf4j_version=1.7.36
3939
junit_version=4.13.2
4040
logback_version=1.2.11

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
kotlin-version = "1.8.22"
33
kotlinx-html-version = "0.9.1"
44
coroutines-version = "1.7.2"
5-
atomicfu-version = "0.20.2"
5+
atomicfu-version = "0.22.0"
66
serialization-version = "1.5.1"
77
validator-version = "0.8.0"
88
ktlint-version = "3.15.0"
99

10-
netty-version = "4.1.92.Final"
10+
netty-version = "4.1.97.Final"
1111
netty-tcnative-version = "2.0.61.Final"
1212

1313
jetty-version = "9.4.51.v20230217"
@@ -58,7 +58,7 @@ jakarta-servlet-version = "5.0.0"
5858
node-fetch-version = "2.6.7"
5959
abort-controller-version = "3.0.0"
6060
ws-version = "8.5.0"
61-
xmlutil-version = "0.86.1"
61+
xmlutil-version = "0.86.2"
6262
yamlkt-version = "0.12.0"
6363

6464
swagger-codegen-version = "3.0.41"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)