├── .devcontainer ├── Dockerfile ├── cmdline-tools-package.xml └── devcontainer.json ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── issue_report.md ├── images │ ├── ktor-logo-for-dark.svg │ └── ktor-logo-for-light.svg ├── pull_request_template.md └── workflows │ ├── auto-approve.yml │ ├── gradle-wrapper-validation.yml │ └── junie.yml ├── .gitignore ├── .gitpod.yml ├── .idea ├── copyright │ ├── Apache_2_oneliner.xml │ └── profiles_settings.xml ├── dictionaries │ ├── cy.xml │ ├── leonid.xml │ └── leonidstasevskij.xml ├── externalDependencies.xml ├── icon.svg ├── runConfigurations │ ├── All_Tests.xml │ └── Core_Tests.xml └── vcs.xml ├── CHANGELOG.md ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MIGRATION_GUIDE.md ├── README.md ├── THIRDPARTY.md ├── build-logic ├── README.md ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ ├── ktorbuild.base.gradle.kts │ ├── ktorbuild.codestyle.gradle.kts │ ├── ktorbuild.compatibility.gradle.kts │ ├── ktorbuild.doctor.gradle.kts │ ├── ktorbuild.dokka.gradle.kts │ ├── ktorbuild.kmp.gradle.kts │ ├── ktorbuild.project.client-plugin.gradle.kts │ ├── ktorbuild.project.internal.gradle.kts │ ├── ktorbuild.project.library.gradle.kts │ ├── ktorbuild.project.server-plugin.gradle.kts │ ├── ktorbuild.publish.gradle.kts │ ├── ktorbuild.publish.verifier.gradle.kts │ └── ktorbuild │ ├── CInterop.kt │ ├── KtorBuildExtension.kt │ ├── ProjectTagsService.kt │ ├── dsl │ ├── Collections.kt │ └── KotlinSourceSets.kt │ ├── internal │ ├── Accessors.kt │ ├── LimitedParallelismService.kt │ ├── String.kt │ ├── TrackedKotlinHierarchy.kt │ ├── Version.kt │ ├── VersionCatalogs.kt │ ├── gradle │ │ ├── NamedDomainObjectCollection.kt │ │ └── ProjectGradleProperties.kt │ └── publish │ │ ├── PublishTasks.kt │ │ ├── Repositories.kt │ │ └── ValidatePublishedArtifactsTask.kt │ └── targets │ ├── CiConfig.kt │ ├── CommonConfig.kt │ ├── JsConfig.kt │ ├── JvmConfig.kt │ └── KtorTargets.kt ├── build-settings-logic ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ ├── ConfigurationCacheWorkarounds.kt │ ├── ktorsettings.configuration-cache.settings.gradle.kts │ ├── ktorsettings.dependency-resolution-management.settings.gradle.kts │ ├── ktorsettings.develocity.settings.gradle.kts │ ├── ktorsettings.kotlin-user-project.settings.gradle.kts │ └── ktorsettings.settings.gradle.kts ├── build.gradle.kts ├── docs └── develocity.md ├── githook └── prepare-commit-msg ├── gradle.properties ├── gradle ├── artifacts │ ├── publishAndroidNativePublications.txt │ ├── publishDarwinPublications.txt │ ├── publishJsPublications.txt │ ├── publishJvmAndCommonPublications.txt │ ├── publishLinuxPublications.txt │ └── publishWindowsPublications.txt ├── gradle-daemon-jvm.properties ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── karma └── chrome_bin.js ├── kotlin-js-store └── yarn.lock ├── ktor-bom └── build.gradle.kts ├── ktor-client ├── api │ ├── ktor-client.api │ └── ktor-client.klib.api ├── build.gradle.kts ├── jvm │ └── .gitkeep ├── ktor-client-android │ ├── api │ │ ├── ktor-client-android.api │ │ └── ktor-client-android.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── android │ │ │ ├── Android.kt │ │ │ ├── AndroidClientEngine.kt │ │ │ ├── AndroidEngineConfig.kt │ │ │ └── AndroidURLConnectionUtils.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── android │ │ ├── AndroidHttpClientTest.kt │ │ ├── AndroidHttpsTest.kt │ │ ├── AndroidProxyTest.kt │ │ ├── AndroidSpecificHttpsTest.kt │ │ └── UrlConnectionUtilsTest.kt ├── ktor-client-apache │ ├── api │ │ ├── ktor-client-apache.api │ │ └── ktor-client-apache.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── apache │ │ │ ├── Apache.kt │ │ │ ├── ApacheEngine.kt │ │ │ ├── ApacheEngineConfig.kt │ │ │ ├── ApacheHttpRequest.kt │ │ │ ├── ApacheRequestProducer.kt │ │ │ ├── ApacheResponseConsumer.kt │ │ │ ├── ApacheUtils.kt │ │ │ ├── InterestControllerHolder.kt │ │ │ └── ReactorLoopDispatcher.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── apache │ │ ├── ApacheHttpClientTest.kt │ │ ├── ApacheHttpsTest.kt │ │ ├── NoOpControl.kt │ │ └── RequestProducerTest.kt ├── ktor-client-apache5 │ ├── api │ │ ├── ktor-client-apache5.api │ │ └── ktor-client-apache5.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── apache5 │ │ │ ├── Apache5.kt │ │ │ ├── Apache5Engine.kt │ │ │ ├── Apache5EngineConfig.kt │ │ │ ├── ApacheHttpRequest.kt │ │ │ ├── ApacheRequestProducer.kt │ │ │ ├── ApacheResponseConsumer.kt │ │ │ └── ApacheUtils.kt │ │ ├── test-resources │ │ └── logback.xml │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── apache5 │ │ ├── Apache5HttpClientTest.kt │ │ └── Apache5HttpsTest.kt ├── ktor-client-cio │ ├── api │ │ ├── ktor-client-cio.api │ │ └── ktor-client-cio.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── engine │ │ │ │ └── cio │ │ │ │ ├── CIOCommon.kt │ │ │ │ ├── CIOEngine.kt │ │ │ │ ├── CIOEngineConfig.kt │ │ │ │ ├── ConnectionFactory.kt │ │ │ │ ├── ConnectionPipelineCommon.kt │ │ │ │ ├── Endpoint.kt │ │ │ │ ├── EngineTasks.kt │ │ │ │ └── utils.kt │ │ └── test │ │ │ ├── CIOEngineTest.kt │ │ │ └── ConnectionFactoryTest.kt │ ├── gradle.properties │ ├── js │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── cio │ │ │ └── Loader.js.kt │ ├── jvm │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ ├── engine │ │ │ │ └── cio │ │ │ │ │ ├── CIOEngineContainer.kt │ │ │ │ │ ├── ConnectionPipeline.kt │ │ │ │ │ └── Exceptions.kt │ │ │ │ └── plugins │ │ │ │ └── websocket │ │ │ │ └── cio │ │ │ │ └── buildersCio.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── cio │ │ │ ├── BuildersTest.kt │ │ │ ├── CIOHttpClientTest.kt │ │ │ ├── CIOHttpsTest.kt │ │ │ ├── CIORequestTest.kt │ │ │ ├── CIOSpecificHttpsTest.kt │ │ │ ├── ConnectErrorsTest.kt │ │ │ └── UnixSocketTest.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── cio │ │ │ ├── ConnectionPipeline.nonJvm.kt │ │ │ └── ExceptionUtils.nonJvm.kt │ ├── posix │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── cio │ │ │ └── Loader.posix.kt │ └── wasmJs │ │ └── src │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── cio │ │ └── Loader.wasmJs.kt ├── ktor-client-core │ ├── api │ │ ├── ktor-client-core.api │ │ └── ktor-client-core.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ ├── HttpClient.kt │ │ │ │ ├── HttpClientConfig.kt │ │ │ │ ├── call │ │ │ │ ├── DelegatedCall.kt │ │ │ │ ├── HttpClientCall.kt │ │ │ │ ├── SavedCall.kt │ │ │ │ └── utils.kt │ │ │ │ ├── content │ │ │ │ └── ObservableContent.kt │ │ │ │ ├── engine │ │ │ │ ├── HttpClientEngine.kt │ │ │ │ ├── HttpClientEngineBase.kt │ │ │ │ ├── HttpClientEngineCapability.kt │ │ │ │ ├── HttpClientEngineConfig.kt │ │ │ │ ├── HttpClientEngineFactory.kt │ │ │ │ ├── ProxyConfig.kt │ │ │ │ └── Utils.kt │ │ │ │ ├── network │ │ │ │ └── sockets │ │ │ │ │ └── TimeoutExceptions.common.kt │ │ │ │ ├── plugins │ │ │ │ ├── BodyProgress.kt │ │ │ │ ├── DataConversion.kt │ │ │ │ ├── DefaultRequest.kt │ │ │ │ ├── DefaultResponseValidation.kt │ │ │ │ ├── DefaultTransform.kt │ │ │ │ ├── HttpCallValidator.kt │ │ │ │ ├── HttpClientPlugin.kt │ │ │ │ ├── HttpPlainText.kt │ │ │ │ ├── HttpRedirect.kt │ │ │ │ ├── HttpRequestLifecycle.kt │ │ │ │ ├── HttpRequestRetry.kt │ │ │ │ ├── HttpSend.kt │ │ │ │ ├── HttpTimeout.kt │ │ │ │ ├── SaveBody.kt │ │ │ │ ├── UserAgent.kt │ │ │ │ ├── api │ │ │ │ │ ├── ClientHook.kt │ │ │ │ │ ├── ClientPluginBuilder.kt │ │ │ │ │ ├── ClientPluginInstance.kt │ │ │ │ │ ├── CommonHooks.kt │ │ │ │ │ ├── CreatePluginUtils.kt │ │ │ │ │ └── KtorCallContexts.kt │ │ │ │ ├── cache │ │ │ │ │ ├── HttpCache.kt │ │ │ │ │ ├── HttpCacheEntry.kt │ │ │ │ │ ├── HttpCacheLegacy.kt │ │ │ │ │ └── storage │ │ │ │ │ │ ├── DisabledCacheStorage.kt │ │ │ │ │ │ ├── HttpCacheStorage.kt │ │ │ │ │ │ └── UnlimitedCacheStorage.kt │ │ │ │ ├── cookies │ │ │ │ │ ├── AcceptAllCookiesStorage.kt │ │ │ │ │ ├── ConstantCookiesStorage.kt │ │ │ │ │ ├── CookiesStorage.kt │ │ │ │ │ └── HttpCookies.kt │ │ │ │ ├── internal │ │ │ │ │ └── SaveBodyAbandonedReadException.kt │ │ │ │ ├── observer │ │ │ │ │ ├── DelegatedCall.kt │ │ │ │ │ └── ResponseObserver.kt │ │ │ │ ├── sse │ │ │ │ │ ├── ClientSSESession.kt │ │ │ │ │ ├── DefaultClientSSESession.kt │ │ │ │ │ ├── SSE.kt │ │ │ │ │ ├── SSEClientContent.kt │ │ │ │ │ ├── SSEConfig.kt │ │ │ │ │ └── builders.kt │ │ │ │ └── websocket │ │ │ │ │ ├── ClientSessions.kt │ │ │ │ │ ├── Durations.kt │ │ │ │ │ ├── WebSocketContent.kt │ │ │ │ │ ├── WebSockets.kt │ │ │ │ │ └── builders.kt │ │ │ │ ├── request │ │ │ │ ├── ClientUpgradeContent.kt │ │ │ │ ├── DefaultHttpRequest.kt │ │ │ │ ├── HttpRequest.kt │ │ │ │ ├── HttpRequestPipeline.kt │ │ │ │ ├── RequestBody.kt │ │ │ │ ├── UnixSockets.kt │ │ │ │ ├── builders.kt │ │ │ │ ├── buildersWithUrl.kt │ │ │ │ ├── forms │ │ │ │ │ ├── FormDataContent.kt │ │ │ │ │ ├── formBuilders.kt │ │ │ │ │ └── formDsl.kt │ │ │ │ └── utils.kt │ │ │ │ ├── statement │ │ │ │ ├── DefaultHttpResponse.kt │ │ │ │ ├── HttpResponse.kt │ │ │ │ ├── HttpResponsePipeline.kt │ │ │ │ ├── HttpStatement.kt │ │ │ │ └── Readers.kt │ │ │ │ └── utils │ │ │ │ ├── ByteChannelUtils.kt │ │ │ │ ├── CIO.kt │ │ │ │ ├── CacheControl.kt │ │ │ │ ├── ClientEvents.kt │ │ │ │ ├── Content.kt │ │ │ │ ├── CoroutineUtils.kt │ │ │ │ ├── ExceptionUtils.kt │ │ │ │ ├── HeadersUtils.kt │ │ │ │ └── headers.kt │ │ └── test │ │ │ ├── AcceptAllCookiesStorageTest.kt │ │ │ ├── BuildMethodsTest.kt │ │ │ ├── CacheExpiresTest.kt │ │ │ ├── ClientPluginsTest.kt │ │ │ ├── CookiesTest.kt │ │ │ ├── DefaultRequestTest.kt │ │ │ ├── FormDslTest.kt │ │ │ ├── HttpCacheTest.kt │ │ │ ├── HttpClientConfigTest.kt │ │ │ ├── HttpRequestBuilderTest.kt │ │ │ ├── HttpStatementTest.kt │ │ │ ├── MultiPartFormDataContentTest.kt │ │ │ ├── ShouldValidateTest.kt │ │ │ └── TestEngine.kt │ ├── js │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ ├── JsRequestUtils.kt │ │ │ ├── engine │ │ │ └── js │ │ │ │ ├── Js.kt │ │ │ │ ├── JsClientEngine.kt │ │ │ │ ├── JsUtils.kt │ │ │ │ ├── ReadableStream.kt │ │ │ │ ├── browser │ │ │ │ └── BrowserFetch.kt │ │ │ │ └── compatibility │ │ │ │ └── Utils.kt │ │ │ ├── fetch │ │ │ ├── LibDom.kt │ │ │ └── LibEs5.kt │ │ │ └── plugins │ │ │ └── websocket │ │ │ └── JsWebSocketSession.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ ├── HttpClientJs.kt │ │ │ ├── engine │ │ │ ├── HttpClientEngineBase.js.kt │ │ │ ├── ProxyConfigJs.kt │ │ │ └── js │ │ │ │ └── Js.kt │ │ │ ├── plugins │ │ │ ├── DefaultTransformJs.kt │ │ │ └── observer │ │ │ │ └── ResponseObserverContextJs.kt │ │ │ └── utils │ │ │ └── CoroutineUtilsJs.kt │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ ├── HttpClientJvm.kt │ │ │ │ ├── content │ │ │ │ └── LocalFileContent.kt │ │ │ │ ├── engine │ │ │ │ ├── HttpClientEngineBase.jvm.kt │ │ │ │ └── ProxyConfigJvm.kt │ │ │ │ ├── network │ │ │ │ └── sockets │ │ │ │ │ └── TimeoutExceptions.kt │ │ │ │ ├── plugins │ │ │ │ ├── DefaultTransformersJvm.kt │ │ │ │ ├── cache │ │ │ │ │ └── storage │ │ │ │ │ │ └── FileCacheStorage.kt │ │ │ │ └── observer │ │ │ │ │ └── ResponseObserverContextJvm.kt │ │ │ │ ├── request │ │ │ │ ├── HttpRequestJvm.kt │ │ │ │ └── buildersJvm.kt │ │ │ │ └── utils │ │ │ │ ├── CIOJvm.kt │ │ │ │ ├── CoroutineDispatcherUtils.kt │ │ │ │ └── ExceptionUtilsJvm.kt │ │ └── test │ │ │ ├── CachingCacheStorageTest.kt │ │ │ ├── ExceptionsTest.kt │ │ │ └── WebSocketTest.kt │ ├── jvmAndPosix │ │ └── src │ │ │ └── UnixSockets.jvmAndPosix.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ ├── engine │ │ │ └── Loader.kt │ │ │ ├── network │ │ │ └── sockets │ │ │ │ └── TimeoutExceptions.nonJvm.kt │ │ │ └── utils │ │ │ └── ExceptionUtils.nonJvm.kt │ ├── posix │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ ├── HttpClient.kt │ │ │ ├── engine │ │ │ ├── HttpClientEngineBase.posix.kt │ │ │ └── ProxyConfigNative.kt │ │ │ ├── plugins │ │ │ ├── DefaultTransformIos.kt │ │ │ └── observer │ │ │ │ └── ResponseObserverContextPosix.kt │ │ │ └── utils │ │ │ └── CoroutineUtilsPosix.kt │ └── wasmJs │ │ └── src │ │ └── io │ │ └── ktor │ │ └── client │ │ ├── JsRequestUtils.kt │ │ ├── engine │ │ └── js │ │ │ ├── Js.kt │ │ │ ├── JsUtils.kt │ │ │ ├── WasmJsClientEngine.kt │ │ │ ├── browser │ │ │ └── BrowserFetch.kt │ │ │ └── compatibility │ │ │ └── Utils.kt │ │ ├── fetch │ │ ├── LibDom.kt │ │ └── LibEs5.kt │ │ ├── plugins │ │ └── websocket │ │ │ └── JsWebSocketSession.kt │ │ └── utils │ │ └── JsUtils.kt ├── ktor-client-curl │ ├── api │ │ └── ktor-client-curl.klib.api │ ├── build.gradle.kts │ └── desktop │ │ ├── interop │ │ ├── include │ │ │ └── curl │ │ │ │ ├── curl.h │ │ │ │ ├── curlver.h │ │ │ │ ├── easy.h │ │ │ │ ├── header.h │ │ │ │ ├── mprintf.h │ │ │ │ ├── multi.h │ │ │ │ ├── options.h │ │ │ │ ├── stdcheaders.h │ │ │ │ ├── system.h │ │ │ │ ├── typecheck-gcc.h │ │ │ │ ├── urlapi.h │ │ │ │ └── websockets.h │ │ ├── lib │ │ │ ├── linuxArm64 │ │ │ │ ├── libcrypto.a │ │ │ │ ├── libcurl.a │ │ │ │ └── libssl.a │ │ │ ├── linuxX64 │ │ │ │ ├── libcrypto.a │ │ │ │ ├── libcurl.a │ │ │ │ └── libssl.a │ │ │ ├── macosArm64 │ │ │ │ └── libcurl.a │ │ │ ├── macosX64 │ │ │ │ └── libcurl.a │ │ │ └── mingwX64 │ │ │ │ ├── libcrypto.a │ │ │ │ ├── libcurl.a │ │ │ │ ├── libssl.a │ │ │ │ └── libz.a │ │ └── libcurl.def │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── curl │ │ │ ├── Curl.kt │ │ │ ├── CurlClientEngine.kt │ │ │ ├── CurlClientEngineConfig.kt │ │ │ ├── CurlProcessor.kt │ │ │ ├── ResponseUtils.kt │ │ │ └── internal │ │ │ ├── CurlAdapters.kt │ │ │ ├── CurlCallbacks.kt │ │ │ ├── CurlHttpResponseBody.kt │ │ │ ├── CurlMultiApiHandler.kt │ │ │ ├── CurlRaw.kt │ │ │ ├── CurlWebSocketResponseBody.kt │ │ │ ├── CurlWebSocketSession.kt │ │ │ └── NativeUtils.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── curl │ │ └── test │ │ ├── CurlNativeTests.kt │ │ ├── CurlProxyTest.kt │ │ └── CurlWebSocketTests.kt ├── ktor-client-darwin-legacy │ ├── api │ │ └── ktor-client-darwin-legacy.klib.api │ ├── build.gradle.kts │ └── darwin │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── darwin │ │ │ ├── DarwinHttpRequestException.kt │ │ │ ├── DarwinLegacy.kt │ │ │ ├── DarwinLegacyClientEngine.kt │ │ │ ├── DarwinLegacyClientEngineConfig.kt │ │ │ ├── KtorLegacyNSURLSessionDelegate.kt │ │ │ ├── ProxySupportLegacyCommon.kt │ │ │ ├── certificates │ │ │ ├── LegacyCertificatePinner.kt │ │ │ ├── LegacyCertificatesInfo.kt │ │ │ └── LegacyPinnedCertificate.kt │ │ │ └── internal │ │ │ └── legacy │ │ │ ├── DarwinLegacyRequestUtils.kt │ │ │ ├── DarwinLegacyResponseUtils.kt │ │ │ ├── DarwinLegacySession.kt │ │ │ ├── DarwinLegacyTaskHandler.kt │ │ │ ├── DarwinLegacyUrlUtils.kt │ │ │ ├── DarwinLegacyUtils.kt │ │ │ └── TimeoutUtilsLegacy.kt │ │ └── test │ │ └── DarwinLegacyEngineTest.kt ├── ktor-client-darwin │ ├── api │ │ └── ktor-client-darwin.klib.api │ ├── build.gradle.kts │ └── darwin │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ ├── darwin │ │ │ ├── Darwin.kt │ │ │ ├── DarwinClientEngine.kt │ │ │ ├── DarwinClientEngineConfig.kt │ │ │ ├── DarwinUtils.kt │ │ │ ├── KtorNSURLSessionDelegate.kt │ │ │ ├── ProxySupportCommon.kt │ │ │ ├── TimeoutUtils.kt │ │ │ ├── certificates │ │ │ │ ├── CertificatePinner.kt │ │ │ │ ├── CertificatesInfo.kt │ │ │ │ └── PinnedCertificate.kt │ │ │ └── internal │ │ │ │ ├── DarwinRequestUtils.kt │ │ │ │ ├── DarwinResponseUtils.kt │ │ │ │ ├── DarwinSession.kt │ │ │ │ ├── DarwinTaskHandler.kt │ │ │ │ ├── DarwinUrlUtils.kt │ │ │ │ └── DarwinWebsocketSession.kt │ │ │ └── ios │ │ │ ├── Ios.kt │ │ │ └── certificates │ │ │ └── CertificatePinner.kt │ │ └── test │ │ └── DarwinEngineTest.kt ├── ktor-client-ios │ ├── api │ │ └── ktor-client-ios.klib.api │ ├── build.gradle.kts │ └── darwin │ │ ├── .gitkeep │ │ └── src │ │ └── Stub.kt ├── ktor-client-java │ ├── api │ │ ├── ktor-client-java.api │ │ └── ktor-client-java.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── java │ │ │ ├── Java.kt │ │ │ ├── JavaHttpConfig.kt │ │ │ ├── JavaHttpEngine.kt │ │ │ ├── JavaHttpRequest.kt │ │ │ ├── JavaHttpRequestBodyPublisher.kt │ │ │ ├── JavaHttpResponse.kt │ │ │ ├── JavaHttpResponseBodyHandler.kt │ │ │ └── JavaHttpWebSocket.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── java │ │ ├── JavaClientTest.kt │ │ ├── JavaEngineTests.kt │ │ ├── JavaHttpsTest.kt │ │ ├── RequestProducerTest.kt │ │ ├── RequestTests.kt │ │ └── ResponseConsumerTest.kt ├── ktor-client-jetty-jakarta │ ├── api │ │ ├── ktor-client-jetty-jakarta.api │ │ └── ktor-client-jetty-jakarta.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── jetty │ │ │ └── jakarta │ │ │ ├── Jetty.kt │ │ │ ├── JettyEngineConfig.kt │ │ │ ├── JettyHttp2Engine.kt │ │ │ ├── JettyHttp2Request.kt │ │ │ ├── JettyHttpRequest.kt │ │ │ ├── JettyResponseListener.kt │ │ │ └── utils.kt │ │ ├── test-resources │ │ └── logback-test.xml │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── jetty │ │ └── jakarta │ │ └── JettyHttp2EngineTest.kt ├── ktor-client-jetty │ ├── api │ │ ├── ktor-client-jetty.api │ │ └── ktor-client-jetty.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── jetty │ │ │ ├── Jetty.kt │ │ │ ├── JettyEngineConfig.kt │ │ │ ├── JettyHttp2Engine.kt │ │ │ ├── JettyHttp2Request.kt │ │ │ ├── JettyHttpRequest.kt │ │ │ ├── JettyResponseListener.kt │ │ │ └── utils.kt │ │ ├── test-resources │ │ └── logback-test.xml │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── jetty │ │ └── JettyHttp2EngineTest.kt ├── ktor-client-js │ ├── api │ │ └── ktor-client-js.klib.api │ ├── build.gradle.kts │ ├── js │ │ └── .gitkeep │ └── wasmJs │ │ └── .gitkeep ├── ktor-client-mock │ ├── api │ │ ├── ktor-client-mock.api │ │ └── ktor-client-mock.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── engine │ │ │ │ └── mock │ │ │ │ ├── MockEngine.kt │ │ │ │ ├── MockEngineConfig.kt │ │ │ │ └── MockUtils.kt │ │ └── test │ │ │ ├── MockEngineTest.kt │ │ │ └── MockUtilsTest.kt │ └── jvm │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── tests │ │ └── mock │ │ ├── MockEngineExtendedTests.kt │ │ └── MockEngineTests.kt ├── ktor-client-okhttp │ ├── api │ │ ├── ktor-client-okhttp.api │ │ └── ktor-client-okhttp.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── io.ktor.client.HttpClientEngineContainer │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── engine │ │ │ └── okhttp │ │ │ ├── OkHttp.kt │ │ │ ├── OkHttpConfig.kt │ │ │ ├── OkHttpEngine.kt │ │ │ ├── OkHttpSSESession.kt │ │ │ ├── OkHttpWebsocketSession.kt │ │ │ ├── OkUtils.kt │ │ │ └── StreamRequestBody.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── okhttp │ │ ├── OkHttpEngineTests.kt │ │ ├── OkHttpHttpClientTest.kt │ │ ├── OkHttpHttpsTest.kt │ │ ├── OkHttpWebsocketSessionTest.kt │ │ └── RequestTests.kt ├── ktor-client-plugins │ ├── ktor-client-auth │ │ ├── api │ │ │ ├── ktor-client-auth.api │ │ │ └── ktor-client-auth.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── auth │ │ │ │ ├── Auth.kt │ │ │ │ ├── AuthProvider.kt │ │ │ │ └── providers │ │ │ │ ├── AuthTokenHolder.kt │ │ │ │ ├── BasicAuthProvider.kt │ │ │ │ ├── BearerAuthProvider.kt │ │ │ │ └── DigestAuthProvider.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── plugins │ │ │ └── auth │ │ │ ├── AuthTest.kt │ │ │ ├── AuthTokenHolderTest.kt │ │ │ ├── BasicProviderTest.kt │ │ │ └── DigestProviderTest.kt │ ├── ktor-client-bom-remover │ │ ├── api │ │ │ ├── ktor-client-bom-remover.api │ │ │ └── ktor-client-bom-remover.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── bomremover │ │ │ │ └── BOMRemover.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── plugins │ │ │ └── bomremover │ │ │ └── BomRemoverTest.kt │ ├── ktor-client-call-id │ │ ├── api │ │ │ ├── ktor-client-call-id.api │ │ │ └── ktor-client-call-id.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── callid │ │ │ │ └── CallId.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── plugins │ │ │ └── callid │ │ │ └── CallIdTest.kt │ ├── ktor-client-content-negotiation │ │ ├── api │ │ │ ├── ktor-client-content-negotiation.api │ │ │ └── ktor-client-content-negotiation.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── client │ │ │ │ │ └── plugins │ │ │ │ │ └── contentnegotiation │ │ │ │ │ ├── ContentNegotiation.kt │ │ │ │ │ └── JsonContentTypeMatcher.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ ├── ContentNegotiationTests.kt │ │ │ │ ├── IgnoreTypesTest.kt │ │ │ │ └── TestContentConverter.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── DefaultIgnoredTypesJs.kt │ │ ├── jvm │ │ │ └── src │ │ │ │ └── DefaultIgnoredTypesJvm.kt │ │ ├── ktor-client-content-negotiation-tests │ │ │ ├── build.gradle.kts │ │ │ └── jvm │ │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── contentnegotiation │ │ │ │ └── tests │ │ │ │ ├── AbstractClientContentNegotiationTest.kt │ │ │ │ ├── JsonContentNegotiationTest.kt │ │ │ │ └── JsonWebsocketsTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── DefaultIgnoredTypesNix.kt │ ├── ktor-client-encoding │ │ ├── api │ │ │ ├── ktor-client-encoding.api │ │ │ └── ktor-client-encoding.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── ContentEncoding.kt │ │ │ └── test │ │ │ │ └── ContentEncodingTest.kt │ │ └── jvm │ │ │ └── test │ │ │ └── ContentEncodingRequestBodyTest.kt │ ├── ktor-client-json │ │ ├── api │ │ │ ├── ktor-client-json.api │ │ │ └── ktor-client-json.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── json │ │ │ │ ├── JsonContentTypeMatcher.kt │ │ │ │ ├── JsonPlugin.kt │ │ │ │ └── JsonSerializer.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── json │ │ │ │ ├── DefaultJs.kt │ │ │ │ └── JsonPluginJs.kt │ │ ├── jvm │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── json │ │ │ │ ├── DefaultJvm.kt │ │ │ │ └── JsonPluginJvm.kt │ │ ├── ktor-client-gson │ │ │ ├── api │ │ │ │ ├── ktor-client-gson.api │ │ │ │ └── ktor-client-gson.klib.api │ │ │ ├── build.gradle.kts │ │ │ └── jvm │ │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── io.ktor.client.plugins.json.JsonSerializer │ │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── gson │ │ │ │ └── GsonSerializer.kt │ │ ├── ktor-client-jackson │ │ │ ├── api │ │ │ │ ├── ktor-client-jackson.api │ │ │ │ └── ktor-client-jackson.klib.api │ │ │ ├── build.gradle.kts │ │ │ └── jvm │ │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── io.ktor.client.plugins.json.JsonSerializer │ │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── jackson │ │ │ │ └── JacksonSerializer.kt │ │ ├── ktor-client-serialization │ │ │ ├── api │ │ │ │ ├── ktor-client-serialization.api │ │ │ │ └── ktor-client-serialization.klib.api │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ └── src │ │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── client │ │ │ │ │ └── plugins │ │ │ │ │ └── kotlinx │ │ │ │ │ └── serializer │ │ │ │ │ └── KotlinxSerializer.kt │ │ │ ├── js │ │ │ │ └── src │ │ │ │ │ └── SerializerInitializer.kt │ │ │ ├── jvm │ │ │ │ └── resources │ │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── io.ktor.client.plugins.json.JsonSerializer │ │ │ ├── posix │ │ │ │ └── src │ │ │ │ │ └── SerializerInitializer.kt │ │ │ └── wasmJs │ │ │ │ └── src │ │ │ │ └── SerializerInitializer.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── plugins │ │ │ └── json │ │ │ ├── DefaultPosix.kt │ │ │ └── JsonPluginPosix.kt │ ├── ktor-client-logging │ │ ├── api │ │ │ ├── ktor-client-logging.api │ │ │ └── ktor-client-logging.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── logging │ │ │ │ ├── HttpClientCallLogger.kt │ │ │ │ ├── KtorMDCContext.kt │ │ │ │ ├── LogLevel.kt │ │ │ │ ├── LoggedContent.kt │ │ │ │ ├── Logger.kt │ │ │ │ ├── Logging.kt │ │ │ │ ├── LoggingUtils.kt │ │ │ │ └── ObservingUtils.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── logging │ │ │ │ ├── KtorMDCContext.jsAndWasmShared.kt │ │ │ │ └── LoggerJs.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── client │ │ │ │ │ └── plugins │ │ │ │ │ └── logging │ │ │ │ │ ├── KtorMDCContext.jvm.kt │ │ │ │ │ └── LoggerJvm.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── plugins │ │ │ │ └── logging │ │ │ │ ├── AndroidLoggerTest.kt │ │ │ │ ├── LoggingJsonTest.kt │ │ │ │ ├── LoggingTest.kt │ │ │ │ └── OkHttpFormatTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── plugins │ │ │ └── logging │ │ │ ├── KtorMDCContext.posix.kt │ │ │ └── LoggerIos.kt │ ├── ktor-client-resources │ │ ├── api │ │ │ ├── ktor-client-resources.api │ │ │ └── ktor-client-resources.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── client │ │ │ │ │ └── plugins │ │ │ │ │ └── resources │ │ │ │ │ ├── Resources.kt │ │ │ │ │ └── builders.kt │ │ │ └── test │ │ │ │ └── ResourcesTest.kt │ │ ├── js │ │ │ └── .gitkeep │ │ ├── jvm │ │ │ └── .gitkeep │ │ ├── posix │ │ │ └── .gitkeep │ │ └── wasmJs │ │ │ └── .gitkeep │ ├── ktor-client-tracing │ │ ├── api │ │ │ └── ktor-client-tracing.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ ├── EngineWIthTracer.kt │ │ │ │ ├── IncomingChannelTracer.kt │ │ │ │ ├── OutgoingChannelTracer.kt │ │ │ │ ├── Tracer.kt │ │ │ │ ├── TracingWrapper.kt │ │ │ │ └── WebSocketSessionTracer.kt │ │ ├── jvm │ │ │ └── test │ │ │ │ ├── TestTracer.kt │ │ │ │ └── TracingWrapperTest.kt │ │ └── ktor-client-tracing-stetho │ │ │ ├── AndroidManifest.xml │ │ │ ├── android │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── client │ │ │ │ │ └── features │ │ │ │ │ └── tracing │ │ │ │ │ ├── KtorInspectorWebSocketFrame.kt │ │ │ │ │ ├── KtorInspectorWebSocketRequest.kt │ │ │ │ │ ├── KtorInspectorWebSocketResponse.kt │ │ │ │ │ ├── KtorInterceptorHeaders.kt │ │ │ │ │ ├── KtorInterceptorRequest.kt │ │ │ │ │ ├── KtorInterceptorResponse.kt │ │ │ │ │ └── StethoTracer.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── features │ │ │ │ └── tracing │ │ │ │ └── StethoTracerTest.kt │ │ │ ├── build.gradle.kts │ │ │ └── gradle.properties │ └── ktor-client-websockets │ │ ├── api │ │ ├── ktor-client-websockets.api │ │ └── ktor-client-websockets.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ ├── src │ │ └── Empty.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── tests │ │ └── plugins │ │ ├── WebSocketRemoteTest.kt │ │ └── WebSocketTest.kt ├── ktor-client-test-base │ ├── build.gradle.kts │ ├── common │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── test │ │ │ └── base │ │ │ ├── ClientEngineTest.kt │ │ │ ├── ClientLoader.kt │ │ │ ├── CommonClientTestUtils.kt │ │ │ └── TestInfo.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── test │ │ │ └── base │ │ │ └── ClientLoader.jsAndWasmShared.kt │ ├── jvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── test │ │ │ └── base │ │ │ └── ClientLoader.jvm.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── test │ │ │ └── base │ │ │ └── ClientLoader.nonJvm.kt │ └── posix │ │ └── src │ │ └── io │ │ └── ktor │ │ └── client │ │ └── test │ │ └── base │ │ └── ClientLoader.posix.kt ├── ktor-client-tests │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── client │ │ │ │ └── tests │ │ │ │ └── utils │ │ │ │ └── Generators.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── tests │ │ │ ├── AttributesTest.kt │ │ │ ├── BodyProgressTest.kt │ │ │ ├── CharsetTest.kt │ │ │ ├── ClientHeadersTest.kt │ │ │ ├── ClientPipelinesTest.kt │ │ │ ├── CommonHttpClientJvmTest.kt │ │ │ ├── ConnectionTest.kt │ │ │ ├── ContentEncodingIntegrationTest.kt │ │ │ ├── ContentTest.kt │ │ │ ├── ContentTypeTest.kt │ │ │ ├── DefaultEngineTest.kt │ │ │ ├── DefaultTransformTest.kt │ │ │ ├── DownloadTest.kt │ │ │ ├── EventsTest.kt │ │ │ ├── ExceptionsTest.kt │ │ │ ├── FullFormTest.kt │ │ │ ├── HttpClientCallTest.kt │ │ │ ├── HttpRedirectTest.kt │ │ │ ├── HttpRequestRetryTest.kt │ │ │ ├── HttpResponseValidatorTest.kt │ │ │ ├── HttpStatementTest.kt │ │ │ ├── HttpTimeoutTest.kt │ │ │ ├── JsonTest.kt │ │ │ ├── LoggingMockedTests.kt │ │ │ ├── LoggingTest.kt │ │ │ ├── MockedTests.kt │ │ │ ├── MultiPartFormDataTest.kt │ │ │ ├── PluginsTest.kt │ │ │ ├── PostTest.kt │ │ │ ├── ProxyTest.kt │ │ │ ├── QueryTest.kt │ │ │ ├── ResponseObserverTest.kt │ │ │ ├── SaveBodyTest.kt │ │ │ ├── UploadTest.kt │ │ │ ├── WebSocketTest.kt │ │ │ ├── engine │ │ │ └── UtilsTest.kt │ │ │ ├── plugins │ │ │ ├── CacheLegacyStorageTest.kt │ │ │ ├── CacheTest.kt │ │ │ ├── CookiesIntegrationTests.kt │ │ │ ├── CookiesMockTest.kt │ │ │ ├── SSESessionParserTest.kt │ │ │ ├── SerializationTest.kt │ │ │ ├── ServerSentEventsTest.kt │ │ │ └── UserAgentTest.kt │ │ │ └── utils │ │ │ ├── Asserter.kt │ │ │ ├── FrameLogger.kt │ │ │ ├── JobUtils.kt │ │ │ ├── LogMatcher.kt │ │ │ ├── LoggerDsl.kt │ │ │ ├── Logging.kt │ │ │ ├── TestDataGenerators.kt │ │ │ └── WaitUtils.kt │ ├── js │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── tests │ │ │ └── utils │ │ │ └── NodeFetchOptionsTest.kt │ └── jvm │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── client │ │ │ └── tests │ │ │ ├── HttpClientTest.kt │ │ │ ├── HttpsTest.kt │ │ │ └── utils │ │ │ └── TestWithKtor.kt │ │ ├── test-resources │ │ └── logback.xml │ │ └── test │ │ └── io │ │ └── ktor │ │ └── client │ │ └── tests │ │ ├── BuildersTest.kt │ │ ├── CookiesAndRedirectMockedTest.kt │ │ ├── DefaultTransformJvmTest.kt │ │ ├── ExceptionsJvmTest.kt │ │ ├── FileCacheTest.kt │ │ ├── FormsTest.kt │ │ ├── HttpRedirectMockedTest.kt │ │ ├── JvmContentTest.kt │ │ ├── LoggingTestJvm.kt │ │ ├── MultithreadedTest.kt │ │ └── WebSocketJvmTest.kt └── ktor-client-winhttp │ ├── api │ └── ktor-client-winhttp.klib.api │ ├── build.gradle.kts │ └── windows │ ├── interop │ └── winhttp.def │ ├── src │ └── io │ │ └── ktor │ │ └── client │ │ └── engine │ │ └── winhttp │ │ ├── WinHttp.kt │ │ ├── WinHttpClientEngine.kt │ │ ├── WinHttpClientEngineConfig.kt │ │ ├── WinHttpSecurityProtocol.kt │ │ └── internal │ │ ├── WinHttpCallback.kt │ │ ├── WinHttpChunkedMode.kt │ │ ├── WinHttpConnect.kt │ │ ├── WinHttpCoroutine.kt │ │ ├── WinHttpExceptions.kt │ │ ├── WinHttpRequest.kt │ │ ├── WinHttpRequestProducer.kt │ │ ├── WinHttpResponseConsumer.kt │ │ ├── WinHttpResponseData.kt │ │ ├── WinHttpSession.kt │ │ └── WinHttpWebSocket.kt │ └── test │ └── io │ └── ktor │ └── client │ └── engine │ └── winhttp │ ├── WinHttpProxyTest.kt │ ├── WinHttpTests.kt │ ├── WinHttpWebSocketTests.kt │ └── internal │ └── WinHttpExceptionsTest.kt ├── ktor-dokka ├── assets │ └── logo-icon.svg └── build.gradle.kts ├── ktor-http ├── api │ ├── ktor-http.api │ └── ktor-http.klib.api ├── build.gradle.kts ├── common │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ ├── content │ │ │ └── Compatibility.kt │ │ │ └── http │ │ │ ├── ApplicationResponseProperties.kt │ │ │ ├── CacheControl.kt │ │ │ ├── Codecs.kt │ │ │ ├── ContentDisposition.kt │ │ │ ├── ContentRange.kt │ │ │ ├── ContentTypeMatcher.kt │ │ │ ├── ContentTypes.kt │ │ │ ├── Cookie.kt │ │ │ ├── CookieUtils.kt │ │ │ ├── DateUtils.kt │ │ │ ├── FileContentType.kt │ │ │ ├── HeaderValueWithParameters.kt │ │ │ ├── Headers.kt │ │ │ ├── HttpHeaderValueParser.kt │ │ │ ├── HttpHeaders.kt │ │ │ ├── HttpMessage.kt │ │ │ ├── HttpMessageProperties.kt │ │ │ ├── HttpMethod.kt │ │ │ ├── HttpProtocolVersion.kt │ │ │ ├── HttpStatusCode.kt │ │ │ ├── HttpUrlEncoded.kt │ │ │ ├── IpParser.kt │ │ │ ├── LinkHeader.kt │ │ │ ├── Mimes.kt │ │ │ ├── Parameters.kt │ │ │ ├── Query.kt │ │ │ ├── Ranges.kt │ │ │ ├── RangesSpecifier.kt │ │ │ ├── RequestConnectionPoint.kt │ │ │ ├── URLBuilder.kt │ │ │ ├── URLParser.kt │ │ │ ├── URLProtocol.kt │ │ │ ├── URLUtils.kt │ │ │ ├── Url.kt │ │ │ ├── UrlDecodedParametersBuilder.kt │ │ │ ├── auth │ │ │ ├── AuthScheme.kt │ │ │ ├── HeaderValueEncoding.kt │ │ │ └── HttpAuthHeader.kt │ │ │ ├── content │ │ │ ├── ByteArrayContent.kt │ │ │ ├── CachingOptions.kt │ │ │ ├── ChannelWriterContent.kt │ │ │ ├── CompressedContent.kt │ │ │ ├── Multipart.kt │ │ │ ├── OutgoingContent.kt │ │ │ ├── TextContent.kt │ │ │ └── Versions.kt │ │ │ ├── header │ │ │ └── AcceptEncoding.kt │ │ │ ├── parsing │ │ │ ├── Debug.kt │ │ │ ├── GrammarBuilder.kt │ │ │ ├── ParseException.kt │ │ │ ├── Parser.kt │ │ │ ├── ParserDsl.kt │ │ │ ├── Primitives.kt │ │ │ └── regex │ │ │ │ ├── RegexParser.kt │ │ │ │ └── RegexParserGenerator.kt │ │ │ └── websocket │ │ │ └── Utils.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── http │ │ ├── AuthHeaderParseTest.kt │ │ ├── CodecTest.kt │ │ ├── CommonHeadersTest.kt │ │ ├── ContentDispositionTest.kt │ │ ├── ContentTypeLookupTest.kt │ │ ├── ContentTypeMatchTest.kt │ │ ├── ContentTypeTest.kt │ │ ├── CookieDateParserTest.kt │ │ ├── HttpStatusCodeTest.kt │ │ ├── MimesTest.kt │ │ ├── QueryParametersTest.kt │ │ ├── RangesTest.kt │ │ ├── RenderSetCookieTest.kt │ │ ├── URLBuilderTest.kt │ │ ├── UrlDecodedParametersBuilderTest.kt │ │ ├── UrlEncodeTest.kt │ │ ├── UrlTest.kt │ │ └── header │ │ └── AcceptEncodingTest.kt ├── jsAndWasmShared │ └── src │ │ └── io │ │ └── ktor │ │ └── http │ │ └── URLBuilderJs.kt ├── jvm │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── http │ │ │ ├── FileContentTypeJvm.kt │ │ │ ├── HttpMessagePropertiesJvm.kt │ │ │ ├── URLBuilderJvm.kt │ │ │ ├── URLUtilsJvm.kt │ │ │ └── content │ │ │ ├── BlockingBridge.kt │ │ │ ├── MultipartJvm.kt │ │ │ ├── OutputStreamContent.kt │ │ │ ├── URIFileContent.kt │ │ │ ├── VersionsJvm.kt │ │ │ └── WriterContent.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── http │ │ ├── SerializableTest.kt │ │ ├── URLBuilderTest.kt │ │ └── content │ │ └── MultipartJvmTest.kt ├── ktor-http-cio │ ├── api │ │ ├── ktor-http-cio.api │ │ └── ktor-http-cio.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── http │ │ │ │ └── cio │ │ │ │ ├── CIOHeaders.kt │ │ │ │ ├── CIOMultipartDataBase.kt │ │ │ │ ├── ChunkedTransferEncoding.kt │ │ │ │ ├── ConnectionOptions.kt │ │ │ │ ├── HttpBody.kt │ │ │ │ ├── HttpHeadersMap.kt │ │ │ │ ├── HttpParser.kt │ │ │ │ ├── Multipart.kt │ │ │ │ ├── RequestResponse.kt │ │ │ │ ├── RequestResponseBuilderCommon.kt │ │ │ │ └── internals │ │ │ │ ├── AsciiCharTree.kt │ │ │ │ ├── CharArrayBuilder.kt │ │ │ │ ├── CharArrayPool.kt │ │ │ │ ├── Chars.kt │ │ │ │ ├── Errors.kt │ │ │ │ ├── MutableRange.kt │ │ │ │ └── Tokenizer.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── http │ │ │ └── cio │ │ │ ├── CharArrayBuilderTest.kt │ │ │ ├── HeaderParserTest.kt │ │ │ ├── HttpHeadersMapTest.kt │ │ │ ├── HttpParserTestUtils.kt │ │ │ ├── RequestParserTest.kt │ │ │ └── ResponseParserTest.kt │ ├── doc │ │ ├── CIO HTTP server job relations.pdf │ │ └── CIO HTTP server job relations.xml │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── http │ │ │ └── cio │ │ │ ├── MultipartJsAndWasm.kt │ │ │ ├── RequestResponseBuilderJs.kt │ │ │ └── internals │ │ │ └── CharArrayPoolJs.kt │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── http │ │ │ │ └── cio │ │ │ │ ├── RequestResponseBuilder.kt │ │ │ │ └── internals │ │ │ │ └── CharArrayPoolJvm.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── http │ │ │ └── cio │ │ │ ├── ChunkedTest.kt │ │ │ ├── HeadersJvmTest.kt │ │ │ ├── MultipartTest.kt │ │ │ └── RequestResponseBuilderTest.kt │ ├── jvmAndPosix │ │ └── src │ │ │ └── MultipartJvmAndPosix.kt │ └── posix │ │ └── src │ │ └── io │ │ └── ktor │ │ └── http │ │ └── cio │ │ ├── RequestResponseBuilderNative.kt │ │ └── internals │ │ └── CharArrayPoolPosix.kt └── posix │ └── src │ └── io │ └── ktor │ └── http │ └── URLBuilderPosix.kt ├── ktor-io ├── androidNative │ └── src │ │ └── Charset.androidNative.kt ├── api │ ├── ktor-io.api │ └── ktor-io.klib.api ├── build.gradle.kts ├── common │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── utils │ │ │ └── io │ │ │ ├── Annotations.kt │ │ │ ├── BufferedByteWriteChannel.kt │ │ │ ├── ByteChannel.kt │ │ │ ├── ByteChannelCtor.kt │ │ │ ├── ByteChannelScanner.kt │ │ │ ├── ByteChannelUtils.kt │ │ │ ├── ByteReadChannel.kt │ │ │ ├── ByteReadChannelOperations.kt │ │ │ ├── ByteWriteChannel.kt │ │ │ ├── ByteWriteChannelOperations.kt │ │ │ ├── CloseHookByteWriteChannel.kt │ │ │ ├── CloseToken.kt │ │ │ ├── CountedByteReadChannel.kt │ │ │ ├── CountedByteWriteChannel.kt │ │ │ ├── Deprecation.kt │ │ │ ├── Exceptions.kt │ │ │ ├── JvmSerializable.kt │ │ │ ├── LineEndingMode.kt │ │ │ ├── SinkByteWriteChannel.kt │ │ │ ├── SourceByteReadChannel.kt │ │ │ ├── bits │ │ │ └── ByteOrder.kt │ │ │ ├── charsets │ │ │ └── Encoding.kt │ │ │ ├── core │ │ │ ├── Buffer.kt │ │ │ ├── BufferAppend.kt │ │ │ ├── Buffers.kt │ │ │ ├── Builder.kt │ │ │ ├── ByteOrder.kt │ │ │ ├── BytePacketBuilder.kt │ │ │ ├── ByteReadPacket.kt │ │ │ ├── Closeable.kt │ │ │ ├── Copy.kt │ │ │ ├── Input.kt │ │ │ ├── Memory.kt │ │ │ ├── Output.kt │ │ │ ├── Packet.kt │ │ │ ├── Strings.kt │ │ │ └── internal │ │ │ │ ├── CharArraySequence.kt │ │ │ │ ├── ChunkBuffer.kt │ │ │ │ └── Numbers.kt │ │ │ ├── errors │ │ │ └── Exceptions.kt │ │ │ ├── locks │ │ │ └── Synchronized.kt │ │ │ └── pool │ │ │ ├── ByteArrayPool.kt │ │ │ └── Pool.kt │ └── test │ │ ├── ByteChannelTest.kt │ │ ├── ByteReadChannelOperationsTest.kt │ │ ├── CoroutinesTest.kt │ │ ├── ReadUtf8LineTest.kt │ │ ├── SinkByteWriteChannelTest.kt │ │ └── WriterReaderTest.kt ├── darwin │ └── src │ │ └── CharsetDarwin.kt ├── js │ └── src │ │ └── io │ │ └── ktor │ │ └── utils │ │ └── io │ │ ├── charsets │ │ ├── Charset.js.kt │ │ ├── Decoder.js.kt │ │ ├── TextDecoder.js.kt │ │ ├── TextDecoderFallback.js.kt │ │ └── TextEncoder.js.kt │ │ └── core │ │ ├── ByteOrderJS.kt │ │ └── Closeable.js.kt ├── jsAndWasmShared │ └── src │ │ └── io │ │ └── ktor │ │ └── utils │ │ └── io │ │ ├── ByteChannel.jsAndWasmShared.kt │ │ ├── JvmSerializable.jsAndWasmShared.kt │ │ ├── bits │ │ └── ByteOrderJs.kt │ │ ├── charsets │ │ ├── DecodeUtils.kt │ │ ├── ISO88591.kt │ │ └── Win1252Table.kt │ │ ├── locks │ │ └── Synchronized.kt │ │ └── pool │ │ └── DefaultPool.kt ├── jvm │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── utils │ │ │ └── io │ │ │ ├── ByteChannel.jvm.kt │ │ │ ├── ByteReadChannelOperations.jvm.kt │ │ │ ├── ByteWriteChannelOperations.jvm.kt │ │ │ ├── JvmSerializable.jvm.kt │ │ │ ├── LookAheadSession.kt │ │ │ ├── bits │ │ │ └── ByteOrderJvm.kt │ │ │ ├── charsets │ │ │ └── CharsetJVM.kt │ │ │ ├── core │ │ │ ├── BufferPrimitivesJvm.kt │ │ │ ├── ByteOrderJVM.kt │ │ │ ├── BytePacketBuilderExtensions.jvm.kt │ │ │ ├── ByteReadPacketExtensions.jvm.kt │ │ │ ├── Closeable.jvm.kt │ │ │ ├── OutputArraysJVM.kt │ │ │ └── internal │ │ │ │ └── ChunkBufferJvm.kt │ │ │ ├── jvm │ │ │ ├── javaio │ │ │ │ ├── Blocking.kt │ │ │ │ ├── Reading.kt │ │ │ │ └── Writing.kt │ │ │ └── nio │ │ │ │ ├── Reading.kt │ │ │ │ └── WriteSuspendSession.kt │ │ │ ├── locks │ │ │ └── Synchronized.kt │ │ │ ├── pool │ │ │ ├── ByteBufferPools.kt │ │ │ └── DefaultPool.kt │ │ │ └── streams │ │ │ └── Streams.kt │ └── test │ │ ├── ByteChannelConcurrentTest.kt │ │ ├── ByteReadChannelOperationsJvmTest.kt │ │ ├── ByteReadChannelReadTest.jvm.kt │ │ ├── ByteReadPacketExtensionsJvmTest.kt │ │ ├── LookAheadSessionTest.kt │ │ └── io │ │ └── ktor │ │ └── utils │ │ └── io │ │ └── jvm │ │ └── nio │ │ └── ReadingTest.kt ├── jvmAndPosix │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── utils │ │ │ └── io │ │ │ ├── ByteReadChannelSource.kt │ │ │ └── ByteWriteChannelSink.kt │ └── test │ │ ├── ByteReadChannelSourceTest.kt │ │ ├── ByteWriteChannelSinkTest.kt │ │ └── ByteWriteLargeTransfersTest.kt ├── linux │ └── src │ │ └── CharsetLinux.kt ├── mingwX64 │ └── src │ │ └── CharsetMingw.kt ├── posix │ ├── interop │ │ └── mutex.def │ └── src │ │ └── io │ │ └── ktor │ │ └── utils │ │ └── io │ │ ├── ByteChannel.posix.kt │ │ ├── ByteReadChannelOperations.posix.kt │ │ ├── ByteWriteChannelOperations.posix.kt │ │ ├── Input.posix.kt │ │ ├── JvmSerializable.posix.kt │ │ ├── bits │ │ └── ByteOrderNative.kt │ │ ├── charsets │ │ └── CharsetNative.kt │ │ ├── core │ │ ├── ByteOrderNative.kt │ │ ├── BytePacketBuilderOperations.posix.kt │ │ └── Closeable.posix.kt │ │ ├── errors │ │ └── PosixErrors.kt │ │ ├── locks │ │ └── Synchronized.kt │ │ └── pool │ │ └── DefaultPool.posix.kt └── wasmJs │ └── src │ └── io │ └── ktor │ └── utils │ └── io │ ├── charsets │ ├── Decoder.kt │ ├── Encoding.wasmJs.kt │ ├── ISO8859TextDecoder.kt │ ├── JsTextDecoder.kt │ ├── TextEncoder.kt │ └── TypedArrays.kt │ └── core │ ├── ByteOrder.wasmJs.kt │ └── Closeable.wasmJs.kt ├── ktor-java-modules-test ├── .gitignore └── build.gradle.kts ├── ktor-network ├── androidNative │ ├── interop │ │ └── un.def │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtils.androidNative.kt ├── androidNative32 │ └── src │ │ └── SocketUtils.androidNative32.kt ├── androidNative64 │ └── src │ │ └── SocketUtils.androidNative64.kt ├── api │ ├── ktor-network.api │ └── ktor-network.klib.api ├── build.gradle.kts ├── common │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ ├── selector │ │ │ ├── Selectable.kt │ │ │ ├── SelectableBaseCommon.kt │ │ │ └── SelectorManagerCommon.kt │ │ │ └── sockets │ │ │ ├── Builders.kt │ │ │ ├── Datagram.kt │ │ │ ├── SocketAddress.kt │ │ │ ├── SocketBase.kt │ │ │ ├── SocketEngine.kt │ │ │ ├── SocketOptions.kt │ │ │ ├── Sockets.kt │ │ │ ├── TcpSocketBuilder.kt │ │ │ ├── TypeOfService.kt │ │ │ └── UDPSocketBuilder.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── tests │ │ ├── TCPSocketTest.kt │ │ ├── TestUtils.kt │ │ └── UnixSocketTest.kt ├── darwin │ ├── interop │ │ └── un.def │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtils.darwin.kt ├── gradle.properties ├── ios │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtilsIos.kt ├── js │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── nodejs │ │ └── node.net.js.kt ├── jsAndWasmShared │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ ├── selector │ │ │ ├── Selectable.jsAndWasmShared.kt │ │ │ └── SelectorManager.jsAndWasmShared.kt │ │ │ └── sockets │ │ │ ├── ServerSocketContext.kt │ │ │ ├── SocketAddress.nonJvm.jsAndWasmShared.kt │ │ │ ├── SocketContext.kt │ │ │ ├── SocketEngine.jsAndWasmShared.kt │ │ │ └── nodejs │ │ │ └── node.net.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── tests │ │ └── TestUtils.jsAndWasmShared.kt ├── jvm │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ ├── selector │ │ │ ├── ActorSelectorManager.kt │ │ │ ├── InterestSuspensionsMap.kt │ │ │ ├── JvmSelector.kt │ │ │ ├── LockFreeMPSCQueue.kt │ │ │ ├── SelectableBase.kt │ │ │ ├── SelectorManager.kt │ │ │ └── SelectorManagerSupport.kt │ │ │ ├── sockets │ │ │ ├── CIOReader.kt │ │ │ ├── CIOWriter.kt │ │ │ ├── ConnectUtilsJvm.kt │ │ │ ├── DatagramSendChannel.kt │ │ │ ├── DatagramSocketImpl.kt │ │ │ ├── JavaSocketAddressUtils.kt │ │ │ ├── JavaSocketOptions.kt │ │ │ ├── NIOSocketImpl.kt │ │ │ ├── ServerSocketImpl.kt │ │ │ ├── SocketAddressJvm.kt │ │ │ ├── SocketImpl.kt │ │ │ ├── SocketOptionsPlatformCapabilities.kt │ │ │ ├── SocketTimeoutException.kt │ │ │ └── UDPSocketBuilderJvm.kt │ │ │ └── util │ │ │ ├── Pools.kt │ │ │ └── Utils.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ ├── selector │ │ └── ActorSelectorManagerTest.kt │ │ ├── sockets │ │ └── tests │ │ │ ├── ClientSocketTest.kt │ │ │ ├── ServerSocketTest.kt │ │ │ ├── TestUtilsJvm.kt │ │ │ └── UDPSocketTestJvm.kt │ │ └── util │ │ └── StartTimeoutTest.kt ├── jvmAndPosix │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── tests │ │ └── UDPSocketTest.kt ├── ktor-network-tls │ ├── api │ │ ├── ktor-network-tls.api │ │ └── ktor-network-tls.klib.api │ ├── build.gradle.kts │ ├── common │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ └── tls │ │ │ ├── CipherSuites.kt │ │ │ ├── OID.kt │ │ │ ├── TLSClientSession.kt │ │ │ ├── TLSCommon.kt │ │ │ ├── TLSConfig.kt │ │ │ ├── TLSConfigBuilderCommon.kt │ │ │ └── extensions │ │ │ ├── NamedCurves.kt │ │ │ ├── PointFormat.kt │ │ │ ├── SignatureAlgorithm.kt │ │ │ └── TLSExtension.kt │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── network │ │ │ │ └── tls │ │ │ │ ├── CertificateInfo.kt │ │ │ │ ├── CertificateType.kt │ │ │ │ ├── CipherSuitesJvm.kt │ │ │ │ ├── EncryptionInfo.kt │ │ │ │ ├── Hashes.kt │ │ │ │ ├── Headers.kt │ │ │ │ ├── HostnameUtils.kt │ │ │ │ ├── Keys.kt │ │ │ │ ├── Parser.kt │ │ │ │ ├── Render.kt │ │ │ │ ├── TLS.kt │ │ │ │ ├── TLSAlert.kt │ │ │ │ ├── TLSClientHandshake.kt │ │ │ │ ├── TLSClientSessionJvm.kt │ │ │ │ ├── TLSConfigBuilder.kt │ │ │ │ ├── TLSConfigJvm.kt │ │ │ │ ├── TLSHandshakeType.kt │ │ │ │ ├── TLSRecordType.kt │ │ │ │ ├── TLSVersion.kt │ │ │ │ ├── Utils.kt │ │ │ │ ├── cipher │ │ │ │ ├── CBCCipher.kt │ │ │ │ ├── Cipher.kt │ │ │ │ ├── CipherUtils.kt │ │ │ │ └── GCMCipher.kt │ │ │ │ └── platform │ │ │ │ └── PlatformVersion.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ └── tls │ │ │ ├── ClientCertificateRequestTest.kt │ │ │ ├── ConnectionTest.kt │ │ │ ├── HostnameUtilsTest.kt │ │ │ └── TLSConfigBuilderTest.kt │ ├── ktor-network-tls-certificates │ │ ├── api │ │ │ ├── ktor-network-tls-certificates.api │ │ │ └── ktor-network-tls-certificates.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── network │ │ │ │ └── tls │ │ │ │ └── certificates │ │ │ │ ├── Certificates.kt │ │ │ │ └── builders.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ └── tls │ │ │ └── certificates │ │ │ ├── CertificatesTest.kt │ │ │ ├── KeyStoreBuilderTest.kt │ │ │ ├── TestUtils.kt │ │ │ └── TimeMocks.kt │ └── nonJvm │ │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── tls │ │ ├── CipherSuites.nonJvm.kt │ │ ├── TLS.nonJvm.kt │ │ ├── TLSClientSession.nonJvm.kt │ │ ├── TLSConfig.nonJvm.kt │ │ └── TLSConfigBuilder.nonJvm.kt ├── linux │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtils.linux.kt ├── macos │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtilsMacos.kt ├── nix │ ├── interop │ │ └── network.def │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ ├── selector │ │ │ ├── SelectUtilsNix.kt │ │ │ └── SignalPoint.kt │ │ │ ├── sockets │ │ │ └── SocketAddress.nonJvm.nix.kt │ │ │ └── util │ │ │ ├── NativeSocketAddressNix.kt │ │ │ └── SocketUtils.nix.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── tests │ │ ├── SelectNixTest.kt │ │ ├── TcpSocketTestNix.kt │ │ ├── TestUtils.nix.kt │ │ └── UdpSocketTestNix.kt ├── nonJvm │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ ├── SocketAddress.nonJvm.kt │ │ └── SocketTimeoutException.kt ├── posix │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── network │ │ │ ├── selector │ │ │ ├── EventInfo.kt │ │ │ ├── SelectUtils.kt │ │ │ ├── SelectableNative.kt │ │ │ ├── SelectorManager.kt │ │ │ └── WorkerSelectorManager.kt │ │ │ ├── sockets │ │ │ ├── CIOReader.kt │ │ │ ├── CIOWriter.kt │ │ │ ├── ConnectUtilsNative.kt │ │ │ ├── DatagramSendChannel.kt │ │ │ ├── DatagramSocketNative.kt │ │ │ ├── NativeSocketImpl.kt │ │ │ ├── NativeSocketOptions.kt │ │ │ ├── SocketAddress.nonJvm.posix.kt │ │ │ ├── TCPServerSocketNative.kt │ │ │ ├── TCPSocketBuilderNative.kt │ │ │ ├── TCPSocketNative.kt │ │ │ └── UDPSocketBuilderNative.kt │ │ │ └── util │ │ │ ├── NativeSocketAddress.kt │ │ │ ├── NativeUtils.kt │ │ │ ├── Pools.kt │ │ │ ├── SocketAddressUtils.kt │ │ │ └── SocketUtils.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── tests │ │ ├── IPStringParseTest.kt │ │ └── UDPSocketTestPosix.kt ├── tvos │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtilsTvos.kt ├── wasmJs │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── sockets │ │ └── nodejs │ │ └── node.net.wasmJs.kt ├── watchos │ └── src │ │ └── io │ │ └── ktor │ │ └── network │ │ └── util │ │ └── SocketUtilsWatchos.kt └── windows │ ├── interop │ └── afunix.def │ ├── src │ └── io │ │ └── ktor │ │ └── network │ │ ├── selector │ │ ├── SelectUtilsWindows.kt │ │ └── SignalPoint.kt │ │ ├── sockets │ │ └── SocketAddress.nonJvm.windows.kt │ │ └── util │ │ ├── NativeSocketAddressWindows.kt │ │ └── SocketUtilsWindows.kt │ └── test │ └── io │ └── ktor │ └── network │ └── sockets │ └── tests │ └── TestUtils.windows.kt ├── ktor-server ├── api │ ├── ktor-server.api │ └── ktor-server.klib.api ├── build.gradle.kts ├── common │ └── src │ │ └── Stub.kt ├── gradle.properties ├── jvm │ └── .gitignore ├── ktor-server-cio │ ├── api │ │ ├── ktor-server-cio.api │ │ └── ktor-server-cio.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── cio │ │ │ │ ├── CIO.kt │ │ │ │ ├── CIOApplicationCall.kt │ │ │ │ ├── CIOApplicationEngine.kt │ │ │ │ ├── CIOApplicationRequest.kt │ │ │ │ ├── CIOApplicationResponse.kt │ │ │ │ ├── EngineMain.kt │ │ │ │ ├── HttpServer.kt │ │ │ │ ├── Pipeline.kt │ │ │ │ ├── UnixSocketConnectorConfig.kt │ │ │ │ ├── backend │ │ │ │ ├── HttpServer.kt │ │ │ │ ├── ServerIncomingConnection.kt │ │ │ │ ├── ServerPipeline.kt │ │ │ │ ├── ServerRequestScope.kt │ │ │ │ ├── SocketAddressUtils.kt │ │ │ │ └── UnixSocketServer.kt │ │ │ │ └── internal │ │ │ │ └── CoroutineUtils.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── server │ │ │ └── cio │ │ │ ├── CIOConnectionPointTest.kt │ │ │ ├── CIOEngineTest.kt │ │ │ ├── CIOWebSocketTest.kt │ │ │ ├── RAWExample.kt │ │ │ └── TestConnectorInterfaceUsed.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── cio │ │ │ └── internal │ │ │ └── CoroutineUtils.jsAndWasmShared.kt │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── cio │ │ │ │ ├── backend │ │ │ │ └── SocketAddressUtilsJvm.kt │ │ │ │ └── internal │ │ │ │ └── CoroutineUtilsJvm.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── server │ │ │ └── cio │ │ │ ├── CIOClientCertTest.kt │ │ │ ├── CIOEngineTestJvm.kt │ │ │ ├── CIOHttpClientTest.kt │ │ │ ├── CIOUnixSocketServerTest.kt │ │ │ ├── CIOWebSocketTestJvm.kt │ │ │ ├── ClassCastExceptionTest.kt │ │ │ ├── IntegrationTest.kt │ │ │ ├── ServerPipelineTest.kt │ │ │ └── TestHttpServer.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── cio │ │ │ └── backend │ │ │ └── SocketAddressUtils.nonJvm.kt │ └── posix │ │ └── src │ │ └── io │ │ └── ktor │ │ └── server │ │ └── cio │ │ └── internal │ │ └── CoroutineUtilsNix.kt ├── ktor-server-config-yaml │ ├── api │ │ ├── ktor-server-config-yaml.api │ │ └── ktor-server-config-yaml.klib.api │ ├── build.gradle.kts │ ├── gradle.properties │ ├── jvm │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── io.ktor.server.config.ConfigLoader │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── config │ │ │ │ └── yaml │ │ │ │ └── YamlConfigJvm.kt │ │ ├── test-resources │ │ │ ├── application-custom.yaml │ │ │ ├── application-no-env.yaml │ │ │ └── application.yaml │ │ └── test │ │ │ └── YamlConfigTestJvm.kt │ ├── jvmAndPosix │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── config │ │ │ │ └── yaml │ │ │ │ └── YamlConfig.kt │ │ └── test │ │ │ └── YamlConfigTest.kt │ └── posix │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── config │ │ │ └── yaml │ │ │ └── YamlConfigNix.kt │ │ └── test │ │ └── YamlConfigTestNix.kt ├── ktor-server-core │ ├── api │ │ ├── ktor-server-core.api │ │ └── ktor-server-core.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ ├── application │ │ │ │ ├── Application.kt │ │ │ │ ├── ApplicationCallPipeline.kt │ │ │ │ ├── ApplicationConfigExtensions.kt │ │ │ │ ├── ApplicationEvents.kt │ │ │ │ ├── ApplicationPlugin.kt │ │ │ │ ├── CommonApplicationEnvironment.kt │ │ │ │ ├── CreatePluginUtils.kt │ │ │ │ ├── DefaultApplicationEvents.kt │ │ │ │ ├── Hook.kt │ │ │ │ ├── Interceptions.kt │ │ │ │ ├── KtorCallContexts.kt │ │ │ │ ├── PipelineCall.kt │ │ │ │ ├── PluginBuilder.kt │ │ │ │ ├── PluginExceptions.kt │ │ │ │ ├── PluginInstance.kt │ │ │ │ ├── RouteScopedPlugin.kt │ │ │ │ ├── RouteScopedPluginBuilder.kt │ │ │ │ ├── debug │ │ │ │ │ ├── DebugPhaseNames.kt │ │ │ │ │ └── Utils.kt │ │ │ │ ├── hooks │ │ │ │ │ └── CommonHooks.kt │ │ │ │ └── internal │ │ │ │ │ └── TypeUtils.kt │ │ │ │ ├── config │ │ │ │ ├── ApplicationConfig.kt │ │ │ │ ├── ConfigLoaders.kt │ │ │ │ ├── MapApplicationConfig.kt │ │ │ │ ├── MapConfigDecoder.kt │ │ │ │ └── MergedApplicationConfig.kt │ │ │ │ ├── engine │ │ │ │ ├── ApplicationEngine.kt │ │ │ │ ├── ApplicationEnvironmentBuilder.kt │ │ │ │ ├── BaseApplicationCall.kt │ │ │ │ ├── BaseApplicationEngine.kt │ │ │ │ ├── BaseApplicationRequest.kt │ │ │ │ ├── BaseApplicationResponse.kt │ │ │ │ ├── CommandLine.kt │ │ │ │ ├── DefaultEnginePipeline.kt │ │ │ │ ├── DefaultTransform.kt │ │ │ │ ├── DefaultUncaughtExceptionHandler.kt │ │ │ │ ├── EmbeddedServer.kt │ │ │ │ ├── EngineConnectorConfig.kt │ │ │ │ ├── EngineContextCancellationHelper.kt │ │ │ │ ├── EnginePipeline.kt │ │ │ │ ├── Long.kt │ │ │ │ ├── ServerEngineUtils.kt │ │ │ │ ├── ShutdownHook.kt │ │ │ │ └── internal │ │ │ │ │ ├── ApplicationUtils.kt │ │ │ │ │ ├── EngineUtils.kt │ │ │ │ │ ├── ExceptionPageContent.kt │ │ │ │ │ └── ExceptionUtils.kt │ │ │ │ ├── http │ │ │ │ ├── LinkHeader.kt │ │ │ │ ├── Push.kt │ │ │ │ └── content │ │ │ │ │ ├── DefaultTransform.kt │ │ │ │ │ ├── HttpStatusCodeContent.kt │ │ │ │ │ └── SuppressionAttribute.kt │ │ │ │ ├── logging │ │ │ │ └── Logging.kt │ │ │ │ ├── plugins │ │ │ │ ├── Errors.kt │ │ │ │ └── OriginConnectionPoint.kt │ │ │ │ ├── request │ │ │ │ ├── ApplicationReceiveFunctions.kt │ │ │ │ ├── ApplicationRequestProperties.kt │ │ │ │ ├── PipelineRequest.kt │ │ │ │ └── RequestCookies.kt │ │ │ │ ├── response │ │ │ │ ├── ApplicationResponseFunctions.kt │ │ │ │ ├── ApplicationResponseProperties.kt │ │ │ │ ├── ApplicationSendPipeline.kt │ │ │ │ ├── DefaultResponsePushBuilder.kt │ │ │ │ ├── PipelineResponse.kt │ │ │ │ ├── ResponseCookies.kt │ │ │ │ ├── ResponseHeaders.kt │ │ │ │ ├── ResponsePushBuilder.kt │ │ │ │ ├── ResponseType.kt │ │ │ │ └── UseHttp2Push.kt │ │ │ │ ├── routing │ │ │ │ ├── HostsRoutingBuilder.kt │ │ │ │ ├── IgnoreTrailingSlash.kt │ │ │ │ ├── LocalPortRoutingBuilder.kt │ │ │ │ ├── RegexRouting.kt │ │ │ │ ├── RouteSelector.kt │ │ │ │ ├── RoutingBuilder.kt │ │ │ │ ├── RoutingIntrospection.kt │ │ │ │ ├── RoutingNode.kt │ │ │ │ ├── RoutingPath.kt │ │ │ │ ├── RoutingPipelineCall.kt │ │ │ │ ├── RoutingResolveContext.kt │ │ │ │ ├── RoutingResolveResult.kt │ │ │ │ ├── RoutingResolveTrace.kt │ │ │ │ └── RoutingRoot.kt │ │ │ │ └── util │ │ │ │ ├── CopyOnWriteHashMap.kt │ │ │ │ ├── Parameters.kt │ │ │ │ ├── Paths.kt │ │ │ │ └── URLBuilder.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ ├── application │ │ │ ├── ApplicationCallReceiveTest.kt │ │ │ ├── ApplicationPluginTest.kt │ │ │ ├── HooksTest.kt │ │ │ └── RouteScopedPluginTest.kt │ │ │ ├── config │ │ │ ├── MapApplicationConfigTest.kt │ │ │ ├── MapDecoderTest.kt │ │ │ └── MergedApplicationConfigTest.kt │ │ │ ├── engine │ │ │ ├── CommandLineConfigTest.kt │ │ │ └── EnvironmentUtilsTest.kt │ │ │ ├── http │ │ │ ├── ParametersTest.kt │ │ │ └── PathNormalizationTest.kt │ │ │ ├── logging │ │ │ └── MDCProviderTest.kt │ │ │ ├── routing │ │ │ ├── RegexRoutingTest.kt │ │ │ ├── RouteSelectorTest.kt │ │ │ └── RouteTest.kt │ │ │ └── utils │ │ │ └── CopyOnWriteHashMapTest.kt │ ├── js │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── engine │ │ │ └── EnvironmentUtils.js.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ ├── engine │ │ │ ├── DefaultTransform.jsAndWasmShared.kt │ │ │ ├── EmbeddedServer.jsAndWasmShared.kt │ │ │ ├── EnvironmentUtils.jsAndWasmShared.kt │ │ │ ├── ShutdownHook.jsAndWasmShared.kt │ │ │ └── internal │ │ │ │ ├── ApplicationUtils.jsAndWasmShared.kt │ │ │ │ └── EngineUtils.jsAndWasmShared.kt │ │ │ └── request │ │ │ └── ApplicationReceiveFunctions.jsAndWasmShared.kt │ ├── jvm │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── io.ktor.server.config.ConfigLoader │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ ├── application │ │ │ │ ├── ApplicationEnvironment.kt │ │ │ │ ├── ModuleParametersInjector.kt │ │ │ │ └── internal │ │ │ │ │ └── TypeUtilsJvm.kt │ │ │ │ ├── config │ │ │ │ ├── ConfigLoadersJvm.kt │ │ │ │ ├── HoconApplicationConfig.kt │ │ │ │ └── HoconDecoder.kt │ │ │ │ ├── engine │ │ │ │ ├── ApplicationEngineJvm.kt │ │ │ │ ├── ApplicationEnvironmentJvm.kt │ │ │ │ ├── ClassLoaders.kt │ │ │ │ ├── DefaultTransformJvm.kt │ │ │ │ ├── EmbeddedServerJvm.kt │ │ │ │ ├── EngineConnectorConfigJvm.kt │ │ │ │ ├── EnvironmentUtilsJvm.kt │ │ │ │ ├── OverridingClassLoader.kt │ │ │ │ ├── ServerHostUtils.kt │ │ │ │ ├── ShutDownUrl.kt │ │ │ │ ├── ShutdownHookJvm.kt │ │ │ │ └── internal │ │ │ │ │ ├── ApplicationUtilsJvm.kt │ │ │ │ │ ├── AutoReloadUtils.kt │ │ │ │ │ ├── CallableUtils.kt │ │ │ │ │ ├── EngineUtilsJvm.kt │ │ │ │ │ └── ExceptionUtilsJvm.kt │ │ │ │ ├── http │ │ │ │ ├── HttpDateJvm.kt │ │ │ │ └── content │ │ │ │ │ ├── CachingOptionsJvm.kt │ │ │ │ │ ├── DefaultTransformJvm.kt │ │ │ │ │ ├── JarFileContent.kt │ │ │ │ │ ├── LastModifiedJavaTime.kt │ │ │ │ │ ├── LocalFileContent.kt │ │ │ │ │ ├── PreCompressed.kt │ │ │ │ │ ├── SinglePageApplication.kt │ │ │ │ │ ├── StaticContent.kt │ │ │ │ │ └── StaticContentResolution.kt │ │ │ │ ├── request │ │ │ │ └── ApplicationReceiveFunctionsJvm.kt │ │ │ │ ├── response │ │ │ │ ├── ApplicationResponseFunctionsJvm.kt │ │ │ │ └── ApplicationResponsePropertiesJvm.kt │ │ │ │ └── util │ │ │ │ └── DateUtilsJvm.kt │ │ ├── test-resources │ │ │ ├── application-additional.conf │ │ │ ├── application-main.conf │ │ │ ├── application.conf │ │ │ ├── application.yaml │ │ │ ├── applicationWithEnv.conf │ │ │ ├── custom.config.conf │ │ │ ├── custom.config.yaml │ │ │ ├── empty-config.yaml │ │ │ ├── error404.html │ │ │ ├── public │ │ │ │ └── allowed.txt │ │ │ ├── resource.txt │ │ │ ├── secret.txt │ │ │ ├── test-config.yaml │ │ │ └── testjar.jar │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ ├── server │ │ │ ├── config │ │ │ │ └── MergedApplicationConfigTest.kt │ │ │ └── engine │ │ │ │ └── EmbeddedServerTest.kt │ │ │ └── tests │ │ │ ├── config │ │ │ ├── ConfigJvmTest.kt │ │ │ ├── HoconConfigTest.kt │ │ │ └── HoconDecoderTest.kt │ │ │ ├── hosts │ │ │ ├── CommandLineTest.kt │ │ │ ├── EmbeddedServerReloadingTests.kt │ │ │ ├── IsolatedClassLoader.kt │ │ │ └── ReceiveBlockingPrimitiveTest.kt │ │ │ ├── http │ │ │ ├── FindContainingJarFileTest.kt │ │ │ └── content │ │ │ │ ├── LocalFileContentTest.kt │ │ │ │ └── StaticContentResolutionTest.kt │ │ │ ├── plugins │ │ │ ├── ApplicationPluginConfigurationTest.kt │ │ │ ├── ConfigWithProperty.kt │ │ │ └── RouteRootPluginConfigurationTest.kt │ │ │ ├── server │ │ │ └── engine │ │ │ │ ├── MultiPartDataTest.kt │ │ │ │ └── OverridingClassLoaderTest.kt │ │ │ └── utils │ │ │ └── DateJvmTest.kt │ ├── mingwX64 │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── engine │ │ │ └── EnvironmentUtils.mingwX64.kt │ ├── my.config.conf │ ├── nix │ │ ├── interop │ │ │ └── host_common.def │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── engine │ │ │ └── EnvironmentUtils.nix.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ ├── application │ │ │ ├── ApplicationEnvironment.nonJvm.kt │ │ │ └── internal │ │ │ │ └── TypeUtils.nonJvm.kt │ │ │ ├── config │ │ │ └── ConfigLoaders.nonJvm.kt │ │ │ ├── engine │ │ │ ├── ApplicationEngineEnvironment.nonJvm.kt │ │ │ ├── EngineConnectorConfing.nonJvm.kt │ │ │ └── internal │ │ │ │ └── ExceptionUtils.nonJvm.kt │ │ │ └── http │ │ │ └── content │ │ │ └── DefaultTransform.nonJvm.kt │ ├── posix │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ ├── engine │ │ │ ├── DefaultTransformNix.kt │ │ │ ├── EmbeddedServerNix.kt │ │ │ ├── EnvironmentUtilsNix.kt │ │ │ ├── ShutdownHookNative.kt │ │ │ └── internal │ │ │ │ ├── ApplicationUtilsNix.kt │ │ │ │ └── EngineUtilsNix.kt │ │ │ └── request │ │ │ └── ApplicationReceiveFunctions.posix.kt │ └── wasmJs │ │ └── src │ │ └── io │ │ └── ktor │ │ └── server │ │ └── engine │ │ └── EnvironmentUtils.wasmJs.kt ├── ktor-server-host-common │ ├── api │ │ ├── ktor-server-host-common.api │ │ └── ktor-server-host-common.klib.api │ ├── build.gradle.kts │ └── common │ │ ├── .gitkeep │ │ └── src │ │ └── Stub.kt ├── ktor-server-jetty-jakarta │ ├── api │ │ ├── ktor-server-jetty-jakarta.api │ │ └── ktor-server-jetty-jakarta.klib.api │ ├── build.gradle.kts │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── jetty │ │ │ │ └── jakarta │ │ │ │ ├── Embedded.kt │ │ │ │ ├── EngineMain.kt │ │ │ │ ├── JettyApplicationCall.kt │ │ │ │ ├── JettyApplicationEngine.kt │ │ │ │ ├── JettyApplicationEngineBase.kt │ │ │ │ ├── JettyApplicationResponse.kt │ │ │ │ ├── JettyKtorHandler.kt │ │ │ │ ├── ServerInitializer.kt │ │ │ │ └── internal │ │ │ │ ├── EndPointChannels.kt │ │ │ │ └── JettyUpgradeImpl.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── server │ │ │ └── jetty │ │ │ └── jakarta │ │ │ ├── JettyAsyncServletContainerTest.kt │ │ │ ├── JettyBlockingServletContainerTest.kt │ │ │ ├── JettyClientCertTest.kt │ │ │ ├── JettyEngineTest.kt │ │ │ ├── JettyHttpConfigurationTest.kt │ │ │ ├── JettyIdleTimeoutTest.kt │ │ │ ├── JettyServletApplicationEngine.kt │ │ │ ├── JettyStressTest.kt │ │ │ ├── JettyWebSocketTest.kt │ │ │ ├── MultipleDispatchOnTimeout.kt │ │ │ └── WebResourcesTest.kt │ └── ktor-server-jetty-test-http2-jakarta │ │ ├── api │ │ ├── ktor-server-jetty-test-http2-jakarta.api │ │ ├── ktor-server-jetty-test-http2-jakarta.klib.api │ │ └── ktor-server-jetty-test-http2.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── server │ │ └── jetty │ │ └── http2 │ │ └── jakarta │ │ ├── JettyEngineTest.kt │ │ ├── JettyHttp2ServletAsyncTest.kt │ │ ├── JettyHttp2ServletBlockingTest.kt │ │ ├── JettyHttp2ServletContainer.kt │ │ └── MultipleDispatchOnTimeout.kt ├── ktor-server-jetty │ ├── api │ │ ├── ktor-server-jetty.api │ │ └── ktor-server-jetty.klib.api │ ├── build.gradle.kts │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── jetty │ │ │ │ ├── Embedded.kt │ │ │ │ ├── EngineMain.kt │ │ │ │ ├── JettyApplicationCall.kt │ │ │ │ ├── JettyApplicationEngine.kt │ │ │ │ ├── JettyApplicationEngineBase.kt │ │ │ │ ├── JettyApplicationResponse.kt │ │ │ │ ├── JettyKtorHandler.kt │ │ │ │ ├── ServerInitializer.kt │ │ │ │ └── internal │ │ │ │ ├── EndPointChannels.kt │ │ │ │ └── JettyUpgradeImpl.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── server │ │ │ └── jetty │ │ │ ├── JettyAsyncServletContainerTest.kt │ │ │ ├── JettyBlockingServletContainerTest.kt │ │ │ ├── JettyClientCertTest.kt │ │ │ ├── JettyEngineTest.kt │ │ │ ├── JettyHttpConfigurationTest.kt │ │ │ ├── JettyIdleTimeoutTest.kt │ │ │ ├── JettyServletApplicationEngine.kt │ │ │ ├── JettyStressTest.kt │ │ │ ├── MultipleDispatchOnTimeout.kt │ │ │ └── WebResourcesTest.kt │ └── ktor-server-jetty-test-http2 │ │ ├── api │ │ ├── ktor-server-jetty-test-http2.api │ │ └── ktor-server-jetty-test-http2.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── server │ │ └── jetty │ │ └── http2 │ │ ├── JettyEngineTest.kt │ │ ├── JettyHttp2ServletAsyncTest.kt │ │ ├── JettyHttp2ServletBlockingTest.kt │ │ ├── JettyHttp2ServletContainer.kt │ │ └── MultipleDispatchOnTimeout.kt ├── ktor-server-netty │ ├── api │ │ ├── ktor-server-netty.api │ │ └── ktor-server-netty.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── netty │ │ │ ├── CIO.kt │ │ │ ├── Embedded.kt │ │ │ ├── EngineMain.kt │ │ │ ├── EventLoopGroupProxy.kt │ │ │ ├── NettyApplicationCall.kt │ │ │ ├── NettyApplicationCallHandler.kt │ │ │ ├── NettyApplicationEngine.kt │ │ │ ├── NettyApplicationRequest.kt │ │ │ ├── NettyApplicationRequestCookies.kt │ │ │ ├── NettyApplicationRequestHeaders.kt │ │ │ ├── NettyApplicationResponse.kt │ │ │ ├── NettyChannelInitializer.kt │ │ │ ├── NettyDirectDecoder.kt │ │ │ ├── NettyDirectEncoder.kt │ │ │ ├── NettyHttpHandlerState.kt │ │ │ ├── cio │ │ │ ├── NettyHttpResponsePipeline.kt │ │ │ └── RequestBodyHandler.kt │ │ │ ├── http1 │ │ │ ├── NettyConnectionPoint.kt │ │ │ ├── NettyHttp1ApplicationCall.kt │ │ │ ├── NettyHttp1ApplicationRequest.kt │ │ │ ├── NettyHttp1ApplicationResponse.kt │ │ │ └── NettyHttp1Handler.kt │ │ │ └── http2 │ │ │ ├── Http2LocalConnectionPoint.kt │ │ │ ├── HttpFrameAdapter.kt │ │ │ ├── NettyHttp2ApplicationCall.kt │ │ │ ├── NettyHttp2ApplicationRequest.kt │ │ │ ├── NettyHttp2ApplicationResponse.kt │ │ │ └── NettyHttp2Handler.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── server │ │ └── netty │ │ ├── EngineMainTest.kt │ │ ├── NettyConfigurationTest.kt │ │ ├── NettyCustomChannelPipelineConfigurationTest.kt │ │ ├── NettyEngineTest.kt │ │ ├── NettyHttp2ApplicationResponseTest.kt │ │ ├── NettyHttp2LocalConnectionPointTest.kt │ │ ├── NettyReadRequestTimeoutTest.kt │ │ ├── NettySpecificTest.kt │ │ ├── NettyStressTest.kt │ │ ├── NettyUtilityTest.kt │ │ └── NettyWebSocketTest.kt ├── ktor-server-plugins │ ├── ktor-server-auth-jwt │ │ ├── api │ │ │ ├── ktor-server-auth-jwt.api │ │ │ └── ktor-server-auth-jwt.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── auth │ │ │ │ └── jwt │ │ │ │ ├── JWTAuth.kt │ │ │ │ ├── JWTAuthSchemes.kt │ │ │ │ └── JWTUtils.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── auth │ │ │ └── jwt │ │ │ ├── JWTAuthTest.kt │ │ │ └── JWTPayloadHolderTest.kt │ ├── ktor-server-auth-ldap │ │ ├── api │ │ │ ├── ktor-server-auth-ldap.api │ │ │ └── ktor-server-auth-ldap.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── auth │ │ │ │ └── ldap │ │ │ │ └── Ldap.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── auth │ │ │ └── ldap │ │ │ ├── LDAPServerExtension.kt │ │ │ ├── LdapAuthTest.kt │ │ │ └── LdapEscapeTest.kt │ ├── ktor-server-auth │ │ ├── api │ │ │ ├── ktor-server-auth.api │ │ │ └── ktor-server-auth.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── auth │ │ │ │ │ ├── Authentication.kt │ │ │ │ │ ├── AuthenticationContext.kt │ │ │ │ │ ├── AuthenticationFailedCause.kt │ │ │ │ │ ├── AuthenticationInterceptors.kt │ │ │ │ │ ├── AuthenticationProcedureChallenge.kt │ │ │ │ │ ├── AuthenticationProvider.kt │ │ │ │ │ ├── BasicAuth.kt │ │ │ │ │ ├── BearerAuth.kt │ │ │ │ │ ├── DynamicProviderConfig.kt │ │ │ │ │ ├── ForbiddenResponse.kt │ │ │ │ │ ├── FormAuth.kt │ │ │ │ │ ├── Headers.kt │ │ │ │ │ ├── OAuth2.kt │ │ │ │ │ ├── OAuthCommon.kt │ │ │ │ │ ├── OAuthProcedure.kt │ │ │ │ │ ├── Principal.kt │ │ │ │ │ ├── SessionAuth.kt │ │ │ │ │ ├── SimpleAuth.kt │ │ │ │ │ └── UnauthorizedResponse.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── auth │ │ │ │ ├── AuthBuildersTest.kt │ │ │ │ ├── AuthHeadersTest.kt │ │ │ │ ├── AuthorizeHeaderParserTest.kt │ │ │ │ ├── BasicAuthTest.kt │ │ │ │ ├── BearerAuthTest.kt │ │ │ │ ├── CryptoTest.kt │ │ │ │ ├── OAuth2Test.kt │ │ │ │ ├── SessionAuthTest.kt │ │ │ │ └── UserHashedTableAuthTest.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── OAuth.jsAndWasmShared.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── auth │ │ │ │ │ ├── DigestAuth.kt │ │ │ │ │ ├── OAuth.kt │ │ │ │ │ └── OAuth1a.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── auth │ │ │ │ ├── AuthWithPlugins.kt │ │ │ │ ├── DigestTest.kt │ │ │ │ ├── OAuth1aTest.kt │ │ │ │ └── SessionAuthDeferredTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── OAuthNative.kt │ ├── ktor-server-auto-head-response │ │ ├── api │ │ │ ├── ktor-server-auto-head-response.api │ │ │ └── ktor-server-auto-head-response.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── autohead │ │ │ └── AutoHeadResponse.kt │ ├── ktor-server-body-limit │ │ ├── api │ │ │ ├── ktor-server-body-limit.api │ │ │ └── ktor-server-body-limit.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── bodylimit │ │ │ │ └── RequestBodyLimit.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── bodylimit │ │ │ └── RequestBodyLimitTest.kt │ ├── ktor-server-caching-headers │ │ ├── api │ │ │ ├── ktor-server-caching-headers.api │ │ │ └── ktor-server-caching-headers.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── cachingheaders │ │ │ │ ├── CacheControlMerge.kt │ │ │ │ └── CachingHeaders.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── CacheControlMergeTest.kt │ ├── ktor-server-call-id │ │ ├── api │ │ │ ├── ktor-server-call-id.api │ │ │ └── ktor-server-call-id.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── callid │ │ │ │ └── CallId.kt │ │ └── jvm │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── callid │ │ │ └── CallIdJvm.kt │ ├── ktor-server-call-logging │ │ ├── api │ │ │ ├── ktor-server-call-logging.api │ │ │ └── ktor-server-call-logging.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── calllogging │ │ │ │ ├── CallLogging.kt │ │ │ │ ├── CallLoggingConfig.kt │ │ │ │ ├── MDCEntryUtils.kt │ │ │ │ ├── MDCHook.kt │ │ │ │ └── MDCProvider.kt │ │ │ ├── test-resources │ │ │ └── logback-test.xml │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── calllogging │ │ │ └── CallLoggingTest.kt │ ├── ktor-server-compression │ │ ├── api │ │ │ ├── ktor-server-compression.api │ │ │ └── ktor-server-compression.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── compression │ │ │ ├── Compression.kt │ │ │ ├── Config.kt │ │ │ └── ContentEncoding.kt │ ├── ktor-server-conditional-headers │ │ ├── api │ │ │ ├── ktor-server-conditional-headers.api │ │ │ └── ktor-server-conditional-headers.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── conditionalheaders │ │ │ └── ConditionalHeaders.kt │ ├── ktor-server-content-negotiation │ │ ├── api │ │ │ ├── ktor-server-content-negotiation.api │ │ │ └── ktor-server-content-negotiation.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── contentnegotiation │ │ │ │ │ ├── ContentNegotiation.kt │ │ │ │ │ ├── ContentNegotiationConfig.kt │ │ │ │ │ ├── ContentNegotiationUtils.kt │ │ │ │ │ ├── RequestConverter.kt │ │ │ │ │ └── ResponseConverter.kt │ │ │ └── test │ │ │ │ ├── ContentNegotiationTest.kt │ │ │ │ ├── ContentNegotiationTestData.kt │ │ │ │ └── RequestConverterTest.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── DefaultIgnoredTypes.jsAndWasmShared.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── DefaultIgnoredTypesJvm.kt │ │ │ └── test │ │ │ │ ├── ContentNegotiationJvmTest.kt │ │ │ │ └── LogTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── DefaultIgnoredTypesNix.kt │ ├── ktor-server-cors │ │ ├── api │ │ │ ├── ktor-server-cors.api │ │ │ └── ktor-server-cors.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── cors │ │ │ ├── CORS.kt │ │ │ ├── CORSConfig.kt │ │ │ ├── CORSUtils.kt │ │ │ ├── KotlinTimeJvm.kt │ │ │ └── routing │ │ │ └── CORS.kt │ ├── ktor-server-csrf │ │ ├── api │ │ │ ├── ktor-server-csrf.api │ │ │ └── ktor-server-csrf.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── csrf │ │ │ │ ├── CSRF.kt │ │ │ │ └── CSRFConfig.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── csrf │ │ │ └── CSRFTest.kt │ ├── ktor-server-data-conversion │ │ ├── api │ │ │ ├── ktor-server-data-conversion.api │ │ │ └── ktor-server-data-conversion.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── dataconversion │ │ │ └── DataConversion.kt │ ├── ktor-server-default-headers │ │ ├── .gitignore │ │ ├── api │ │ │ ├── ktor-server-default-headers.api │ │ │ └── ktor-server-default-headers.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── defaultheaders │ │ │ │ └── DefaultHeaders.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── plugins │ │ │ └── DefaultHeadersTest.kt │ ├── ktor-server-di │ │ ├── api │ │ │ ├── ktor-server-di.api │ │ │ └── ktor-server-di.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── di │ │ │ │ │ ├── DependencyConflictPolicy.kt │ │ │ │ │ ├── DependencyInjection.kt │ │ │ │ │ ├── DependencyKeyCovariance.kt │ │ │ │ │ ├── DependencyProvider.kt │ │ │ │ │ ├── DependencyProviderLambdaOverloads.kt │ │ │ │ │ ├── DependencyReflection.kt │ │ │ │ │ ├── DependencyRegistry.kt │ │ │ │ │ ├── DependencyResolution.kt │ │ │ │ │ ├── annotations │ │ │ │ │ ├── Named.kt │ │ │ │ │ └── Property.kt │ │ │ │ │ └── utils │ │ │ │ │ ├── ClasspathReference.kt │ │ │ │ │ └── Types.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── di │ │ │ │ └── DependencyInjectionTest.kt │ │ ├── jvm │ │ │ ├── resources │ │ │ │ └── META-INF │ │ │ │ │ └── services │ │ │ │ │ └── io.ktor.server.application.ModuleParametersInjector │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── di │ │ │ │ │ ├── DependencyInjectionConfig.jvm.kt │ │ │ │ │ ├── DependencyReflectionJvm.kt │ │ │ │ │ ├── PluginModuleParametersInjector.kt │ │ │ │ │ └── utils │ │ │ │ │ ├── ClasspathReference.jvm.kt │ │ │ │ │ └── Types.jvm.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── di │ │ │ │ ├── DependencyInjectionJvmTest.kt │ │ │ │ ├── DependencyInjectionTestModules.kt │ │ │ │ └── utils │ │ │ │ └── TypesTest.kt │ │ └── nonJvm │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── di │ │ │ ├── DependencyInjectionConfig.nonJvm.kt │ │ │ └── utils │ │ │ ├── ClasspathReferences.nonJvm.kt │ │ │ └── Types.nonJvm.kt │ ├── ktor-server-double-receive │ │ ├── api │ │ │ ├── ktor-server-double-receive.api │ │ │ └── ktor-server-double-receive.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── doublereceive │ │ │ │ │ ├── ByteArrayCache.kt │ │ │ │ │ ├── DoubleReceive.kt │ │ │ │ │ ├── DoubleReceiveCache.kt │ │ │ │ │ ├── DoubleReceiveConfig.kt │ │ │ │ │ ├── FileCache.kt │ │ │ │ │ └── ReceiveHooks.kt │ │ │ └── test │ │ │ │ └── DoubleReceiveTest.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── doublereceive │ │ │ │ └── FileCache.jsAndWasmShared.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── doublereceive │ │ │ │ │ └── FileCacheJvm.kt │ │ │ └── test │ │ │ │ └── DoubleReceiveTestJvm.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── doublereceive │ │ │ └── FileCacheNix.kt │ ├── ktor-server-forwarded-header │ │ ├── api │ │ │ ├── ktor-server-forwarded-header.api │ │ │ └── ktor-server-forwarded-header.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── forwardedheaders │ │ │ ├── ForwardedHeaders.kt │ │ │ ├── Utils.kt │ │ │ └── XForwardedHeaders.kt │ ├── ktor-server-freemarker │ │ ├── api │ │ │ ├── ktor-server-freemarker.api │ │ │ └── ktor-server-freemarker.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── freemarker │ │ │ │ ├── FreeMarker.kt │ │ │ │ └── RespondTemplate.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── freemarker │ │ │ └── FreeMarkerTest.kt │ ├── ktor-server-hsts │ │ ├── api │ │ │ ├── ktor-server-hsts.api │ │ │ └── ktor-server-hsts.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── hsts │ │ │ ├── HSTS.kt │ │ │ └── KotlinTimeJvm.kt │ ├── ktor-server-html-builder │ │ ├── api │ │ │ ├── ktor-server-html-builder.api │ │ │ └── ktor-server-html-builder.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── html │ │ │ │ ├── RespondHtml.kt │ │ │ │ ├── RespondHtmlTemplate.kt │ │ │ │ └── Template.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ ├── server │ │ │ └── html │ │ │ │ └── PlaceholderListTest.kt │ │ │ └── tests │ │ │ └── html │ │ │ ├── HtmlBuilderTest.kt │ │ │ ├── HtmlContentTest.kt │ │ │ └── HtmlTemplateTest.kt │ ├── ktor-server-htmx │ │ ├── api │ │ │ ├── ktor-server-htmx.api │ │ │ └── ktor-server-htmx.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── htmx │ │ │ │ │ ├── HxHeaders.kt │ │ │ │ │ └── HxRouting.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── htmx │ │ │ │ └── HxRoutingTest.kt │ │ └── gradle.properties │ ├── ktor-server-http-redirect │ │ ├── api │ │ │ ├── ktor-server-http-redirect.api │ │ │ └── ktor-server-http-redirect.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── httpsredirect │ │ │ └── HttpsRedirect.kt │ ├── ktor-server-i18n │ │ ├── api │ │ │ ├── ktor-server-i18n.api │ │ │ └── ktor-server-i18n.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── i18n │ │ │ │ ├── I18n.kt │ │ │ │ └── Translate.kt │ │ │ ├── test-resources │ │ │ └── messages │ │ │ │ ├── messages.properties │ │ │ │ ├── messages_en_US.properties │ │ │ │ ├── messages_pt_BR.properties │ │ │ │ └── messages_ru_RU.properties │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── i18n │ │ │ └── TranslationTest.kt │ ├── ktor-server-jte │ │ ├── .gitignore │ │ ├── api │ │ │ ├── ktor-server-jte.api │ │ │ └── ktor-server-jte.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── jte │ │ │ │ ├── Jte.kt │ │ │ │ └── RespondTemplate.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── jte │ │ │ └── JteTest.kt │ ├── ktor-server-method-override │ │ ├── api │ │ │ ├── ktor-server-method-override.api │ │ │ └── ktor-server-method-override.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── methodoverride │ │ │ └── XHttpMethodOverride.kt │ ├── ktor-server-metrics-micrometer │ │ ├── api │ │ │ ├── ktor-server-metrics-micrometer.api │ │ │ └── ktor-server-metrics-micrometer.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── metrics │ │ │ │ └── micrometer │ │ │ │ └── MicrometerMetrics.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── metrics │ │ │ └── micrometer │ │ │ └── MicrometerMetricsTests.kt │ ├── ktor-server-metrics │ │ ├── api │ │ │ ├── ktor-server-metrics.api │ │ │ └── ktor-server-metrics.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── metrics │ │ │ │ └── dropwizard │ │ │ │ ├── DropwizardMetrics.kt │ │ │ │ └── DropwizardMetricsUtils.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── metrics │ │ │ └── dropwizard │ │ │ └── DropwizardMetricsTests.kt │ ├── ktor-server-mustache │ │ ├── api │ │ │ ├── ktor-server-mustache.api │ │ │ └── ktor-server-mustache.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── mustache │ │ │ │ ├── Mustache.kt │ │ │ │ └── RespondTemplate.kt │ │ │ ├── test-resources │ │ │ ├── index.hbs │ │ │ ├── withPlaceholder.mustache │ │ │ └── withoutPlaceholder.mustache │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── mustache │ │ │ └── MustacheTest.kt │ ├── ktor-server-openapi │ │ ├── api │ │ │ ├── ktor-server-openapi.api │ │ │ └── ktor-server-openapi.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── openapi │ │ │ │ ├── OpenAPI.kt │ │ │ │ └── OpenAPIConfig.kt │ │ │ ├── test-resources │ │ │ └── openapi │ │ │ │ └── documentation.yaml │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── openapi │ │ │ └── OpenAPITest.kt │ ├── ktor-server-partial-content │ │ ├── api │ │ │ ├── ktor-server-partial-content.api │ │ │ └── ktor-server-partial-content.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── partialcontent │ │ │ │ ├── BodyTransformedHook.kt │ │ │ │ ├── MultipleRangeWriter.kt │ │ │ │ ├── PartialContent.kt │ │ │ │ ├── PartialContentUtils.kt │ │ │ │ └── PartialOutgoingContent.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── partialcontent │ │ │ │ └── MultipleRangeWriter.jsAndWasmShared.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── partialcontent │ │ │ │ │ └── MultipleRangeWriter.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── ByteRangesChannelTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── partialcontent │ │ │ └── MultipleRangeWriterNix.kt │ ├── ktor-server-pebble │ │ ├── api │ │ │ ├── ktor-server-pebble.api │ │ │ └── ktor-server-pebble.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── pebble │ │ │ │ ├── Pebble.kt │ │ │ │ └── RespondTemplate.kt │ │ │ ├── test-resources │ │ │ ├── i18n_test.properties │ │ │ └── i18n_test_es.properties │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── pebble │ │ │ └── PebbleTest.kt │ ├── ktor-server-rate-limit │ │ ├── api │ │ │ ├── ktor-server-rate-limit.api │ │ │ └── ktor-server-rate-limit.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── ratelimit │ │ │ │ ├── DefaultRateLimiter.kt │ │ │ │ ├── RateLimit.kt │ │ │ │ ├── RateLimitConfig.kt │ │ │ │ ├── RateLimitInterceptors.kt │ │ │ │ ├── RateLimiter.kt │ │ │ │ └── Routing.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── ratelimit │ │ │ └── RateLimitTest.kt │ ├── ktor-server-request-validation │ │ ├── api │ │ │ ├── ktor-server-request-validation.api │ │ │ └── ktor-server-request-validation.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── requestvalidation │ │ │ │ ├── RequestValidation.kt │ │ │ │ └── RequestValidationConfig.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── requestvalidation │ │ │ └── RequestValidationTest.kt │ ├── ktor-server-resources │ │ ├── api │ │ │ ├── ktor-server-resources.api │ │ │ └── ktor-server-resources.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── resources │ │ │ │ │ ├── Resources.kt │ │ │ │ │ └── Routing.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── resources │ │ │ │ ├── ResourcesTest.kt │ │ │ │ └── Verifiers.kt │ │ └── jvm │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── resources │ │ │ └── ResourcesTestJvm.kt │ ├── ktor-server-sessions │ │ ├── api │ │ │ ├── ktor-server-sessions.api │ │ │ └── ktor-server-sessions.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── sessions │ │ │ │ │ ├── BeforeSend.kt │ │ │ │ │ ├── Cache.kt │ │ │ │ │ ├── CacheStorage.kt │ │ │ │ │ ├── KotlinTimeJvm.kt │ │ │ │ │ ├── SameSite.kt │ │ │ │ │ ├── SessionData.kt │ │ │ │ │ ├── SessionDeferral.kt │ │ │ │ │ ├── SessionIdProvider.kt │ │ │ │ │ ├── SessionProvider.kt │ │ │ │ │ ├── SessionSerializer.kt │ │ │ │ │ ├── SessionStorage.kt │ │ │ │ │ ├── SessionStorageMemory.kt │ │ │ │ │ ├── SessionTracker.kt │ │ │ │ │ ├── SessionTrackerById.kt │ │ │ │ │ ├── SessionTrackerByValue.kt │ │ │ │ │ ├── SessionTransport.kt │ │ │ │ │ ├── SessionTransportCookie.kt │ │ │ │ │ ├── SessionTransportHeader.kt │ │ │ │ │ ├── SessionTransportTransformer.kt │ │ │ │ │ ├── Sessions.kt │ │ │ │ │ ├── SessionsBuilder.kt │ │ │ │ │ ├── SessionsConfig.kt │ │ │ │ │ └── serialization │ │ │ │ │ ├── KotlinxSessionSerializer.kt │ │ │ │ │ ├── ListLikeDecoder.kt │ │ │ │ │ ├── MapDecoder.kt │ │ │ │ │ ├── SessionsBackwardCompatibleDecoder.kt │ │ │ │ │ └── SessionsBackwardCompatibleEncoder.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── sessions │ │ │ │ ├── CacheTest.kt │ │ │ │ ├── SessionTransportCookieTest.kt │ │ │ │ └── SessionTransportTransformerKtTest.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── sessions │ │ │ │ ├── CacheStorage.jsAndWasmShared.kt │ │ │ │ └── SessionDeferral.jsAndWasmShared.kt │ │ ├── jvm │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── sessions │ │ │ │ │ ├── CacheJvm.kt │ │ │ │ │ ├── CacheStorageJvm.kt │ │ │ │ │ ├── DirectoryStorage.kt │ │ │ │ │ ├── SessionDeferral.jvm.kt │ │ │ │ │ ├── SessionSerializerReflection.kt │ │ │ │ │ ├── SessionTransportTransformerEncrypt.kt │ │ │ │ │ └── SessionTransportTransformerMessageAuthentication.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── sessions │ │ │ │ ├── CacheTest.kt │ │ │ │ ├── DirectorySessionStorageTest.kt │ │ │ │ └── SessionsBackwardCompatibleFormatTest.kt │ │ ├── jvmAndPosix │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── sessions │ │ │ │ ├── BlockingDeferredSessionData.kt │ │ │ │ └── SessionDeferral.jvmAndPosix.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── sessions │ │ │ ├── CacheStorageNix.kt │ │ │ └── SessionDeferral.posix.kt │ ├── ktor-server-sse │ │ ├── api │ │ │ ├── ktor-server-sse.api │ │ │ └── ktor-server-sse.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── sse │ │ │ │ ├── DefaultServerSSESession.kt │ │ │ │ ├── Routing.kt │ │ │ │ ├── SSE.kt │ │ │ │ ├── SSEServerContent.kt │ │ │ │ └── ServerSSESession.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── sse │ │ │ └── ServerSentEventsTest.kt │ ├── ktor-server-status-pages │ │ ├── api │ │ │ ├── ktor-server-status-pages.api │ │ │ └── ktor-server-status-pages.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ ├── src │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── server │ │ │ │ │ └── plugins │ │ │ │ │ └── statuspages │ │ │ │ │ ├── StatusPages.kt │ │ │ │ │ └── StatusPagesUtils.kt │ │ │ └── test │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── statuspages │ │ │ │ └── StatusPagesTest.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── statuspages │ │ │ │ └── StatusPagesUtils.jsAndWasmShared.kt │ │ ├── jvm │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── statuspages │ │ │ │ ├── StatusPagesJvm.kt │ │ │ │ └── StatusPagesUtilsJvm.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── statuspages │ │ │ └── StatusPagesUtilsNix.kt │ ├── ktor-server-swagger │ │ ├── api │ │ │ ├── ktor-server-swagger.api │ │ │ └── ktor-server-swagger.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── plugins │ │ │ │ └── swagger │ │ │ │ ├── Swagger.kt │ │ │ │ └── SwaggerConfig.kt │ │ │ ├── test-resources │ │ │ └── openapi │ │ │ │ └── documentation.yaml │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── plugins │ │ │ └── swagger │ │ │ └── SwaggerTest.kt │ ├── ktor-server-thymeleaf │ │ ├── api │ │ │ ├── ktor-server-thymeleaf.api │ │ │ └── ktor-server-thymeleaf.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── thymeleaf │ │ │ │ ├── RespondTemplate.kt │ │ │ │ └── Thymeleaf.kt │ │ │ ├── test-resources │ │ │ └── templates │ │ │ │ ├── fragments.html │ │ │ │ ├── fragments_insert_test.html │ │ │ │ ├── i18n_test.html │ │ │ │ ├── i18n_test.properties │ │ │ │ ├── i18n_test_es.properties │ │ │ │ └── test.html │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── thymeleaf │ │ │ └── ThymeleafTest.kt │ ├── ktor-server-velocity │ │ ├── api │ │ │ ├── ktor-server-velocity.api │ │ │ └── ktor-server-velocity.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── velocity │ │ │ │ ├── RespondTemplate.kt │ │ │ │ ├── Velocity.kt │ │ │ │ └── VelocityTools.kt │ │ │ └── test │ │ │ ├── io │ │ │ └── ktor │ │ │ │ └── tests │ │ │ │ └── velocity │ │ │ │ ├── VelocityTest.kt │ │ │ │ └── VelocityToolsTest.kt │ │ │ └── resources │ │ │ └── test-template.vhtml │ ├── ktor-server-webjars │ │ ├── api │ │ │ ├── ktor-server-webjars.api │ │ │ └── ktor-server-webjars.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── webjars │ │ │ │ ├── Webjars.kt │ │ │ │ └── WebjarsUtils.kt │ │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── webjars │ │ │ └── WebjarsTest.kt │ └── ktor-server-websockets │ │ ├── api │ │ ├── ktor-server-websockets.api │ │ └── ktor-server-websockets.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── websocket │ │ │ │ ├── Durations.kt │ │ │ │ ├── Routing.kt │ │ │ │ ├── WebSocketServerSession.kt │ │ │ │ ├── WebSocketUpgrade.kt │ │ │ │ └── WebSockets.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── websocket │ │ │ ├── DefaultWebSocketTest.kt │ │ │ └── RawWebSocketTest.kt │ │ └── jvm │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── websocket │ │ ├── DefaultWebSocketTestJvm.kt │ │ ├── WebSocketTest.kt │ │ └── WebSocketWithContentNegotiationTest.kt ├── ktor-server-servlet-jakarta │ ├── api │ │ ├── ktor-server-servlet-jakarta.api │ │ └── ktor-server-servlet-jakarta.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── servlet │ │ │ └── jakarta │ │ │ ├── AsyncServlet.kt │ │ │ ├── Attributes.kt │ │ │ ├── BlockingServlet.kt │ │ │ ├── JAASBridge.kt │ │ │ ├── KtorServlet.kt │ │ │ ├── ServletApplicationEngine.kt │ │ │ ├── ServletApplicationRequest.kt │ │ │ ├── ServletApplicationRequestCookies.kt │ │ │ ├── ServletApplicationRequestHeaders.kt │ │ │ ├── ServletApplicationResponse.kt │ │ │ ├── ServletConnectionPoint.kt │ │ │ ├── ServletReader.kt │ │ │ ├── ServletUpgrade.kt │ │ │ ├── ServletWriter.kt │ │ │ ├── WebResources.kt │ │ │ └── v4 │ │ │ └── Push.kt │ │ ├── test-resources │ │ ├── application.yaml │ │ ├── custom-config.yaml │ │ └── test.conf │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── servlet │ │ └── jakarta │ │ ├── ConfigTest.kt │ │ └── ServletWriterJakartaTest.kt ├── ktor-server-servlet │ ├── api │ │ ├── ktor-server-servlet.api │ │ └── ktor-server-servlet.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── servlet │ │ │ ├── AsyncServlet.kt │ │ │ ├── Attributes.kt │ │ │ ├── BlockingServlet.kt │ │ │ ├── JAASBridge.kt │ │ │ ├── KtorServlet.kt │ │ │ ├── ServletApplicationEngine.kt │ │ │ ├── ServletApplicationRequest.kt │ │ │ ├── ServletApplicationRequestCookies.kt │ │ │ ├── ServletApplicationRequestHeaders.kt │ │ │ ├── ServletApplicationResponse.kt │ │ │ ├── ServletConnectionPoint.kt │ │ │ ├── ServletReader.kt │ │ │ ├── ServletUpgrade.kt │ │ │ ├── ServletWriter.kt │ │ │ ├── WebResources.kt │ │ │ └── v4 │ │ │ └── Push.kt │ │ ├── test-resources │ │ ├── application.yaml │ │ ├── custom-config.yaml │ │ └── test.conf │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── servlet │ │ ├── ConfigTest.kt │ │ └── ServletWriterTest.kt ├── ktor-server-test-base │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── test │ │ │ │ └── base │ │ │ │ ├── BaseTest.kt │ │ │ │ └── EngineTestBase.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── test │ │ │ └── base │ │ │ └── BaseTestTest.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── test │ │ │ └── base │ │ │ └── EngineTestBase.jsAndWasmShared.kt │ ├── jvm │ │ ├── resources │ │ │ └── logback-test.xml │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── test │ │ │ └── base │ │ │ ├── BaseTestJvm.kt │ │ │ ├── EngineTestBaseJvm.kt │ │ │ ├── FreePorts.kt │ │ │ ├── HighLoadHttpGenerator.kt │ │ │ └── StressTestCondition.kt │ ├── nonJvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── test │ │ │ └── base │ │ │ └── BaseTest.nonJvm.kt │ └── posix │ │ └── src │ │ └── io │ │ └── ktor │ │ └── server │ │ └── test │ │ └── base │ │ └── EngineTestBaseNix.kt ├── ktor-server-test-host │ ├── api │ │ ├── ktor-server-test-host.api │ │ └── ktor-server-test-host.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── testing │ │ │ │ ├── ExpectedTestException.kt │ │ │ │ ├── TestApplication.kt │ │ │ │ ├── TestApplicationCall.kt │ │ │ │ ├── TestApplicationEngine.kt │ │ │ │ ├── TestApplicationRequest.kt │ │ │ │ ├── TestApplicationResponse.kt │ │ │ │ ├── TestEngine.kt │ │ │ │ ├── Utils.kt │ │ │ │ ├── client │ │ │ │ ├── DelegatingTestClientEngine.kt │ │ │ │ ├── TestHttpClientConfig.kt │ │ │ │ └── TestHttpClientEngine.kt │ │ │ │ └── internal │ │ │ │ └── CoroutineUtils.kt │ │ └── test │ │ │ ├── TestApplicationRequestTest.kt │ │ │ └── TestApplicationTest.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── testing │ │ │ ├── client │ │ │ └── TestHttpClientEngineBridge.jsAndWasmShared.kt │ │ │ └── internal │ │ │ └── CoroutineUtils.jsAndWasmShared.kt │ ├── jvm │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── server │ │ │ │ └── testing │ │ │ │ ├── TestApplicationEngineJvm.kt │ │ │ │ ├── client │ │ │ │ ├── TestEngineWebsocketSession.kt │ │ │ │ └── TestHttpClientEngineBridgeJvm.kt │ │ │ │ └── internal │ │ │ │ └── CoroutineUtilsJvm.kt │ │ ├── test-resources │ │ │ ├── application-custom.conf │ │ │ ├── application-custom.yaml │ │ │ ├── application-with-modules.conf │ │ │ └── application.conf │ │ └── test │ │ │ └── TestApplicationTestJvm.kt │ └── posix │ │ └── src │ │ └── io │ │ └── ktor │ │ └── server │ │ └── testing │ │ ├── client │ │ └── TestHttpClientEngineBridgeNix.kt │ │ └── internal │ │ └── CoroutineUtilsNix.kt ├── ktor-server-test-suites │ ├── build.gradle.kts │ ├── common │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── testing │ │ │ └── suites │ │ │ ├── HttpServerCommonTestSuite.kt │ │ │ └── WebSocketEngineSuite.kt │ └── jvm │ │ └── src │ │ └── io │ │ └── ktor │ │ └── server │ │ └── testing │ │ └── suites │ │ ├── ClientCertTestSuite.kt │ │ ├── CompressionTestSuite.kt │ │ ├── ConfigTestSuite.kt │ │ ├── ConnectionTestSuite.kt │ │ ├── ContentTestSuite.kt │ │ ├── EngineStressSuite.kt │ │ ├── HttpServerJvmTestSuite.kt │ │ ├── ServerPluginsTestSuite.kt │ │ ├── SustainabilityTestSuite.kt │ │ └── Utils.kt ├── ktor-server-tests │ ├── api │ │ ├── ktor-server-tests.api │ │ └── ktor-server-tests.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── Stub.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── server │ │ │ ├── application │ │ │ ├── ApplicationEventTest.kt │ │ │ ├── ApplicationRequestHeaderTest.kt │ │ │ └── HandlerTest.kt │ │ │ ├── http │ │ │ ├── ApplicationRequestContentTest.kt │ │ │ ├── DefaultPushTest.kt │ │ │ ├── HeadersServerTest.kt │ │ │ ├── RespondFunctionsTest.kt │ │ │ ├── ServerURLBuilderTest.kt │ │ │ ├── TestEngineMultipartTest.kt │ │ │ └── UrlEncodedTest.kt │ │ │ ├── plugins │ │ │ ├── AutoHeadResponseTest.kt │ │ │ ├── Base64EncodingCookiesTest.kt │ │ │ ├── CORSTest.kt │ │ │ ├── CachingHeadersTest.kt │ │ │ ├── CallIdTest.kt │ │ │ ├── ConditionalHeadersTests.kt │ │ │ ├── CookiesTest.kt │ │ │ ├── DQuotesCookiesEncodingTest.kt │ │ │ ├── DataConversionTest.kt │ │ │ ├── HSTSTest.kt │ │ │ ├── HttpsRedirectPluginTest.kt │ │ │ ├── OriginConnectionPointTest.kt │ │ │ ├── ParserServerSetCookieTest.kt │ │ │ ├── PartialContentTest.kt │ │ │ ├── RawCookieTest.kt │ │ │ ├── URIEncodingCookiesTest.kt │ │ │ └── XHttpMethodOverrideTest.kt │ │ │ ├── routing │ │ │ ├── RoutingBuildTest.kt │ │ │ ├── RoutingBuilderTest.kt │ │ │ ├── RoutingProcessingTest.kt │ │ │ ├── RoutingResolveTest.kt │ │ │ └── RoutingTracingTest.kt │ │ │ └── sessions │ │ │ └── SessionTest.kt │ └── jvm │ │ ├── test-resources │ │ ├── public.zip │ │ ├── public │ │ │ ├── default.txt │ │ │ ├── file.txt │ │ │ ├── ignore.txt │ │ │ ├── index.html │ │ │ ├── index.html.gz │ │ │ ├── nested │ │ │ │ ├── file-nested.txt │ │ │ │ ├── file-nested.txt.br │ │ │ │ └── index.html │ │ │ └── types │ │ │ │ ├── file.css │ │ │ │ ├── file.js │ │ │ │ ├── file.svg │ │ │ │ └── file.xml │ │ ├── test-resource.txt │ │ ├── test-resource.txt.br │ │ └── test-resource.txt.gz │ │ └── test │ │ └── io │ │ └── ktor │ │ └── server │ │ ├── http │ │ ├── ApplicationRequestContentTestJvm.kt │ │ ├── MultipartServerTest.kt │ │ ├── RespondFunctionsJvmTest.kt │ │ ├── RespondWriteTest.kt │ │ └── spa │ │ │ ├── Empty1.kt │ │ │ ├── Empty2.kt │ │ │ ├── Empty3.kt │ │ │ └── SinglePageApplicationTest.kt │ │ ├── plugins │ │ ├── AutoHeadResponseJvmTest.kt │ │ ├── CompressionTest.kt │ │ ├── ConditionalHeadersJvmTests.kt │ │ ├── CookiesTest.kt │ │ ├── DataConversionTest.kt │ │ ├── PartialContentTest.kt │ │ └── StaticContentTest.kt │ │ ├── sessions │ │ ├── AutoSerializerTest.kt │ │ └── SessionTestJvm.kt │ │ └── testing │ │ └── TestApplicationEngineTest.kt ├── ktor-server-tomcat-jakarta │ ├── api │ │ ├── ktor-server-tomcat-jakarta.api │ │ └── ktor-server-tomcat-jakarta.klib.api │ ├── build.gradle.kts │ └── jvm │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── server │ │ │ └── tomcat │ │ │ └── jakarta │ │ │ ├── Embedded.kt │ │ │ ├── EngineMain.kt │ │ │ └── TomcatApplicationEngine.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── server │ │ └── tomcat │ │ └── jakarta │ │ ├── TomcatEngineTest.kt │ │ └── TomcatWebSocketTest.kt └── ktor-server-tomcat │ ├── api │ ├── ktor-server-tomcat.api │ └── ktor-server-tomcat.klib.api │ ├── build.gradle.kts │ └── jvm │ ├── src │ └── io │ │ └── ktor │ │ └── server │ │ └── tomcat │ │ ├── Embedded.kt │ │ ├── EngineMain.kt │ │ └── TomcatApplicationEngine.kt │ └── test │ └── io │ └── ktor │ └── tests │ └── server │ └── tomcat │ └── TomcatEngineTest.kt ├── ktor-shared ├── ktor-call-id │ ├── api │ │ ├── ktor-call-id.api │ │ └── ktor-call-id.klib.api │ ├── build.gradle.kts │ └── common │ │ └── src │ │ └── io │ │ └── ktor │ │ └── callid │ │ └── CallId.kt ├── ktor-events │ ├── api │ │ ├── ktor-events.api │ │ └── ktor-events.klib.api │ ├── build.gradle.kts │ └── common │ │ └── src │ │ └── io │ │ └── ktor │ │ └── events │ │ └── Events.kt ├── ktor-htmx │ ├── api │ │ ├── ktor-htmx.api │ │ └── ktor-htmx.klib.api │ ├── build.gradle.kts │ ├── common │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── htmx │ │ │ ├── Annotations.kt │ │ │ ├── HxAttributeKeys.kt │ │ │ ├── HxCss.kt │ │ │ ├── HxEvents.kt │ │ │ ├── HxRequestHeaders.kt │ │ │ ├── HxResponseHeaders.kt │ │ │ └── HxSwap.kt │ └── ktor-htmx-html │ │ ├── api │ │ ├── ktor-htmx-html.api │ │ └── ktor-htmx-html.klib.api │ │ ├── build.gradle.kts │ │ └── common │ │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── htmx │ │ │ └── html │ │ │ └── HxAttributes.kt │ │ └── test │ │ └── io │ │ └── ktor │ │ └── htmx │ │ └── html │ │ └── HxAttributesTest.kt ├── ktor-resources │ ├── api │ │ ├── ktor-resources.api │ │ └── ktor-resources.klib.api │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── resources │ │ │ │ ├── Resource.kt │ │ │ │ ├── ResourceSerializationException.kt │ │ │ │ ├── Resources.kt │ │ │ │ ├── UrlBuilder.kt │ │ │ │ └── serialization │ │ │ │ ├── Decoders.kt │ │ │ │ ├── ParametersEncoder.kt │ │ │ │ └── ResourcesFormat.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── tests │ │ │ └── resources │ │ │ ├── ParametersSerializationTest.kt │ │ │ ├── PathPatternSerializationTest.kt │ │ │ └── ResourceUrlBuilderTest.kt │ ├── js │ │ └── .gitkeep │ ├── jvm │ │ └── .gitkeep │ └── posix │ │ └── .gitkeep ├── ktor-serialization │ ├── api │ │ ├── ktor-serialization.api │ │ └── ktor-serialization.klib.api │ ├── build.gradle.kts │ ├── common │ │ └── src │ │ │ ├── ContentConvertException.kt │ │ │ ├── ContentConverter.kt │ │ │ └── WebsocketContentConverter.kt │ ├── ktor-serialization-gson │ │ ├── api │ │ │ ├── ktor-serialization-gson.api │ │ │ └── ktor-serialization-gson.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ ├── GsonConverter.kt │ │ │ └── GsonWebsocketContentConverter.kt │ │ │ └── test │ │ │ ├── ClientGsonTest.kt │ │ │ ├── GsonContentNegotiationTest.kt │ │ │ ├── GsonWebsocketTest.kt │ │ │ ├── ServerGsonBlockingTest.kt │ │ │ └── ServerGsonTest.kt │ ├── ktor-serialization-jackson │ │ ├── api │ │ │ ├── ktor-serialization-jackson.api │ │ │ └── ktor-serialization-jackson.klib.api │ │ ├── build.gradle.kts │ │ └── jvm │ │ │ ├── src │ │ │ ├── JacksonConverter.kt │ │ │ └── JacksonWebsocketContentConverter.kt │ │ │ └── test │ │ │ ├── ClientJacksonTest.kt │ │ │ ├── JacksonContentNegotiationTest.kt │ │ │ ├── JacksonWebsocketTest.kt │ │ │ ├── ServerJacksonBlockingTest.kt │ │ │ └── ServerJacksonTest.kt │ ├── ktor-serialization-kotlinx │ │ ├── api │ │ │ ├── ktor-serialization-kotlinx.api │ │ │ └── ktor-serialization-kotlinx.klib.api │ │ ├── build.gradle.kts │ │ ├── common │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── serialization │ │ │ │ └── kotlinx │ │ │ │ ├── Extensions.kt │ │ │ │ ├── KotlinxSerializationConverter.kt │ │ │ │ ├── KotlinxWebsocketSerializationConverter.kt │ │ │ │ └── SerializerLookup.kt │ │ ├── jsAndWasmShared │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── serialization │ │ │ │ └── kotlinx │ │ │ │ └── ExtensionsJs.kt │ │ ├── jvm │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── serialization │ │ │ │ └── kotlinx │ │ │ │ └── ExtensionsJvm.kt │ │ ├── ktor-serialization-kotlinx-cbor │ │ │ ├── api │ │ │ │ ├── ktor-serialization-kotlinx-cbor.api │ │ │ │ └── ktor-serialization-kotlinx-cbor.klib.api │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ ├── src │ │ │ │ │ └── io │ │ │ │ │ │ └── ktor │ │ │ │ │ │ └── serialization │ │ │ │ │ │ └── kotlinx │ │ │ │ │ │ └── cbor │ │ │ │ │ │ └── CborSupport.kt │ │ │ │ └── test │ │ │ │ │ ├── CborContextualSerializationTest.kt │ │ │ │ │ └── CborSerializationTest.kt │ │ │ └── jvm │ │ │ │ └── test │ │ │ │ ├── CborClientKotlinxSerializationTest.kt │ │ │ │ └── CborServerKotlinxSerializationTest.kt │ │ ├── ktor-serialization-kotlinx-json │ │ │ ├── api │ │ │ │ ├── ktor-serialization-kotlinx-json.api │ │ │ │ └── ktor-serialization-kotlinx-json.klib.api │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ ├── src │ │ │ │ │ └── io │ │ │ │ │ │ └── ktor │ │ │ │ │ │ └── serialization │ │ │ │ │ │ └── kotlinx │ │ │ │ │ │ └── json │ │ │ │ │ │ ├── ExperimentalJsonConverter.kt │ │ │ │ │ │ ├── JsonSupport.kt │ │ │ │ │ │ └── KotlinxSerializationJsonExtensions.kt │ │ │ │ └── test │ │ │ │ │ ├── JsonContextualSerializationTest.kt │ │ │ │ │ └── JsonSerializationTest.kt │ │ │ ├── js │ │ │ │ └── src │ │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── serialization │ │ │ │ │ └── kotlinx │ │ │ │ │ └── json │ │ │ │ │ └── JsonExtensionsJs.kt │ │ │ ├── jvm │ │ │ │ ├── resources │ │ │ │ │ └── META-INF │ │ │ │ │ │ └── services │ │ │ │ │ │ └── io.ktor.serialization.kotlinx.KotlinxSerializationExtensionProvider │ │ │ │ ├── src │ │ │ │ │ └── io │ │ │ │ │ │ └── ktor │ │ │ │ │ │ └── serialization │ │ │ │ │ │ └── kotlinx │ │ │ │ │ │ └── json │ │ │ │ │ │ └── JsonExtensionsJvm.kt │ │ │ │ └── test │ │ │ │ │ ├── JsonClientKotlinxSerializationJsonJvmTest.kt │ │ │ │ │ ├── JsonClientKotlinxSerializationTest.kt │ │ │ │ │ ├── JsonServerKotlinxSerializationTest.kt │ │ │ │ │ ├── KotlinxContentNegotiationTest.kt │ │ │ │ │ └── KotlinxJsonWebsocketTest.kt │ │ │ ├── posix │ │ │ │ └── src │ │ │ │ │ └── io │ │ │ │ │ └── ktor │ │ │ │ │ └── serialization │ │ │ │ │ └── kotlinx │ │ │ │ │ └── json │ │ │ │ │ └── JsonExtensionsNative.kt │ │ │ └── wasmJs │ │ │ │ └── src │ │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── serialization │ │ │ │ └── kotlinx │ │ │ │ └── json │ │ │ │ └── JsonExtensionsWasm.kt │ │ ├── ktor-serialization-kotlinx-protobuf │ │ │ ├── api │ │ │ │ ├── ktor-serialization-kotlinx-protobuf.api │ │ │ │ └── ktor-serialization-kotlinx-protobuf.klib.api │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ ├── src │ │ │ │ │ └── io │ │ │ │ │ │ └── ktor │ │ │ │ │ │ └── serialization │ │ │ │ │ │ └── kotlinx │ │ │ │ │ │ └── protobuf │ │ │ │ │ │ └── ProtoBufSupport.kt │ │ │ │ └── test │ │ │ │ │ ├── ProtoBufContextualSerializationTest.kt │ │ │ │ │ └── ProtoBufSerializationTest.kt │ │ │ └── jvm │ │ │ │ └── test │ │ │ │ ├── ProtoBufClientKotlinxSerializationTest.kt │ │ │ │ └── ProtoBufServerKotlinxSerializationTest.kt │ │ ├── ktor-serialization-kotlinx-tests │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ └── src │ │ │ │ │ ├── AbstractContextualSerializationTest.kt │ │ │ │ │ └── AbstractSerializationTest.kt │ │ │ └── jvm │ │ │ │ └── src │ │ │ │ └── AbstractServerSerializationKotlinxTest.kt │ │ ├── ktor-serialization-kotlinx-xml │ │ │ ├── api │ │ │ │ ├── ktor-serialization-kotlinx-xml.api │ │ │ │ └── ktor-serialization-kotlinx-xml.klib.api │ │ │ ├── build.gradle.kts │ │ │ ├── common │ │ │ │ ├── src │ │ │ │ │ └── io │ │ │ │ │ │ └── ktor │ │ │ │ │ │ └── serialization │ │ │ │ │ │ └── kotlinx │ │ │ │ │ │ └── xml │ │ │ │ │ │ └── XmlSupport.kt │ │ │ │ └── test │ │ │ │ │ └── XmlSerializationTest.kt │ │ │ └── jvm │ │ │ │ └── test │ │ │ │ ├── XmlClientKotlinxSerializationTest.kt │ │ │ │ └── XmlServerKotlinxSerializationTest.kt │ │ └── posix │ │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── serialization │ │ │ └── kotlinx │ │ │ └── ExtensionsNative.kt │ └── ktor-serialization-tests │ │ ├── build.gradle.kts │ │ └── jvm │ │ └── src │ │ └── AbstractServerSerializationTest.kt ├── ktor-sse │ ├── api │ │ ├── ktor-sse.api │ │ └── ktor-sse.klib.api │ ├── build.gradle.kts │ └── common │ │ └── src │ │ └── io │ │ └── ktor │ │ └── sse │ │ └── ServerSentEvent.kt ├── ktor-test-base │ ├── build.gradle.kts │ ├── common │ │ ├── src │ │ │ └── io │ │ │ │ └── ktor │ │ │ │ └── test │ │ │ │ ├── TestResult.kt │ │ │ │ └── runTestWithData.kt │ │ └── test │ │ │ └── io │ │ │ └── ktor │ │ │ └── test │ │ │ └── RunTestWithDataTest.kt │ ├── js │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── test │ │ │ └── TestResult.js.kt │ ├── jsAndWasmShared │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── test │ │ │ └── TestResult.jsAndWasmShared.kt │ ├── jvm │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── test │ │ │ └── junit │ │ │ ├── Assertions.kt │ │ │ ├── ErrorCollector.kt │ │ │ └── MultipleFailureException.kt │ ├── jvmAndPosix │ │ └── src │ │ │ └── io │ │ │ └── ktor │ │ │ └── test │ │ │ └── TestResult.jvmAndPosix.kt │ └── wasmJs │ │ └── src │ │ └── io │ │ └── ktor │ │ └── test │ │ └── TestResult.wasmJs.kt ├── ktor-websocket-serialization │ ├── api │ │ ├── ktor-websocket-serialization.api │ │ └── ktor-websocket-serialization.klib.api │ ├── build.gradle.kts │ └── common │ │ └── src │ │ └── io │ │ └── ktor │ │ └── websocket │ │ └── serialization │ │ └── WebsocketChannelSerialization.kt └── ktor-websockets │ ├── api │ ├── ktor-websockets.api │ └── ktor-websockets.klib.api │ ├── build.gradle.kts │ ├── common │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── websocket │ │ │ ├── CloseReason.kt │ │ │ ├── DefaultWebSocketSession.kt │ │ │ ├── FrameCommon.kt │ │ │ ├── FrameTooBigException.kt │ │ │ ├── FrameType.kt │ │ │ ├── PingPong.kt │ │ │ ├── ProtocolViolationException.kt │ │ │ ├── RawWebSocketCommon.kt │ │ │ ├── Utils.kt │ │ │ ├── WebSocketExtension.kt │ │ │ ├── WebSocketExtensionHeader.kt │ │ │ └── WebSocketSession.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── tests │ │ └── http │ │ └── cio │ │ └── websocket │ │ ├── FrameCloseTest.kt │ │ └── WebSocketExtensionHeaderTest.kt │ ├── jsAndWasmShared │ └── src │ │ └── io │ │ └── ktor │ │ └── websocket │ │ ├── FrameJs.kt │ │ ├── RawWebSocket.kt │ │ └── UtilsJs.kt │ ├── jvm │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── websocket │ │ │ ├── Frame.kt │ │ │ ├── FrameParser.kt │ │ │ ├── RawWebSocketJvm.kt │ │ │ ├── Serializer.kt │ │ │ ├── SimpleFrameCollector.kt │ │ │ ├── UtilsJvm.kt │ │ │ ├── WebSocketDeflateExtension.kt │ │ │ ├── WebSocketReader.kt │ │ │ ├── WebSocketWriter.kt │ │ │ └── internals │ │ │ ├── BytePacketUtils.kt │ │ │ └── DeflaterUtils.kt │ └── test │ │ ├── ParserTest.kt │ │ ├── WebSocketDeflateTest.kt │ │ ├── WebSocketReaderTest.kt │ │ └── WriterTest.kt │ └── posix │ └── src │ └── io │ └── ktor │ └── websocket │ ├── FrameNative.kt │ ├── RawWebSocket.kt │ └── UtilsNative.kt ├── ktor-test-dispatcher ├── api │ ├── ktor-test-dispatcher.api │ └── ktor-test-dispatcher.klib.api ├── build.gradle.kts ├── common │ └── src │ │ └── TestCommon.kt ├── js │ └── src │ │ └── TestJs.kt ├── jvm │ └── src │ │ └── TestJvm.kt ├── posix │ └── src │ │ └── TestPosix.kt └── wasmJs │ └── src │ └── TestWasm.kt ├── ktor-test-server ├── README.md ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ ├── test-server.gradle.kts │ └── test │ └── server │ ├── ClientTestServer.kt │ ├── ServerUtils.kt │ ├── TestServer.kt │ ├── TestServerService.kt │ ├── TestTcpServer.kt │ └── tests │ ├── Auth.kt │ ├── Bom.kt │ ├── Builders.kt │ ├── Cache.kt │ ├── CloseableGroup.kt │ ├── Content.kt │ ├── Cookies.kt │ ├── Download.kt │ ├── Encoding.kt │ ├── Events.kt │ ├── Features.kt │ ├── Forms.kt │ ├── Headers.kt │ ├── Json.kt │ ├── Logging.kt │ ├── MultiPartFormData.kt │ ├── Multithreaded.kt │ ├── Redirect.kt │ ├── Serialization.kt │ ├── ServerSentEvents.kt │ ├── Tcp.kt │ ├── Timeout.kt │ ├── Upload.kt │ └── WebSockets.kt ├── ktor-utils ├── androidNative │ ├── interop │ │ └── threadUtils.def │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ └── ThreadInfo.androidNative.kt ├── api │ ├── ktor-utils.api │ └── ktor-utils.klib.api ├── build.gradle.kts ├── common │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── util │ │ │ ├── Attributes.kt │ │ │ ├── Base64.kt │ │ │ ├── ByteChannels.kt │ │ │ ├── Bytes.kt │ │ │ ├── CaseInsensitiveMap.kt │ │ │ ├── CaseInsensitiveSet.kt │ │ │ ├── Charset.kt │ │ │ ├── Collections.kt │ │ │ ├── ContentEncoder.kt │ │ │ ├── CoroutinesUtils.kt │ │ │ ├── Crypto.kt │ │ │ ├── DelegatingMutableSet.kt │ │ │ ├── Encoders.kt │ │ │ ├── Hash.kt │ │ │ ├── HashFunction.kt │ │ │ ├── NonceManager.kt │ │ │ ├── PlatformUtils.kt │ │ │ ├── Ranges.kt │ │ │ ├── StackFrames.kt │ │ │ ├── StringValues.kt │ │ │ ├── Text.kt │ │ │ ├── Throwable.kt │ │ │ ├── cio │ │ │ ├── Channels.kt │ │ │ └── Readers.kt │ │ │ ├── collections │ │ │ ├── CollectionUtils.kt │ │ │ ├── ConcurrentMap.kt │ │ │ ├── ConcurrentSet.kt │ │ │ ├── CopyOnWriteHashMap.kt │ │ │ └── MapDelegates.kt │ │ │ ├── converters │ │ │ ├── ConversionService.kt │ │ │ └── DataConversion.kt │ │ │ ├── date │ │ │ ├── Date.kt │ │ │ └── GMTDateParser.kt │ │ │ ├── debug │ │ │ ├── ContextUtils.kt │ │ │ ├── IntellijIdeaDebugDetector.kt │ │ │ └── plugins │ │ │ │ ├── PluginName.kt │ │ │ │ └── PluginsTrace.kt │ │ │ ├── internal │ │ │ ├── ExceptionUtils.kt │ │ │ └── LockFreeLinkedList.kt │ │ │ ├── logging │ │ │ ├── KtorSimpleLogger.kt │ │ │ └── Logger.kt │ │ │ ├── network │ │ │ └── NetworkAddress.kt │ │ │ ├── pipeline │ │ │ ├── DebugPipelineContext.kt │ │ │ ├── PhaseContent.kt │ │ │ ├── Pipeline.kt │ │ │ ├── PipelineContext.kt │ │ │ ├── PipelinePhase.kt │ │ │ ├── PipelinePhaseRelation.kt │ │ │ ├── StackTraceRecover.kt │ │ │ ├── StackWalkingFailed.kt │ │ │ ├── StackWalkingFailedFrame.kt │ │ │ └── SuspendFunctionGun.kt │ │ │ └── reflect │ │ │ └── Type.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── util │ │ ├── AttributesTest.kt │ │ ├── Base64Test.kt │ │ ├── CaseInsensitiveMapTest.kt │ │ ├── ChannelTest.kt │ │ ├── GMTDateParserTest.kt │ │ ├── GMTDateTest.kt │ │ ├── HashFunctionTest.kt │ │ ├── NonceTest.kt │ │ ├── PipelineContractsTest.kt │ │ ├── PipelinePhasesTest.kt │ │ ├── PipelineTest.kt │ │ ├── StringValuesBuilderTest.kt │ │ ├── StringValuesTest.kt │ │ ├── SuspendFunctionGunTest.kt │ │ └── converters │ │ └── DataConversionTest.kt ├── darwin │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ └── ThreadInfoDarwin.kt ├── js │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ ├── PlatformUtils.js.kt │ │ ├── TargetUtilsJs.kt │ │ ├── date │ │ └── DateJs.kt │ │ └── pipeline │ │ └── PipelineJs.kt ├── jsAndWasmShared │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── util │ │ │ ├── AttributesJs.kt │ │ │ ├── CollectionsJs.kt │ │ │ ├── ContentEncodersJs.kt │ │ │ ├── CryptoJs.kt │ │ │ ├── PlatformUtilsJs.kt │ │ │ ├── StackFramesJs.kt │ │ │ ├── TargetUtilsJsWasm.kt │ │ │ ├── collections │ │ │ └── ConcurrentMapJs.kt │ │ │ ├── converters │ │ │ └── ConversionServiceJs.kt │ │ │ ├── debug │ │ │ └── IntellijIdeaDebugDetectorJs.kt │ │ │ ├── internal │ │ │ └── ExceptionUtilsJs.kt │ │ │ ├── logging │ │ │ ├── KtorSimpleLoggerJs.kt │ │ │ └── LoggerJs.kt │ │ │ ├── network │ │ │ └── NetworkAddressJs.kt │ │ │ ├── pipeline │ │ │ ├── PipelineContext.js.kt │ │ │ └── StackTraceRecoverJs.kt │ │ │ └── reflect │ │ │ └── TypeInfoJs.kt │ └── test │ │ └── io.ktor.util │ │ └── CryptoTest.kt ├── jvm │ ├── resources │ │ └── META-INF │ │ │ └── proguard │ │ │ └── ktor.pro │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── util │ │ │ ├── AttributesJvm.kt │ │ │ ├── BufferViewJvm.kt │ │ │ ├── Cache.kt │ │ │ ├── CollectionsJvm.kt │ │ │ ├── ContentEncodersJvm.kt │ │ │ ├── CryptoJvm.kt │ │ │ ├── Deflater.kt │ │ │ ├── EncodersJvm.kt │ │ │ ├── InputJvm.kt │ │ │ ├── NIO.kt │ │ │ ├── NioPath.kt │ │ │ ├── Nonce.kt │ │ │ ├── Path.kt │ │ │ ├── PlatformUtilsJvm.kt │ │ │ ├── StackFramesJvm.kt │ │ │ ├── StatelessHmacNonceManager.kt │ │ │ ├── cio │ │ │ ├── ByteBufferPool.kt │ │ │ ├── FileChannels.kt │ │ │ ├── FileChannelsAtNioPath.kt │ │ │ ├── InputStreamAdapters.kt │ │ │ ├── OutputStreamAdapters.kt │ │ │ └── ReadersJvm.kt │ │ │ ├── collections │ │ │ └── ConcurrentMapJvm.kt │ │ │ ├── converters │ │ │ └── ConversionServiceJvm.kt │ │ │ ├── date │ │ │ └── DateJvm.kt │ │ │ ├── debug │ │ │ └── IntellijIdeaDebugDetectorJvm.kt │ │ │ ├── internal │ │ │ └── ExceptionUtilsJvm.kt │ │ │ ├── logging │ │ │ ├── KtorSimpleLoggerJvm.kt │ │ │ └── LoggerJvm.kt │ │ │ ├── network │ │ │ └── NetworkAddressJvm.kt │ │ │ ├── pipeline │ │ │ ├── PipelineContext.jvm.kt │ │ │ ├── PipelineJvm.kt │ │ │ └── StackTraceRecoverJvm.kt │ │ │ └── reflect │ │ │ ├── ServiceLoader.kt │ │ │ └── TypeInfoJvm.kt │ └── test │ │ └── io │ │ └── ktor │ │ ├── tests │ │ └── utils │ │ │ ├── CacheTest.kt │ │ │ ├── DeflaterReadChannelTest.kt │ │ │ ├── DropLeadingTopDirsTest.kt │ │ │ ├── FileChannelTest.kt │ │ │ ├── HexFunctionsTest.kt │ │ │ ├── InputJvmTest.kt │ │ │ ├── NonceSmokeTest.kt │ │ │ ├── StackWalkingFailedTest.kt │ │ │ ├── StatelessHmacNonceManagerTest.kt │ │ │ └── converters │ │ │ └── DataConversionTest.kt │ │ └── util │ │ ├── GMTDateCalendarTest.kt │ │ └── HashFunctionConsistencyTest.kt ├── linux │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ └── ThreadInfoLinux.kt ├── mingwX64 │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ ├── CryptoMingw.kt │ │ ├── ThreadInfoMingw.kt │ │ └── date │ │ └── DateMingw.kt ├── nix │ ├── interop │ │ └── threadUtils.def │ └── src │ │ └── io │ │ └── ktor │ │ └── util │ │ ├── CryptoPosix.kt │ │ └── date │ │ └── DateNix.kt ├── posix │ ├── src │ │ └── io │ │ │ └── ktor │ │ │ └── util │ │ │ ├── AttributesNative.kt │ │ │ ├── CollectionsNative.kt │ │ │ ├── ContentEncodersNative.kt │ │ │ ├── CoroutineUtils.kt │ │ │ ├── CryptoNative.kt │ │ │ ├── PlatformUtilsNative.kt │ │ │ ├── StackFramesNative.kt │ │ │ ├── ThreadInfo.kt │ │ │ ├── collections │ │ │ ├── ConcurrentMapNative.kt │ │ │ └── LockFreeMPSCQueueNative.kt │ │ │ ├── converters │ │ │ └── ConversionServiceNative.kt │ │ │ ├── date │ │ │ └── DateNative.kt │ │ │ ├── debug │ │ │ └── IntellijIdeaDebugDetectorNative.kt │ │ │ ├── internal │ │ │ └── ExceptionUtilsPosix.kt │ │ │ ├── logging │ │ │ ├── KtorSimpleLoggerNative.kt │ │ │ ├── LogLevelNative.kt │ │ │ └── LoggerNative.kt │ │ │ ├── network │ │ │ └── NetworkAddressNative.kt │ │ │ ├── pipeline │ │ │ ├── PipelineContext.posix.kt │ │ │ ├── PipelineNative.kt │ │ │ └── StackTraceRecoverNative.kt │ │ │ └── reflect │ │ │ └── TypeInfoNative.kt │ └── test │ │ └── io │ │ └── ktor │ │ └── util │ │ └── MultiWorkerDispatcherTest.kt └── wasmJs │ └── src │ └── io │ └── ktor │ └── util │ ├── PlatformUtils.wasmJs.kt │ ├── TargetUtilsWasm.kt │ ├── date │ ├── Date.kt │ └── DateWasm.kt │ └── pipeline │ └── PipelineWasm.kt ├── ktor-version-catalog └── build.gradle.kts ├── renovate.json ├── settings.gradle.kts └── teamcity.default.properties /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "dockerfile": "./Dockerfile" 4 | }, 5 | "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", 6 | // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root 7 | "remoteUser": "developer" 8 | } 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Create 4 | url: https://youtrack.jetbrains.com/newIssue?project=KTOR 5 | about: Please report any new issues to the JetBrains YouTrack 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/issue_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report or Feature request 3 | about: Create an issue to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 🚨 Important: We manage all our issues and tickets in [YouTrack](https://youtrack.jetbrains.com/issues?q=project:%20KTOR) for better tracking and faster feedback. 11 | 12 | 📌 To report a bug, request a feature, or submit an issue, please use our [YouTrack project](https://youtrack.jetbrains.com/newissue?project=ktor). 13 | 14 | Thank you for your understanding and cooperation! 🙏 15 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **Subsystem** 2 | Client/Server, related modules 3 | 4 | **Motivation** 5 | Describe what problem this PR solves and why it is important. Refer to a bug/ticket #. 6 | 7 | **Solution** 8 | Describe your solution. 9 | 10 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [ push, pull_request ] 3 | 4 | permissions: 5 | contents: read # to fetch code (actions/checkout) 6 | 7 | jobs: 8 | validation: 9 | name: "Validation" 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: gradle/actions/wrapper-validation@v4 14 | -------------------------------------------------------------------------------- /.idea/copyright/Apache_2_oneliner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/leonid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | coroutine 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/dictionaries/leonidstasevskij.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | chunked 5 | ktor 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/externalDependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | This project and the corresponding community is governed by the [JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct). Please make sure you read it. 4 | 5 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.base.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import ktorbuild.* 6 | import ktorbuild.internal.resolveVersion 7 | 8 | version = resolveVersion() 9 | 10 | ProjectTagsService.register(project) 11 | extensions.create(KtorBuildExtension.NAME) 12 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.codestyle.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import ktorbuild.internal.ktorBuild 6 | 7 | plugins { 8 | id("org.jmailen.kotlinter") 9 | } 10 | 11 | kotlinter { 12 | // Don't fail lint tasks on CI as we don't want TeamCity to show a build failure in addition to an actual lint report 13 | ignoreLintFailures = ktorBuild.isCI.get() 14 | reporters = arrayOf("checkstyle", "plain") 15 | } 16 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.compatibility.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("binary-compatibility-validator") 7 | } 8 | 9 | apiValidation { 10 | @OptIn(kotlinx.validation.ExperimentalBCVApi::class) 11 | klib { 12 | enabled = true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.dokka.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("org.jetbrains.dokka") 7 | } 8 | 9 | dokka { 10 | dokkaSourceSets.configureEach { 11 | sourceLink { 12 | localDirectory = rootDir 13 | remoteUrl("https://github.com/ktorio/ktor/blob/$version") 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.project.internal.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.kmp") 7 | } 8 | 9 | kotlin { 10 | // Disable explicit API by default for internal projects 11 | explicitApi = null 12 | } 13 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.project.library.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import ktorbuild.* 6 | 7 | plugins { 8 | id("ktorbuild.kmp") 9 | id("ktorbuild.dokka") 10 | id("ktorbuild.publish") 11 | id("ktorbuild.compatibility") 12 | } 13 | 14 | addProjectTag(ProjectTag.Library) 15 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.project.server-plugin.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(project(":ktor-server-core")) 13 | } 14 | commonTest.dependencies { 15 | implementation(project(":ktor-server-test-base")) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild.publish.verifier.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import ktorbuild.* 6 | import ktorbuild.internal.publish.ValidatePublishedArtifactsTask 7 | 8 | val publishedProjects = projectsWithTag(ProjectTag.Published) 9 | 10 | tasks.register(ValidatePublishedArtifactsTask.NAME) { 11 | dependsOn(publishedProjects) 12 | } 13 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/ktorbuild/internal/String.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package ktorbuild.internal 6 | 7 | internal fun String.capitalized() = replaceFirstChar { it.uppercase() } 8 | -------------------------------------------------------------------------------- /build-settings-logic/src/main/kotlin/ktorsettings.settings.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | // Plugins to be applied to all the root project and included builds 6 | plugins { 7 | id("ktorsettings.dependency-resolution-management") 8 | id("ktorsettings.kotlin-user-project") 9 | } 10 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.doctor") 7 | id("ktorbuild.publish.verifier") 8 | } 9 | 10 | println("Build version: ${project.version}") 11 | println("Kotlin version: ${libs.versions.kotlin.get()}") 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /ktor-client/api/ktor-client.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/api/ktor-client.api -------------------------------------------------------------------------------- /ktor-client/api/ktor-client.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/api/ktor-client.klib.api -------------------------------------------------------------------------------- /ktor-client/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(projects.ktorClientCore) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ktor-client/jvm/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/jvm/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-android/api/ktor-client-android.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-android/api/ktor-client-android.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-android/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.android.AndroidEngineContainer -------------------------------------------------------------------------------- /ktor-client/ktor-client-android/jvm/test/io/ktor/client/engine/android/AndroidHttpClientTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.android 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class AndroidHttpClientTest : HttpClientTest(Android) 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache/api/ktor-client-apache.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-apache/api/ktor-client-apache.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.apache.ApacheEngineContainer -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache/jvm/src/io/ktor/client/engine/apache/ApacheUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.apache 6 | 7 | import java.net.* 8 | 9 | /** 10 | * Checks the message of the exception and identifies timeout exception by it. 11 | */ 12 | internal fun ConnectException.isTimeoutException() = message?.contains("Timeout connecting") ?: false 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache/jvm/test/io/ktor/client/engine/apache/ApacheHttpClientTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.apache 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class ApacheHttpClientTest : HttpClientTest(Apache) 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache/jvm/test/io/ktor/client/engine/apache/ApacheHttpsTest.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine.apache 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class ApacheHttpsTest : HttpsTest(Apache) { 10 | 11 | override fun ApacheEngineConfig.disableCertificatePinning() { 12 | this.sslContext = this@ApacheHttpsTest.unsafeSslContext 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/api/ktor-client-apache5.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-apache5/api/ktor-client-apache5.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.apache5.Apache5EngineContainer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/jvm/src/io/ktor/client/engine/apache5/ApacheUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.apache5 6 | 7 | import java.net.* 8 | 9 | /** 10 | * Checks the message of the exception and identifies timeout exception by it. 11 | */ 12 | internal fun ConnectException.isTimeoutException() = message?.contains("Timeout connecting") ?: false 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/jvm/test-resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss} %thread %-5level %logger{36} %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/jvm/test/io/ktor/client/engine/apache5/Apache5HttpClientTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.apache5 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class Apache5HttpClientTest : HttpClientTest(Apache5) 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-apache5/jvm/test/io/ktor/client/engine/apache5/Apache5HttpsTest.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine.apache5 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class Apache5HttpsTest : HttpsTest(Apache5) { 10 | 11 | override fun Apache5EngineConfig.disableCertificatePinning() { 12 | this.sslContext = this@Apache5HttpsTest.unsafeSslContext 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | target.js.browser=false 5 | target.wasmJs.browser=false 6 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.cio.CIOEngineContainer -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/jvm/src/io/ktor/client/engine/cio/CIOEngineContainer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.* 8 | import io.ktor.client.engine.* 9 | import io.ktor.utils.io.* 10 | 11 | @InternalAPI 12 | public class CIOEngineContainer : HttpClientEngineContainer { 13 | override val factory: HttpClientEngineFactory<*> = CIO 14 | 15 | override fun toString(): String = "CIO" 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/jvm/test/io/ktor/client/engine/cio/CIOHttpClientTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class CIOHttpClientTest : HttpClientTest(CIO) 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/jvm/test/io/ktor/client/engine/cio/CIOHttpsTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class CIOHttpsTest : HttpsTest(CIO) { 10 | 11 | override fun CIOEngineConfig.disableCertificatePinning() { 12 | https { 13 | trustManager = trustAllCertificates[0] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/nonJvm/src/io/ktor/client/engine/cio/ExceptionUtils.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.request.* 8 | 9 | internal actual fun Throwable.mapToKtor(request: HttpRequestData): Throwable = this 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/posix/src/io/ktor/client/engine/cio/Loader.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.engine.* 8 | import io.ktor.utils.io.* 9 | 10 | @Suppress("DEPRECATION") 11 | @OptIn(ExperimentalStdlibApi::class, InternalAPI::class) 12 | @EagerInitialization 13 | private val initHook = engines.append(CIO) 14 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-cio/wasmJs/src/io/ktor/client/engine/cio/Loader.wasmJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.cio 6 | 7 | import io.ktor.client.engine.* 8 | import io.ktor.util.* 9 | import io.ktor.utils.io.* 10 | 11 | @Suppress("DEPRECATION") 12 | @OptIn(InternalAPI::class, ExperimentalStdlibApi::class) 13 | @EagerInitialization 14 | private val initHook: Unit = run { 15 | if (PlatformUtils.IS_NODE) engines.append(CIO) 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/common/src/io/ktor/client/request/UnixSockets.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | package io.ktor.client.request 5 | 6 | import io.ktor.client.engine.* 7 | import io.ktor.utils.io.InternalAPI 8 | 9 | @InternalAPI 10 | public class UnixSocketSettings(public val path: String) 11 | 12 | @OptIn(InternalAPI::class) 13 | public data object UnixSocketCapability : HttpClientEngineCapability 14 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/common/src/io/ktor/client/utils/headers.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.utils 6 | 7 | import io.ktor.http.* 8 | 9 | /** 10 | * Builds an instance of [Headers] using the [block] function. 11 | * 12 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.client.utils.buildHeaders) 13 | */ 14 | public fun buildHeaders(block: HeadersBuilder.() -> Unit = {}): Headers = 15 | HeadersBuilder().apply(block).build() 16 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/js/src/io/ktor/client/engine/js/ReadableStream.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.js 6 | 7 | import org.khronos.webgl.* 8 | 9 | @Suppress("UnsafeCastFromDynamic") 10 | internal fun Uint8Array.asByteArray(): ByteArray { 11 | return Int8Array(buffer, byteOffset, length).asDynamic() 12 | } 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/jsAndWasmShared/src/io/ktor/client/engine/HttpClientEngineBase.js.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual fun ioDispatcher(): CoroutineDispatcher = Dispatchers.Default 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/jsAndWasmShared/src/io/ktor/client/plugins/observer/ResponseObserverContextJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.observer 6 | 7 | import kotlin.coroutines.* 8 | 9 | internal actual suspend fun getResponseObserverContext(): CoroutineContext = EmptyCoroutineContext 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/jvm/src/io/ktor/client/engine/HttpClientEngineBase.jvm.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual fun ioDispatcher(): CoroutineDispatcher = Dispatchers.IO 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/jvm/src/io/ktor/client/plugins/observer/ResponseObserverContextJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.observer 6 | 7 | import kotlinx.coroutines.slf4j.* 8 | import kotlin.coroutines.* 9 | 10 | internal actual suspend fun getResponseObserverContext(): CoroutineContext = 11 | coroutineContext[MDCContext] ?: EmptyCoroutineContext 12 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/posix/src/io/ktor/client/engine/HttpClientEngineBase.posix.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual fun ioDispatcher(): CoroutineDispatcher = Dispatchers.IO 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-core/posix/src/io/ktor/client/plugins/observer/ResponseObserverContextPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.observer 6 | 7 | import kotlin.coroutines.* 8 | 9 | internal actual suspend fun getResponseObserverContext(): CoroutineContext = EmptyCoroutineContext 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libcrypto.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libcurl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxArm64/libssl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libcrypto.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libcurl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/linuxX64/libssl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/macosArm64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/macosArm64/libcurl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/macosX64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/macosX64/libcurl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libcrypto.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libcurl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libssl.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libz.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-curl/desktop/interop/lib/mingwX64/libz.a -------------------------------------------------------------------------------- /ktor-client/ktor-client-darwin-legacy/darwin/src/io/ktor/client/engine/darwin/DarwinHttpRequestException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.darwin 6 | 7 | import kotlinx.io.* 8 | import platform.Foundation.* 9 | 10 | public class DarwinHttpRequestException(public val origin: NSError) : IOException("Exception in http request: $origin") 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-ios/api/ktor-client-ios.klib.api: -------------------------------------------------------------------------------- 1 | // Klib ABI Dump 2 | // Targets: [iosArm64, iosSimulatorArm64, iosX64, macosArm64, macosX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] 3 | // Rendering settings: 4 | // - Signature version: 2 5 | // - Show manifest properties: true 6 | // - Show declarations: true 7 | 8 | // Library unique name: 9 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-ios/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | darwinMain.dependencies { 12 | api(projects.ktorClientDarwin) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-ios/darwin/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-ios/darwin/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-ios/darwin/src/Stub.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | internal fun publicationStub() = Unit 6 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-java/api/ktor-client-java.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-java/api/ktor-client-java.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-java/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.java.JavaHttpEngineContainer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-java/jvm/test/io/ktor/client/engine/java/JavaClientTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.java 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class JavaClientTest : HttpClientTest(Java) 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-java/jvm/test/io/ktor/client/engine/java/JavaHttpsTest.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine.java 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class JavaHttpsTest : HttpsTest(Java) { 10 | 11 | override fun JavaHttpConfig.disableCertificatePinning() { 12 | config { 13 | sslContext(unsafeSslContext) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-jetty-jakarta/api/ktor-client-jetty-jakarta.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-jetty-jakarta/api/ktor-client-jetty-jakarta.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-jetty-jakarta/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.jetty.jakarta.JettyEngineContainer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-jetty/api/ktor-client-jetty.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-jetty/api/ktor-client-jetty.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-jetty/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.jetty.JettyEngineContainer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-js/api/ktor-client-js.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-js/api/ktor-client-js.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-js/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | jsMain.dependencies { 12 | api(projects.ktorClientCore) 13 | } 14 | 15 | wasmJsMain.dependencies { 16 | api(projects.ktorClientCore) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-js/js/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-js/js/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-js/wasmJs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-js/wasmJs/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-okhttp/api/ktor-client-okhttp.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-okhttp/api/ktor-client-okhttp.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-okhttp/jvm/resources/META-INF/services/io.ktor.client.HttpClientEngineContainer: -------------------------------------------------------------------------------- 1 | io.ktor.client.engine.okhttp.OkHttpEngineContainer -------------------------------------------------------------------------------- /ktor-client/ktor-client-okhttp/jvm/test/io/ktor/client/engine/okhttp/OkHttpHttpsTest.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.client.engine.okhttp 6 | 7 | import io.ktor.client.tests.* 8 | 9 | class OkHttpHttpsTest : HttpsTest(OkHttp) { 10 | 11 | override fun OkHttpConfig.disableCertificatePinning() { 12 | config { 13 | sslSocketFactory(unsafeSslContext.socketFactory, trustAllCertificates[0]) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-auth/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Ktor client Auth support" 6 | 7 | plugins { 8 | id("ktorbuild.project.client-plugin") 9 | id("test-server") 10 | } 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-bom-remover/api/ktor-client-bom-remover.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/client/plugins/bomremover/BOMRemoverKt { 2 | public static final fun getBOMRemover ()Lio/ktor/client/plugins/api/ClientPlugin; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-bom-remover/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Ktor client Byte Order Mark support" 6 | 7 | plugins { 8 | id("ktorbuild.project.client-plugin") 9 | id("test-server") 10 | } 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-content-negotiation/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Ktor client Content Negotiation support" 6 | 7 | plugins { 8 | id("ktorbuild.project.client-plugin") 9 | id("kotlinx-serialization") 10 | } 11 | 12 | kotlin { 13 | sourceSets { 14 | commonMain.dependencies { 15 | api(projects.ktorSerialization) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-content-negotiation/jsAndWasmShared/src/DefaultIgnoredTypesJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.contentnegotiation 6 | 7 | import io.ktor.http.content.* 8 | import io.ktor.utils.io.* 9 | import kotlin.reflect.* 10 | 11 | internal actual val DefaultIgnoredTypes: Set> = 12 | mutableSetOf() 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-content-negotiation/jvm/src/DefaultIgnoredTypesJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.contentnegotiation 6 | 7 | import java.io.* 8 | import kotlin.reflect.* 9 | 10 | internal actual val DefaultIgnoredTypes: Set> = 11 | mutableSetOf(InputStream::class) 12 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-content-negotiation/posix/src/DefaultIgnoredTypesNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.contentnegotiation 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual val DefaultIgnoredTypes: Set> = mutableSetOf() 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-encoding/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.client-plugin") 7 | id("test-server") 8 | } 9 | 10 | kotlin { 11 | sourceSets { 12 | jvmTest.dependencies { 13 | api(projects.ktorServerTestHost) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/jsAndWasmShared/src/io/ktor/client/plugins/json/JsonPluginJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.json 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual val DefaultIgnoredTypes: Set> = 10 | mutableSetOf() 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/jvm/src/io/ktor/client/plugins/json/JsonPluginJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.json 6 | 7 | import java.io.* 8 | import kotlin.reflect.* 9 | 10 | internal actual val DefaultIgnoredTypes: Set> = 11 | mutableSetOf(InputStream::class) 12 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-gson/api/ktor-client-gson.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-gson/api/ktor-client-gson.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-gson/jvm/resources/META-INF/services/io.ktor.client.plugins.json.JsonSerializer: -------------------------------------------------------------------------------- 1 | io.ktor.client.plugins.gson.GsonSerializer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-jackson/api/ktor-client-jackson.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-jackson/api/ktor-client-jackson.klib.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-jackson/jvm/resources/META-INF/services/io.ktor.client.plugins.json.JsonSerializer: -------------------------------------------------------------------------------- 1 | io.ktor.client.plugins.jackson.JacksonSerializer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-serialization/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.client-plugin") 7 | id("kotlinx-serialization") 8 | } 9 | 10 | kotlin { 11 | sourceSets { 12 | commonMain.dependencies { 13 | api(libs.kotlinx.serialization.json) 14 | api(projects.ktorClientJson) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/ktor-client-serialization/jvm/resources/META-INF/services/io.ktor.client.plugins.json.JsonSerializer: -------------------------------------------------------------------------------- 1 | io.ktor.client.plugins.kotlinx.serializer.KotlinxSerializer 2 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-json/posix/src/io/ktor/client/plugins/json/JsonPluginPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.json 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual val DefaultIgnoredTypes: Set> = 10 | mutableSetOf() 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-logging/common/src/io/ktor/client/plugins/logging/KtorMDCContext.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.logging 6 | 7 | import io.ktor.utils.io.* 8 | import kotlin.coroutines.* 9 | 10 | @Suppress("FunctionName") 11 | @InternalAPI 12 | public expect fun MDCContext(): CoroutineContext.Element 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-logging/jsAndWasmShared/src/io/ktor/client/plugins/logging/LoggerJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.logging 6 | 7 | public actual val Logger.Companion.DEFAULT: Logger get() = SIMPLE 8 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-logging/jvm/src/io/ktor/client/plugins/logging/KtorMDCContext.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.logging 6 | 7 | import io.ktor.utils.io.* 8 | import kotlin.coroutines.* 9 | 10 | @Suppress("FunctionName") 11 | @InternalAPI 12 | public actual fun MDCContext(): CoroutineContext.Element { 13 | return kotlinx.coroutines.slf4j.MDCContext() 14 | } 15 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-logging/posix/src/io/ktor/client/plugins/logging/LoggerIos.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.logging 6 | 7 | public actual val Logger.Companion.DEFAULT: Logger get() = Logger.SIMPLE 8 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-resources/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Client side Resources feature" 6 | 7 | plugins { 8 | id("ktorbuild.project.client-plugin") 9 | id("kotlinx-serialization") 10 | } 11 | 12 | kotlin { 13 | sourceSets { 14 | commonMain.dependencies { 15 | api(projects.ktorResources) 16 | api(libs.kotlinx.serialization.core) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-resources/js/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-resources/js/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-resources/jvm/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-resources/jvm/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-resources/posix/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-resources/posix/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-resources/wasmJs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-resources/wasmJs/.gitkeep -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-tracing/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.client-plugin") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(projects.ktorClientCore) 13 | } 14 | jvmTest.dependencies { 15 | implementation(projects.ktorClientCio) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-tracing/ktor-client-tracing-stetho/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-tracing/ktor-client-tracing-stetho/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | # Workaround for KT-38872 6 | kotlin.mpp.enableCompatibilityMetadataVariant=false 7 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-websockets/api/ktor-client-websockets.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-client/ktor-client-plugins/ktor-client-websockets/api/ktor-client-websockets.api -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-websockets/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.client-plugin") 7 | id("test-server") 8 | } 9 | 10 | kotlin { 11 | sourceSets { 12 | commonTest.dependencies { 13 | api(projects.ktorClientLogging) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-plugins/ktor-client-websockets/common/src/Empty.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.plugins.websocket.empty 6 | 7 | /** 8 | * Workaround missing klib for metadata generation. 9 | */ 10 | internal object Empty 11 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-test-base/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.internal") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorClientCore) 15 | api(projects.ktorTestBase) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-test-base/jsAndWasmShared/src/io/ktor/client/test/base/ClientLoader.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.test.base 6 | 7 | import io.ktor.client.engine.* 8 | import io.ktor.utils.io.* 9 | 10 | @OptIn(InternalAPI::class) 11 | internal actual val enginesToTest: Iterable> get() = engines 12 | internal actual val platformName: String get() = "web" 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-test-base/nonJvm/src/io/ktor/client/test/base/ClientLoader.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.test.base 6 | 7 | // supported only on JVM 8 | internal actual fun platformDumpCoroutines() {} 9 | internal actual fun platformWaitForAllCoroutines() {} 10 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-test-base/posix/src/io/ktor/client/test/base/ClientLoader.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.test.base 6 | 7 | import io.ktor.client.engine.* 8 | import io.ktor.utils.io.* 9 | 10 | @OptIn(InternalAPI::class) 11 | internal actual val enginesToTest: Iterable> get() = engines 12 | internal actual val platformName: String get() = "native" 13 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/DefaultEngineTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.tests 6 | 7 | import io.ktor.client.* 8 | import kotlin.test.* 9 | 10 | class DefaultEngineTest { 11 | @Test 12 | @Ignore 13 | fun instantiationTest() { 14 | val client = HttpClient() 15 | client.close() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/utils/Asserter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.tests.utils 6 | 7 | import kotlin.test.assertTrue 8 | 9 | fun assertArrayEquals(message: String, expected: ByteArray, actual: ByteArray) { 10 | assertTrue(message) { expected.contentEquals(actual) } 11 | } 12 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-tests/jvm/test-resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss} %thread %-5level %logger{36} %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ktor-client/ktor-client-winhttp/windows/src/io/ktor/client/engine/winhttp/internal/WinHttpChunkedMode.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.client.engine.winhttp.internal 6 | 7 | /** 8 | * Specifies transfer mode for request body. 9 | */ 10 | internal enum class WinHttpChunkedMode { 11 | // Do not encode body 12 | Disabled, 13 | 14 | // Encode body 15 | Enabled, 16 | 17 | // Use native encoder 18 | Automatic 19 | } 20 | -------------------------------------------------------------------------------- /ktor-dokka/assets/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ktor-http/common/src/io/ktor/content/Compatibility.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | @file:Suppress("KDocMissingDocumentation") 6 | 7 | package io.ktor.content 8 | 9 | public typealias TextContent = io.ktor.http.content.TextContent 10 | 11 | public typealias ByteArrayContent = io.ktor.http.content.ByteArrayContent 12 | -------------------------------------------------------------------------------- /ktor-http/common/src/io/ktor/http/ApplicationResponseProperties.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http 6 | 7 | /** 8 | * Set `E-Tag` header 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.http.etag) 11 | */ 12 | public fun HeadersBuilder.etag(entityTag: String): Unit = set(HttpHeaders.ETag, entityTag) 13 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/internals/Errors.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http.cio.internals 6 | 7 | import io.ktor.utils.io.* 8 | import kotlinx.io.IOException 9 | 10 | @InternalAPI 11 | public class UnsupportedMediaTypeExceptionCIO(message: String) : IOException(message) 12 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/doc/CIO HTTP server job relations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-http/ktor-http-cio/doc/CIO HTTP server job relations.pdf -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/jsAndWasmShared/src/io/ktor/http/cio/MultipartJsAndWasm.kt: -------------------------------------------------------------------------------- 1 | package io.ktor.http.cio 2 | 3 | import io.ktor.utils.io.* 4 | 5 | /* 6 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 7 | */ 8 | 9 | internal actual fun ByteReadChannel.discardBlocking() { 10 | cancel() 11 | } 12 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/jsAndWasmShared/src/io/ktor/http/cio/internals/CharArrayPoolJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http.cio.internals 6 | 7 | internal actual fun isPoolingDisabled(): Boolean = false 8 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/jvm/src/io/ktor/http/cio/internals/CharArrayPoolJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http.cio.internals 6 | 7 | internal actual fun isPoolingDisabled(): Boolean = 8 | System.getProperty("ktor.internal.cio.disable.chararray.pooling")?.toBoolean() ?: false 9 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/jvmAndPosix/src/MultipartJvmAndPosix.kt: -------------------------------------------------------------------------------- 1 | package io.ktor.http.cio 2 | 3 | import io.ktor.utils.io.* 4 | import kotlinx.coroutines.* 5 | 6 | /* 7 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 8 | */ 9 | 10 | internal actual fun ByteReadChannel.discardBlocking() { 11 | runBlocking { 12 | discard() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ktor-http/ktor-http-cio/posix/src/io/ktor/http/cio/internals/CharArrayPoolPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http.cio.internals 6 | 7 | internal actual fun isPoolingDisabled(): Boolean = false 8 | -------------------------------------------------------------------------------- /ktor-http/posix/src/io/ktor/http/URLBuilderPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.http 6 | 7 | /** 8 | * Hostname of current origin. 9 | * 10 | * It uses "localhost" for all platforms except js. 11 | * 12 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.http.origin) 13 | */ 14 | public actual val URLBuilder.Companion.origin: String get() = "http://localhost" 15 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/core/ByteOrder.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public expect enum class ByteOrder { 8 | BIG_ENDIAN, 9 | LITTLE_ENDIAN; 10 | 11 | public companion object { 12 | public fun nativeOrder(): ByteOrder 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/core/Closeable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | import kotlin.use as stdlibUse 8 | 9 | public expect interface Closeable : AutoCloseable 10 | 11 | @Suppress("DeprecatedCallableAddReplaceWith") 12 | @Deprecated("Use stdlib implementation instead. Remove import of this function") 13 | public inline fun T.use(block: (T) -> R): R = stdlibUse(block) 14 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/core/Input.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public typealias Input = kotlinx.io.Source 8 | 9 | public val Input.endOfInput: Boolean 10 | get() = exhausted() 11 | 12 | public fun Input.readAvailable(buffer: ByteArray, offset: Int = 0, length: Int = buffer.size - offset): Int { 13 | val result = readAtMostTo(buffer, offset, offset + length) 14 | return if (result == -1) 0 else result 15 | } 16 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/core/Output.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | import io.ktor.utils.io.* 8 | 9 | /** 10 | * This shouldn't be implemented directly. Inherit [Output] instead. 11 | * 12 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.utils.io.core.Output) 13 | */ 14 | @Deprecated(IO_DEPRECATION_MESSAGE, replaceWith = ReplaceWith("Sink", "kotlinx.io")) 15 | public typealias Output = kotlinx.io.Sink 16 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/core/internal/ChunkBuffer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core.internal 6 | 7 | import io.ktor.utils.io.* 8 | import kotlinx.io.* 9 | 10 | @Deprecated(IO_DEPRECATION_MESSAGE, replaceWith = ReplaceWith("Buffer", "kotlinx.io")) 11 | public typealias ChunkBuffer = kotlinx.io.Buffer 12 | 13 | public val Buffer.writeRemaining: Int get() = Int.MAX_VALUE 14 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/errors/Exceptions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.errors 6 | 7 | @Deprecated("Use kotlinx.io.IOException instead", ReplaceWith("kotlinx.io.IOException")) 8 | public typealias IOException = kotlinx.io.IOException 9 | 10 | @Deprecated("Use kotlinx.io.EOFException instead", ReplaceWith("kotlinx.io.EOFException")) 11 | public typealias EOFException = kotlinx.io.EOFException 12 | -------------------------------------------------------------------------------- /ktor-io/common/src/io/ktor/utils/io/pool/ByteArrayPool.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.pool 6 | 7 | private const val DEFAULT_POOL_ARRAY_SIZE = 4096 8 | private const val DEFAULT_POOL_CAPACITY = 128 9 | 10 | public val ByteArrayPool: ObjectPool = object : DefaultPool(DEFAULT_POOL_CAPACITY) { 11 | override fun produceInstance(): ByteArray = ByteArray(DEFAULT_POOL_ARRAY_SIZE) 12 | } 13 | -------------------------------------------------------------------------------- /ktor-io/js/src/io/ktor/utils/io/charsets/TextEncoder.js.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.charsets 6 | 7 | import org.khronos.webgl.* 8 | 9 | internal external class TextEncoder { 10 | val encoding: String 11 | 12 | fun encode(input: String): Uint8Array 13 | } 14 | -------------------------------------------------------------------------------- /ktor-io/js/src/io/ktor/utils/io/core/Closeable.js.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public actual interface Closeable : AutoCloseable { 8 | override fun close() 9 | } 10 | -------------------------------------------------------------------------------- /ktor-io/jsAndWasmShared/src/io/ktor/utils/io/ByteChannel.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io 6 | 7 | internal actual val DEVELOPMENT_MODE: Boolean 8 | get() = false 9 | -------------------------------------------------------------------------------- /ktor-io/jsAndWasmShared/src/io/ktor/utils/io/JvmSerializable.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io 6 | 7 | @InternalAPI 8 | public actual interface JvmSerializable 9 | 10 | @Suppress("FunctionName") 11 | @InternalAPI 12 | public actual fun JvmSerializerReplacement(serializer: JvmSerializer, value: T): Any = 13 | DummyJvmSimpleSerializerReplacement 14 | -------------------------------------------------------------------------------- /ktor-io/jsAndWasmShared/src/io/ktor/utils/io/charsets/DecodeUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.charsets 6 | 7 | internal inline fun decodeWrap(block: () -> R): R { 8 | try { 9 | return block() 10 | } catch (cause: Throwable) { 11 | throw MalformedInputException("Failed to decode bytes: ${cause.message ?: "no cause provided"}") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ktor-io/jvm/src/io/ktor/utils/io/ByteChannel.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io 6 | 7 | private const val DEVELOPMENT_MODE_KEY: String = "io.ktor.development" 8 | 9 | internal actual val DEVELOPMENT_MODE: Boolean 10 | get() = System.getProperty(DEVELOPMENT_MODE_KEY)?.toBoolean() == true 11 | -------------------------------------------------------------------------------- /ktor-io/jvm/src/io/ktor/utils/io/core/BytePacketBuilderExtensions.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | import kotlinx.io.* 8 | import java.nio.* 9 | 10 | @OptIn(InternalIoApi::class) 11 | public fun Sink.writeFully(buffer: ByteBuffer) { 12 | this.buffer.transferFrom(buffer) 13 | } 14 | -------------------------------------------------------------------------------- /ktor-io/jvm/src/io/ktor/utils/io/core/Closeable.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public actual typealias Closeable = java.io.Closeable 8 | -------------------------------------------------------------------------------- /ktor-io/jvm/src/io/ktor/utils/io/core/OutputArraysJVM.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("EXTENSION_SHADOWED_BY_MEMBER") 2 | 3 | package io.ktor.utils.io.core 4 | 5 | import kotlinx.io.* 6 | import java.nio.* 7 | 8 | public fun Sink.writeByteBuffer(bb: ByteBuffer) { 9 | write(bb) 10 | } 11 | -------------------------------------------------------------------------------- /ktor-io/jvm/test/ByteReadChannelReadTest.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import io.ktor.utils.io.* 6 | import kotlinx.coroutines.test.* 7 | import java.nio.* 8 | import kotlin.test.* 9 | 10 | class ByteReadChannelReadTest { 11 | 12 | @Test 13 | fun testReadAvailableFromEmpty() = runTest { 14 | val channel = ByteReadChannel(ByteArray(0)) 15 | 16 | channel.read(0) { buffer: ByteBuffer -> 17 | fail() 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ktor-io/posix/src/io/ktor/utils/io/ByteChannel.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io 6 | 7 | internal actual val DEVELOPMENT_MODE: Boolean 8 | get() = false 9 | -------------------------------------------------------------------------------- /ktor-io/posix/src/io/ktor/utils/io/JvmSerializable.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io 6 | 7 | @InternalAPI 8 | public actual interface JvmSerializable 9 | 10 | @Suppress("FunctionName") 11 | @InternalAPI 12 | public actual fun JvmSerializerReplacement(serializer: JvmSerializer, value: T): Any = 13 | DummyJvmSimpleSerializerReplacement 14 | -------------------------------------------------------------------------------- /ktor-io/posix/src/io/ktor/utils/io/core/Closeable.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public actual interface Closeable : AutoCloseable { 8 | override fun close() 9 | } 10 | -------------------------------------------------------------------------------- /ktor-io/wasmJs/src/io/ktor/utils/io/charsets/TypedArrays.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.utils.io.charsets 6 | 7 | import org.khronos.webgl.* 8 | 9 | private fun toJsArrayImpl(vararg x: Byte): Int8Array = js("new Int8Array(x)") 10 | 11 | public fun ByteArray.toJsArray(): Int8Array = toJsArrayImpl(*this) 12 | 13 | public fun Int8Array.toByteArray(): ByteArray = 14 | ByteArray(this.length) { this[it] } 15 | -------------------------------------------------------------------------------- /ktor-io/wasmJs/src/io/ktor/utils/io/core/Closeable.wasmJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.utils.io.core 6 | 7 | public actual interface Closeable : AutoCloseable { 8 | override fun close() 9 | } 10 | -------------------------------------------------------------------------------- /ktor-java-modules-test/.gitignore: -------------------------------------------------------------------------------- 1 | src/main/java/module-info.java 2 | -------------------------------------------------------------------------------- /ktor-network/androidNative/interop/un.def: -------------------------------------------------------------------------------- 1 | package = io.ktor.network.interop 2 | headers = linux/un.h 3 | headerFilter = linux/un.h 4 | -------------------------------------------------------------------------------- /ktor-network/common/src/io/ktor/network/selector/SelectableBaseCommon.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.selector 6 | 7 | internal expect abstract class SelectableBase() : Selectable 8 | -------------------------------------------------------------------------------- /ktor-network/darwin/interop/un.def: -------------------------------------------------------------------------------- 1 | package = io.ktor.network.interop 2 | headers = sys/un.h 3 | headerFilter = sys/un.h 4 | -------------------------------------------------------------------------------- /ktor-network/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | target.js.browser=false 5 | target.wasmJs.browser=false 6 | -------------------------------------------------------------------------------- /ktor-network/jsAndWasmShared/src/io/ktor/network/selector/Selectable.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.selector 6 | 7 | public actual interface Selectable 8 | 9 | internal actual abstract class SelectableBase : Selectable 10 | -------------------------------------------------------------------------------- /ktor-network/jsAndWasmShared/src/io/ktor/network/sockets/SocketAddress.nonJvm.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | internal actual fun isUnixSocketSupported(): Boolean = false 8 | 9 | internal actual fun InetSocketAddress.platformResolveAddress(): ByteArray? { 10 | return null 11 | } 12 | -------------------------------------------------------------------------------- /ktor-network/jsAndWasmShared/test/io/ktor/network/sockets/tests/TestUtils.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | internal actual fun Throwable.isPosixException(): Boolean = false 8 | -------------------------------------------------------------------------------- /ktor-network/jvm/src/io/ktor/network/sockets/SocketTimeoutException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | @Suppress("ACTUAL_WITHOUT_EXPECT") 8 | public actual typealias SocketTimeoutException = java.net.SocketTimeoutException 9 | -------------------------------------------------------------------------------- /ktor-network/jvm/test/io/ktor/network/sockets/tests/TestUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | internal actual fun Throwable.isPosixException(): Boolean = false 8 | -------------------------------------------------------------------------------- /ktor-network/jvm/test/io/ktor/network/sockets/tests/UDPSocketTestJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | import java.util.* 8 | 9 | actual fun isJvmWindows(): Boolean { 10 | val os = System.getProperty("os.name", "unknown").lowercase(Locale.getDefault()) 11 | return os.contains("win") 12 | } 13 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/common/src/io/ktor/network/tls/TLSClientSession.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.tls 6 | 7 | import io.ktor.network.sockets.* 8 | import io.ktor.utils.io.* 9 | import kotlin.coroutines.* 10 | 11 | internal expect suspend fun openTLSSession( 12 | socket: Socket, 13 | input: ByteReadChannel, 14 | output: ByteWriteChannel, 15 | config: TLSConfig, 16 | context: CoroutineContext 17 | ): Socket 18 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/common/src/io/ktor/network/tls/TLSConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.tls 6 | 7 | public expect class TLSConfig 8 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/CertificateInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.tls 6 | 7 | import io.ktor.network.tls.extensions.* 8 | import javax.security.auth.x500.* 9 | 10 | internal class CertificateInfo( 11 | val types: ByteArray, 12 | val hashAndSign: Array, 13 | val authorities: Set 14 | ) 15 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/EncryptionInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.tls 6 | 7 | import java.security.* 8 | 9 | internal data class EncryptionInfo( 10 | val serverPublic: PublicKey, 11 | val clientPublic: PublicKey, 12 | val clientPrivate: PrivateKey 13 | ) 14 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/ktor-network-tls-certificates/api/ktor-network-tls-certificates.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-network/ktor-network-tls/ktor-network-tls-certificates/api/ktor-network-tls-certificates.klib.api -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/ktor-network-tls-certificates/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | jvmMain.dependencies { 12 | api(projects.ktorNetworkTls) 13 | } 14 | jvmTest.dependencies { 15 | implementation(libs.mockk) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-network/ktor-network-tls/nonJvm/src/io/ktor/network/tls/TLSConfig.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.tls 6 | 7 | public actual class TLSConfig 8 | -------------------------------------------------------------------------------- /ktor-network/nix/src/io/ktor/network/sockets/SocketAddress.nonJvm.nix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | internal actual fun isUnixSocketSupported(): Boolean = true 8 | -------------------------------------------------------------------------------- /ktor-network/nix/test/io/ktor/network/sockets/tests/TestUtils.nix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | import io.ktor.utils.io.errors.* 8 | 9 | internal actual fun Throwable.isPosixException(): Boolean = this is PosixException 10 | -------------------------------------------------------------------------------- /ktor-network/nonJvm/src/io/ktor/network/sockets/SocketTimeoutException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | import kotlinx.io.* 8 | 9 | public actual class SocketTimeoutException( 10 | message: String, 11 | cause: Throwable? 12 | ) : IOException(message, cause) { 13 | public actual constructor(message: String) : this(message, null) 14 | } 15 | -------------------------------------------------------------------------------- /ktor-network/posix/src/io/ktor/network/selector/SelectableNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.selector 6 | 7 | public actual interface Selectable { 8 | public val descriptor: Int 9 | } 10 | 11 | internal actual abstract class SelectableBase : Selectable 12 | -------------------------------------------------------------------------------- /ktor-network/posix/src/io/ktor/network/sockets/TCPSocketBuilderNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | import io.ktor.network.util.* 8 | 9 | internal fun getAnyLocalAddress(): NativeSocketAddress = InetSocketAddress("0.0.0.0", 0).address 10 | -------------------------------------------------------------------------------- /ktor-network/posix/src/io/ktor/network/util/NativeUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.util 6 | 7 | import io.ktor.utils.io.errors.* 8 | 9 | internal inline fun Int.check( 10 | posixFunctionName: String? = null, 11 | block: (Int) -> Boolean = { it >= 0 } 12 | ): Int { 13 | if (!block(this)) { 14 | throw PosixException.forSocketError(posixFunctionName = posixFunctionName) 15 | } 16 | 17 | return this 18 | } 19 | -------------------------------------------------------------------------------- /ktor-network/posix/src/io/ktor/network/util/Pools.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.util 6 | 7 | import io.ktor.network.sockets.* 8 | import io.ktor.utils.io.pool.* 9 | 10 | /** 11 | * Byte array pool for UDP datagrams 12 | */ 13 | internal val DefaultDatagramByteArrayPool: ObjectPool = 14 | object : DefaultPool(2048) { 15 | override fun produceInstance(): ByteArray = ByteArray(MAX_DATAGRAM_SIZE) 16 | } 17 | -------------------------------------------------------------------------------- /ktor-network/posix/test/io/ktor/network/sockets/tests/UDPSocketTestPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | actual fun isJvmWindows(): Boolean { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /ktor-network/windows/interop/afunix.def: -------------------------------------------------------------------------------- 1 | package = io.ktor.network.interop 2 | --- 3 | #ifndef _WIN32 4 | error Only Win32 targets are supported! 5 | #endif // _WIN32 6 | 7 | #ifdef KTOR_HAVE_AF_UNIX_H 8 | #include 9 | #else 10 | #include 11 | 12 | #define UNIX_PATH_MAX 108 13 | 14 | struct sockaddr_un { 15 | ADDRESS_FAMILY sun_family; 16 | char sun_path[UNIX_PATH_MAX]; 17 | } SOCKADDR_UN, *PSOCKADDR_UN; 18 | #endif 19 | -------------------------------------------------------------------------------- /ktor-network/windows/src/io/ktor/network/sockets/SocketAddress.nonJvm.windows.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets 6 | 7 | import io.ktor.network.util.isAFUnixSupported 8 | 9 | internal actual fun isUnixSocketSupported(): Boolean = isAFUnixSupported 10 | -------------------------------------------------------------------------------- /ktor-network/windows/test/io/ktor/network/sockets/tests/TestUtils.windows.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.network.sockets.tests 6 | 7 | import io.ktor.utils.io.errors.* 8 | 9 | internal actual fun Throwable.isPosixException(): Boolean = this is PosixException 10 | -------------------------------------------------------------------------------- /ktor-server/api/ktor-server.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/api/ktor-server.api -------------------------------------------------------------------------------- /ktor-server/api/ktor-server.klib.api: -------------------------------------------------------------------------------- 1 | // Klib ABI Dump 2 | // Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] 3 | // Rendering settings: 4 | // - Signature version: 2 5 | // - Show manifest properties: true 6 | // - Show declarations: true 7 | 8 | // Library unique name: 9 | -------------------------------------------------------------------------------- /ktor-server/common/src/Stub.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server 6 | 7 | internal fun stub() { 8 | } 9 | -------------------------------------------------------------------------------- /ktor-server/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | # We don't test `server` modules in a browser. 6 | # there are 2 explanations why: 7 | # * logical - we don't need server in browser 8 | # * technical - we don't have access to files, os, etc. 9 | # Also, because of the ` origin ` URL in a browser, special support in `test-host` need to be implemented 10 | target.js.browser=false 11 | target.wasmJs.browser=false 12 | -------------------------------------------------------------------------------- /ktor-server/jvm/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/jvm/.gitignore -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/SocketAddressUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.backend 6 | 7 | import io.ktor.network.sockets.* 8 | import io.ktor.util.network.* 9 | 10 | internal val SocketAddress.port: Int? 11 | get() = (this as? InetSocketAddress)?.port 12 | 13 | internal expect fun SocketAddress.toNetworkAddress(): NetworkAddress? 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/internal/CoroutineUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal expect val Dispatchers.IOBridge: CoroutineDispatcher 10 | 11 | internal expect fun runBlockingBridge(block: suspend CoroutineScope.() -> T): T 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/common/test/io/ktor/tests/server/cio/CIOWebSocketTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.cio 6 | 7 | import io.ktor.server.cio.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class CIOWebSocketTest : WebSocketEngineSuite(CIO) { 11 | init { 12 | enableSsl = false 13 | enableHttp2 = false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/jsAndWasmShared/src/io/ktor/server/cio/internal/CoroutineUtils.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher 10 | get() = Default 11 | 12 | internal actual fun runBlockingBridge(block: suspend CoroutineScope.() -> T): T = 13 | error("runBlocking is not supported on JS and WASM") 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/jvm/src/io/ktor/server/cio/backend/SocketAddressUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.backend 6 | 7 | import io.ktor.network.sockets.* 8 | import io.ktor.util.network.* 9 | 10 | internal actual fun SocketAddress.toNetworkAddress(): NetworkAddress? { 11 | // Do not read the hostname here because that may trigger a name service reverse lookup. 12 | return toJavaAddress() as? java.net.InetSocketAddress 13 | } 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/jvm/src/io/ktor/server/cio/internal/CoroutineUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher 10 | get() = IO 11 | 12 | internal actual fun runBlockingBridge(block: suspend CoroutineScope.() -> T): T = runBlocking(block = block) 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/nonJvm/src/io/ktor/server/cio/backend/SocketAddressUtils.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.backend 6 | 7 | import io.ktor.network.sockets.* 8 | import io.ktor.util.network.* 9 | 10 | internal actual fun SocketAddress.toNetworkAddress(): NetworkAddress? { 11 | if (this !is InetSocketAddress) return null 12 | return NetworkAddress(hostname, port) 13 | } 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-cio/posix/src/io/ktor/server/cio/internal/CoroutineUtilsNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.cio.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher 10 | get() = IO 11 | 12 | internal actual fun runBlockingBridge(block: suspend CoroutineScope.() -> T): T = runBlocking(block = block) 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-config-yaml/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | # Because of dependency on YAML library: https://github.com/Him188/yamlkt/issues/67 6 | target.androidNative=false 7 | target.watchosDeviceArm64=false 8 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-config-yaml/jvm/resources/META-INF/services/io.ktor.server.config.ConfigLoader: -------------------------------------------------------------------------------- 1 | io.ktor.server.config.yaml.YamlConfigLoader 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-config-yaml/jvm/test-resources/application-custom.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 2345 4 | auth: 5 | users: 6 | - c 7 | - d 8 | - e 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-config-yaml/jvm/test-resources/application-no-env.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: $NOT_FOUND_VARIABLE 4 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-config-yaml/jvm/test-resources/application.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 1234 4 | auth: 5 | users: 6 | - a 7 | - b 8 | - c 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/application/PluginInstance.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.application 6 | 7 | /** 8 | * An instance of the plugin installed to your application. 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.application.PluginInstance) 11 | * */ 12 | public class PluginInstance internal constructor(internal val builder: PluginBuilder<*>) 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/application/debug/DebugPhaseNames.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.application.debug 6 | 7 | internal const val PHASE_ON_CALL = "onCall" 8 | internal const val PHASE_ON_CALL_RECEIVE = "onCallReceive" 9 | internal const val PHASE_ON_CALL_RESPOND = "onCallRespond" 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/application/internal/TypeUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.application.internal 6 | 7 | import kotlin.reflect.* 8 | 9 | internal expect fun starProjectedTypeBridge(klass: KClass): KType 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/engine/Long.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine 6 | 7 | private val longStrings = Array(1024) { 8 | it.toString() 9 | } 10 | 11 | internal fun Long.toStringFast() = if (this in 0..1023) longStrings[toInt()] else toString() 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/engine/ServerEngineUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine 6 | 7 | import kotlinx.io.files.* 8 | 9 | internal val WORKING_DIRECTORY_PATH: String = SystemFileSystem.resolve(Path(".")).toString() 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/engine/internal/EngineUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine.internal 6 | 7 | internal expect fun escapeHostname(value: String): String 8 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/engine/internal/ExceptionUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine.internal 6 | 7 | import io.ktor.utils.io.errors.* 8 | import kotlinx.io.IOException 9 | 10 | public expect open class ClosedChannelException : IOException 11 | 12 | internal expect open class OutOfMemoryError : Error 13 | 14 | internal expect open class TimeoutException : Exception 15 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/routing/RoutingIntrospection.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.routing 6 | 7 | import io.ktor.server.application.* 8 | 9 | /** 10 | * Gets the root of the routing block. 11 | */ 12 | public val Application.routingRoot: RoutingNode 13 | get() = pluginOrNull(RoutingRoot) ?: throw IllegalStateException("Routing plugin is not installed") 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/common/src/io/ktor/server/util/CopyOnWriteHashMap.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.util 6 | 7 | import io.ktor.utils.io.* 8 | 9 | @OptIn(InternalAPI::class) 10 | public typealias CopyOnWriteHashMap = io.ktor.util.collections.CopyOnWriteHashMap 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jsAndWasmShared/src/io/ktor/server/request/ApplicationReceiveFunctions.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.request 6 | 7 | @PublishedApi 8 | internal actual val DEFAULT_FORM_FIELD_LIMIT: Long 9 | get() = 50 * 1024 * 1024L 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/resources/META-INF/services/io.ktor.server.config.ConfigLoader: -------------------------------------------------------------------------------- 1 | io.ktor.server.config.HoconConfigLoader 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/src/io/ktor/server/application/internal/TypeUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.application.internal 6 | 7 | import kotlin.reflect.* 8 | import kotlin.reflect.full.* 9 | 10 | internal actual fun starProjectedTypeBridge(klass: KClass): KType { 11 | return klass.starProjectedType 12 | } 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/src/io/ktor/server/engine/internal/EngineUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine.internal 6 | 7 | private val OS_NAME = System.getProperty("os.name", "") 8 | .lowercase() 9 | 10 | internal actual fun escapeHostname(value: String): String { 11 | if (!OS_NAME.contains("windows")) return value 12 | if (value != "0.0.0.0") return value 13 | 14 | return "127.0.0.1" 15 | } 16 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/application-additional.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 8085 4 | } 5 | 6 | application { 7 | class = 8 | } 9 | 10 | property = additional_value 11 | config { 12 | property = additional_value 13 | new_property = additional_value 14 | } 15 | } 16 | 17 | additional { 18 | config { 19 | property = additional_value 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/application-main.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 8080 4 | } 5 | 6 | application { 7 | class = 8 | } 9 | 10 | property = main_value 11 | config { 12 | property = main_value 13 | old_property = main_value 14 | } 15 | } 16 | 17 | main { 18 | config { 19 | property = main_value 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/application.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 8080 4 | } 5 | 6 | application { 7 | class = 8 | } 9 | } -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/application.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 8081 4 | application: 5 | class: org.company.ApplicationClass 6 | test: test_value 7 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/applicationWithEnv.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 8080 4 | port = ${?PORT} 5 | } 6 | 7 | application { 8 | class = 9 | } 10 | } -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/custom.config.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 4242 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/custom.config.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port : 4244 4 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/empty-config.yaml: -------------------------------------------------------------------------------- 1 | ktor: empty 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/error404.html: -------------------------------------------------------------------------------- 1 | error 404 -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/public/allowed.txt: -------------------------------------------------------------------------------- 1 | allowed 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/resource.txt: -------------------------------------------------------------------------------- 1 | resource example 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/secret.txt: -------------------------------------------------------------------------------- 1 | secret 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/test-config.yaml: -------------------------------------------------------------------------------- 1 | 2 | myplugin: 3 | property: 42 4 | 5 | db: 6 | myplugin: 7 | property: 43 8 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test-resources/testjar.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-core/jvm/test-resources/testjar.jar -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/jvm/test/io/ktor/tests/plugins/ConfigWithProperty.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins 6 | 7 | import io.ktor.server.config.* 8 | 9 | internal class ConfigWithProperty(config: ApplicationConfig) { 10 | var property: String = config.tryGetString("property") ?: "Default Value" 11 | } 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/my.config.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | port = 4243 4 | } 5 | } -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/nix/interop/host_common.def: -------------------------------------------------------------------------------- 1 | package=io.ktor.server.engine.interop 2 | --- 3 | 4 | extern char **environ; 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/nonJvm/src/io/ktor/server/engine/internal/ExceptionUtils.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine.internal 6 | 7 | import kotlinx.io.IOException 8 | 9 | public actual open class ClosedChannelException(message: String) : IOException(message) 10 | 11 | internal actual open class OutOfMemoryError : Error() 12 | 13 | internal actual open class TimeoutException : Exception() 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/nonJvm/src/io/ktor/server/http/content/DefaultTransform.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.http.content 6 | 7 | import io.ktor.http.content.* 8 | import io.ktor.server.application.* 9 | 10 | internal actual fun platformTransformDefaultContent( 11 | call: ApplicationCall, 12 | value: Any 13 | ): OutgoingContent? = null 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/posix/src/io/ktor/server/engine/internal/EngineUtilsNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.engine.internal 6 | 7 | import kotlin.experimental.* 8 | 9 | @OptIn(ExperimentalNativeApi::class) 10 | internal actual fun escapeHostname(value: String): String { 11 | if (Platform.osFamily != OsFamily.WINDOWS) return value 12 | if (value != "0.0.0.0") return value 13 | 14 | return "127.0.0.1" 15 | } 16 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-core/posix/src/io/ktor/server/request/ApplicationReceiveFunctions.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.request 6 | 7 | @PublishedApi 8 | internal actual val DEFAULT_FORM_FIELD_LIMIT: Long 9 | get() = 50 * 1024 * 1024L 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-host-common/api/ktor-server-host-common.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-host-common/api/ktor-server-host-common.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-host-common/api/ktor-server-host-common.klib.api: -------------------------------------------------------------------------------- 1 | // Klib ABI Dump 2 | // Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] 3 | // Rendering settings: 4 | // - Signature version: 2 5 | // - Show manifest properties: true 6 | // - Show declarations: true 7 | 8 | // Library unique name: 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-host-common/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "This module is deprecated. All the contents are moved to `ktor-server-core`." 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorServerCore) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-host-common/common/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-host-common/common/.gitkeep -------------------------------------------------------------------------------- /ktor-server/ktor-server-host-common/common/src/Stub.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.host.common 6 | 7 | internal fun stub() { 8 | } 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/api/ktor-server-jetty-jakarta.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty-jakarta/api/ktor-server-jetty-jakarta.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/jvm/test/io/ktor/tests/server/jetty/jakarta/JettyClientCertTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.jetty.jakarta 6 | 7 | import io.ktor.server.jetty.jakarta.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class JettyClientCertTest : ClientCertTestSuite(Jetty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/jvm/test/io/ktor/tests/server/jetty/jakarta/JettyStressTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.jetty.jakarta 6 | 7 | import io.ktor.server.jetty.jakarta.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class JettyStressTest : EngineStressSuite(Jetty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/jvm/test/io/ktor/tests/server/jetty/jakarta/JettyWebSocketTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.jetty.jakarta 6 | 7 | import io.ktor.server.jetty.jakarta.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class JettyWebSocketTest : WebSocketEngineSuite(Jetty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2-jakarta.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2-jakarta.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2-jakarta.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2-jakarta.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/api/ktor-server-jetty-test-http2.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty/api/ktor-server-jetty.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty/api/ktor-server-jetty.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty/jvm/test/io/ktor/tests/server/jetty/JettyClientCertTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.jetty 6 | 7 | import io.ktor.server.jetty.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class JettyClientCertTest : ClientCertTestSuite(Jetty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty/jvm/test/io/ktor/tests/server/jetty/JettyStressTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.jetty 6 | 7 | import io.ktor.server.jetty.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class JettyStressTest : EngineStressSuite(Jetty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/api/ktor-server-jetty-test-http2.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/api/ktor-server-jetty-test-http2.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/api/ktor-server-jetty-test-http2.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-jetty/ktor-server-jetty-test-http2/api/ktor-server-jetty-test-http2.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-netty/api/ktor-server-netty.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-netty/api/ktor-server-netty.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-netty/jvm/test/io/ktor/tests/server/netty/NettyStressTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.netty 6 | 7 | import io.ktor.server.netty.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class NettyStressTest : EngineStressSuite(Netty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-netty/jvm/test/io/ktor/tests/server/netty/NettyWebSocketTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.server.netty 6 | 7 | import io.ktor.server.netty.* 8 | import io.ktor.server.testing.suites.* 9 | 10 | class NettyWebSocketTest : WebSocketEngineSuite(Netty) 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth-jwt/api/ktor-server-auth-jwt.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-auth-jwt/api/ktor-server-auth-jwt.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth-jwt/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.server-plugin") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | jvmMain.dependencies { 12 | api(projects.ktorServerAuth) 13 | api(libs.java.jwt) 14 | api(libs.jwks.rsa) 15 | } 16 | jvmTest.dependencies { 17 | api(libs.mockk) 18 | } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth-ldap/api/ktor-server-auth-ldap.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-auth-ldap/api/ktor-server-auth-ldap.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth-ldap/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.server-plugin") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | jvmMain.dependencies { 12 | api(projects.ktorServerAuth) 13 | } 14 | jvmTest.dependencies { 15 | api(libs.apacheds.server) 16 | api(libs.apacheds.core) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth/jsAndWasmShared/src/OAuth.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.server.auth 6 | 7 | internal actual suspend fun OAuthAuthenticationProvider.oauth1a( 8 | authProviderName: String?, 9 | context: AuthenticationContext 10 | ) { 11 | throw NotImplementedError("OAuth1 is not supported on native targets") 12 | } 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auth/posix/src/OAuthNative.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.server.auth 6 | 7 | internal actual suspend fun OAuthAuthenticationProvider.oauth1a( 8 | authProviderName: String?, 9 | context: AuthenticationContext 10 | ) { 11 | throw NotImplementedError("OAuth1 is not supported on native targets") 12 | } 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auto-head-response/api/ktor-server-auto-head-response.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/server/plugins/autohead/AutoHeadResponseKt { 2 | public static final fun getAutoHeadResponse ()Lio/ktor/server/application/ApplicationPlugin; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-auto-head-response/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-body-limit/api/ktor-server-body-limit.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/server/plugins/bodylimit/RequestBodyLimitConfig { 2 | public fun ()V 3 | public final fun bodyLimit (Lkotlin/jvm/functions/Function1;)V 4 | } 5 | 6 | public final class io/ktor/server/plugins/bodylimit/RequestBodyLimitKt { 7 | public static final fun getRequestBodyLimit ()Lio/ktor/server/application/RouteScopedPlugin; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-body-limit/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Body Size Limit plugin for Ktor Server" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-caching-headers/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-call-id/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorCallId) 15 | } 16 | jvmMain.dependencies { 17 | api(projects.ktorServerCallLogging) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-call-logging/api/ktor-server-call-logging.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-call-logging/api/ktor-server-call-logging.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-compression/api/ktor-server-compression.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-compression/api/ktor-server-compression.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-compression/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-conditional-headers/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-content-negotiation/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonTest.dependencies { 14 | implementation(projects.ktorServerDoubleReceive) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-content-negotiation/jsAndWasmShared/src/DefaultIgnoredTypes.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.contentnegotiation 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual val DefaultIgnoredTypes: Set> = mutableSetOf() 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-content-negotiation/jvm/src/DefaultIgnoredTypesJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.contentnegotiation 6 | 7 | import java.io.* 8 | import kotlin.reflect.* 9 | 10 | internal actual val DefaultIgnoredTypes: Set> = 11 | mutableSetOf(InputStream::class) 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-content-negotiation/posix/src/DefaultIgnoredTypesNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.contentnegotiation 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual val DefaultIgnoredTypes: Set> = mutableSetOf() 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-cors/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-csrf/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-data-conversion/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-default-headers/.gitignore: -------------------------------------------------------------------------------- 1 | posix/interop/utils.def 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-di/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "An extensible dependency injection framework for the Ktor server" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | id("kotlinx-serialization") 10 | } 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-di/jvm/resources/META-INF/services/io.ktor.server.application.ModuleParametersInjector: -------------------------------------------------------------------------------- 1 | io.ktor.server.plugins.di.PluginModuleParametersInjector 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-di/jvm/src/io/ktor/server/plugins/di/DependencyInjectionConfig.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.di 6 | 7 | /** 8 | * Default reflection provider for the JVM, using standard JVM reflection calls for discovering 9 | * constructors and parameter details. 10 | */ 11 | public actual val DefaultReflection: DependencyReflection = DependencyReflectionJvm() 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-di/nonJvm/src/io/ktor/server/plugins/di/DependencyInjectionConfig.nonJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.di 6 | 7 | /** 8 | * Reflection is currently disabled for all non-JVM platforms. 9 | */ 10 | public actual val DefaultReflection: DependencyReflection 11 | get() = NoReflection 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-double-receive/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-double-receive/common/src/io/ktor/server/plugins/doublereceive/DoubleReceiveCache.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.doublereceive 6 | 7 | import io.ktor.utils.io.* 8 | 9 | internal interface DoubleReceiveCache { 10 | suspend fun read(): ByteReadChannel 11 | fun dispose() 12 | } 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-forwarded-header/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-forwarded-header/common/src/io/ktor/server/plugins/forwardedheaders/Utils.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.server.plugins.forwardedheaders 6 | 7 | internal fun String.isNotHostAddress(): Boolean { 8 | return if (contains(':')) { 9 | return true 10 | } else { 11 | none { it.isLetter() } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-freemarker/api/ktor-server-freemarker.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-freemarker/api/ktor-server-freemarker.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-hsts/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-html-builder/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.server-plugin") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(libs.kotlinx.html) 13 | } 14 | commonTest.dependencies { 15 | api(projects.ktorServerStatusPages) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-htmx/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | # Needs support in kotlinx-html: https://github.com/Kotlin/kotlinx.html/pull/288 6 | target.androidNative=false 7 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-http-redirect/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/api/ktor-server-i18n.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-i18n/api/ktor-server-i18n.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "I18n support to Ktor" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | jvmTest.dependencies { 14 | implementation(projects.ktorServerStatusPages) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/jvm/test-resources/messages/messages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | some_key=Default key 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/jvm/test-resources/messages/messages_en_US.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | some_key=English Key 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/jvm/test-resources/messages/messages_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | some_key=Portuguese Key 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-i18n/jvm/test-resources/messages/messages_ru_RU.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | some_key=Русский Ключ 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-jte/.gitignore: -------------------------------------------------------------------------------- 1 | /jte-classes 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-jte/api/ktor-server-jte.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-jte/api/ktor-server-jte.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-method-override/api/ktor-server-method-override.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/server/plugins/methodoverride/XHttpMethodOverrideConfig { 2 | public fun ()V 3 | public final fun getHeaderName ()Ljava/lang/String; 4 | public final fun setHeaderName (Ljava/lang/String;)V 5 | } 6 | 7 | public final class io/ktor/server/plugins/methodoverride/XHttpMethodOverrideKt { 8 | public static final fun getXHttpMethodOverride ()Lio/ktor/server/application/ApplicationPlugin; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-method-override/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-metrics-micrometer/api/ktor-server-metrics-micrometer.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-metrics-micrometer/api/ktor-server-metrics-micrometer.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-metrics/api/ktor-server-metrics.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-metrics/api/ktor-server-metrics.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-mustache/api/ktor-server-mustache.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-mustache/api/ktor-server-mustache.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-mustache/jvm/test-resources/index.hbs: -------------------------------------------------------------------------------- 1 | Template 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-mustache/jvm/test-resources/withPlaceholder.mustache: -------------------------------------------------------------------------------- 1 |

Hello, {{id}}

2 |

{{title}}

3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-mustache/jvm/test-resources/withoutPlaceholder.mustache: -------------------------------------------------------------------------------- 1 |

Hello, Anonymous

2 |

Hi!

3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-openapi/api/ktor-server-openapi.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-openapi/api/ktor-server-openapi.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-openapi/jvm/test-resources/openapi/documentation.yaml: -------------------------------------------------------------------------------- 1 | hello: 2 | world 3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-partial-content/api/ktor-server-partial-content.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/server/plugins/partialcontent/PartialContentConfig { 2 | public fun ()V 3 | public final fun getMaxRangeCount ()I 4 | public final fun setMaxRangeCount (I)V 5 | } 6 | 7 | public final class io/ktor/server/plugins/partialcontent/PartialContentKt { 8 | public static final fun getPartialContent ()Lio/ktor/server/application/RouteScopedPlugin; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-partial-content/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorServerConditionalHeaders) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-pebble/api/ktor-server-pebble.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-pebble/api/ktor-server-pebble.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-pebble/jvm/test-resources/i18n_test.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | hello_world=Hello, world! 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-pebble/jvm/test-resources/i18n_test_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | hello_world=Hola, mundo! 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-rate-limit/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Rate Limit plugin for Ktor Server" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-request-validation/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonTest.dependencies { 14 | implementation(projects.ktorServerStatusPages) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-resources/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Server side Resources feature" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | id("kotlinx-serialization") 10 | } 11 | 12 | kotlin { 13 | sourceSets { 14 | commonMain.dependencies { 15 | api(projects.ktorResources) 16 | api(libs.kotlinx.serialization.core) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/common/src/io/ktor/server/sessions/SessionIdProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | 7 | import io.ktor.util.* 8 | 9 | /** 10 | * Generates a secure random session ID 11 | * 12 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.sessions.generateSessionId) 13 | */ 14 | public fun generateSessionId(): String = generateNonce() + generateNonce() 15 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/jsAndWasmShared/src/io/ktor/server/sessions/CacheStorage.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | 7 | internal actual fun platformCache(delegate: SessionStorage, idleTimeout: Long): Cache { 8 | return BaseCache { delegate.read(it) } 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/jvm/src/io/ktor/server/sessions/CacheStorageJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | 7 | internal actual fun platformCache(delegate: SessionStorage, idleTimeout: Long): Cache { 8 | val referenceCache = SoftReferenceCache { id -> delegate.read(id) } 9 | return BaseTimeoutCache(idleTimeout, true, referenceCache) 10 | } 11 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/jvm/src/io/ktor/server/sessions/SessionDeferral.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | 7 | internal actual fun isDeferredSessionsEnabled(): Boolean = 8 | System.getProperty(SESSIONS_DEFERRED_FLAG)?.toBoolean() == true 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/posix/src/io/ktor/server/sessions/CacheStorageNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | 7 | internal actual fun platformCache(delegate: SessionStorage, idleTimeout: Long): Cache { 8 | return BaseCache { delegate.read(it) } 9 | } 10 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-sessions/posix/src/io/ktor/server/sessions/SessionDeferral.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.sessions 6 | import kotlinx.cinterop.ExperimentalForeignApi 7 | import kotlinx.cinterop.toKString 8 | import platform.posix.* 9 | 10 | @OptIn(ExperimentalForeignApi::class) 11 | internal actual fun isDeferredSessionsEnabled(): Boolean = 12 | getenv(SESSIONS_DEFERRED_FLAG)?.toKString()?.toBoolean() == true 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-status-pages/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "" 6 | 7 | plugins { 8 | id("ktorbuild.project.server-plugin") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonTest.dependencies { 14 | implementation(projects.ktorServerCallId) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-status-pages/jsAndWasmShared/src/io/ktor/server/plugins/statuspages/StatusPagesUtils.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.statuspages 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual fun selectNearestParentClass(cause: Throwable, keys: List>): KClass<*>? { 10 | if (keys.firstOrNull { cause::class == it } != null) return cause::class 11 | 12 | return keys.last() 13 | } 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-status-pages/posix/src/io/ktor/server/plugins/statuspages/StatusPagesUtilsNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.plugins.statuspages 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual fun selectNearestParentClass(cause: Throwable, keys: List>): KClass<*>? { 10 | if (keys.firstOrNull { cause::class == it } != null) return cause::class 11 | 12 | return keys.last() 13 | } 14 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-swagger/api/ktor-server-swagger.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-swagger/api/ktor-server-swagger.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-swagger/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.server-plugin") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | jvmMain.dependencies { 12 | implementation(projects.ktorServerHtmlBuilder) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-swagger/jvm/test-resources/openapi/documentation.yaml: -------------------------------------------------------------------------------- 1 | hello: 2 | world 3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/api/ktor-server-thymeleaf.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-thymeleaf/api/ktor-server-thymeleaf.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/fragments.html: -------------------------------------------------------------------------------- 1 |

Hello, first fragment

2 |

Hello, second fragment

3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/fragments_insert_test.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/i18n_test.html: -------------------------------------------------------------------------------- 1 |

2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/i18n_test.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | hello_world=Hello, world! 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/i18n_test_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | hello_world=Hola, mundo! 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-thymeleaf/jvm/test-resources/templates/test.html: -------------------------------------------------------------------------------- 1 |

Hello, [[${id}]]

2 |

3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-velocity/api/ktor-server-velocity.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-velocity/api/ktor-server-velocity.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-velocity/jvm/test/resources/test-template.vhtml: -------------------------------------------------------------------------------- 1 |

Hello, $id

2 |

$title

3 | $!{date.format('MMMM', $date.toDate('intl', '2003-10-07 03:14:50'))} 4 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-plugins/ktor-server-webjars/api/ktor-server-webjars.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-plugins/ktor-server-webjars/api/ktor-server-webjars.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet-jakarta/api/ktor-server-servlet-jakarta.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-servlet-jakarta/api/ktor-server-servlet-jakarta.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet-jakarta/jvm/test-resources/application.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 1234 4 | property: a 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet-jakarta/jvm/test-resources/custom-config.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 1234 4 | property: a-custom 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet-jakarta/jvm/test-resources/test.conf: -------------------------------------------------------------------------------- 1 | constant = test 2 | var = ${constant} 3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet/api/ktor-server-servlet.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-servlet/api/ktor-server-servlet.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet/jvm/test-resources/application.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 1234 4 | property: a 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet/jvm/test-resources/custom-config.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | deployment: 3 | port: 1234 4 | property: a-custom 5 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-servlet/jvm/test-resources/test.conf: -------------------------------------------------------------------------------- 1 | constant = test 2 | var = ${constant} 3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/common/src/io/ktor/server/testing/client/TestHttpClientConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.testing.client 6 | 7 | import io.ktor.client.engine.* 8 | import io.ktor.server.testing.* 9 | 10 | public class TestHttpClientConfig : HttpClientEngineConfig() { 11 | public lateinit var app: TestApplicationEngine 12 | } 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jsAndWasmShared/src/io/ktor/server/testing/internal/CoroutineUtils.jsAndWasmShared.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.testing.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher get() = Default 10 | 11 | internal actual fun maybeRunBlocking(block: suspend CoroutineScope.() -> T): T = 12 | error("run blocking is not supported on JS/Wasm") 13 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jvm/src/io/ktor/server/testing/internal/CoroutineUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.testing.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher get() = IO 10 | 11 | internal actual fun maybeRunBlocking(block: suspend CoroutineScope.() -> T): T = runBlocking(block = block) 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jvm/test-resources/application-custom.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | test = another_test_value 3 | } 4 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jvm/test-resources/application-custom.yaml: -------------------------------------------------------------------------------- 1 | ktor: 2 | test: another_test_value 3 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jvm/test-resources/application-with-modules.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | application { 3 | modules = [ io.ktor.tests.server.testing.TestApplicationTestJvm.module ] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/jvm/test-resources/application.conf: -------------------------------------------------------------------------------- 1 | ktor { 2 | test = test_value 3 | } 4 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-test-host/posix/src/io/ktor/server/testing/internal/CoroutineUtilsNix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.testing.internal 6 | 7 | import kotlinx.coroutines.* 8 | 9 | internal actual val Dispatchers.IOBridge: CoroutineDispatcher get() = IO 10 | 11 | internal actual fun maybeRunBlocking(block: suspend CoroutineScope.() -> T): T = runBlocking(block = block) 12 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/api/ktor-server-tests.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/api/ktor-server-tests.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/api/ktor-server-tests.klib.api: -------------------------------------------------------------------------------- 1 | // Klib ABI Dump 2 | // Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] 3 | // Rendering settings: 4 | // - Signature version: 2 5 | // - Show manifest properties: true 6 | // - Show declarations: true 7 | 8 | // Library unique name: 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/common/src/Stub.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.tests 6 | 7 | internal fun stub() { 8 | } 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/jvm/test-resources/public.zip -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/default.txt: -------------------------------------------------------------------------------- 1 | default 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/file.txt: -------------------------------------------------------------------------------- 1 | file.txt 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/ignore.txt: -------------------------------------------------------------------------------- 1 | ignore 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/index.html: -------------------------------------------------------------------------------- 1 | index 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/index.html.gz: -------------------------------------------------------------------------------- 1 | index.gz 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/nested/file-nested.txt: -------------------------------------------------------------------------------- 1 | file-nested.txt 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/nested/file-nested.txt.br: -------------------------------------------------------------------------------- 1 | file-nested.txt.br 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/nested/index.html: -------------------------------------------------------------------------------- 1 | nested index 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.css -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.js -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.svg -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tests/jvm/test-resources/public/types/file.xml -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/test-resource.txt: -------------------------------------------------------------------------------- 1 | plain 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/test-resource.txt.br: -------------------------------------------------------------------------------- 1 | br 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test-resources/test-resource.txt.gz: -------------------------------------------------------------------------------- 1 | gz 2 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test/io/ktor/server/http/spa/Empty1.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.http.spa 6 | 7 | // required for tests 8 | class Empty1 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test/io/ktor/server/http/spa/Empty2.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.http.spa 6 | 7 | // required for tests 8 | class Empty2 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tests/jvm/test/io/ktor/server/http/spa/Empty3.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.server.http.spa 6 | 7 | // required for tests 8 | class Empty3 9 | -------------------------------------------------------------------------------- /ktor-server/ktor-server-tomcat-jakarta/api/ktor-server-tomcat-jakarta.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tomcat-jakarta/api/ktor-server-tomcat-jakarta.klib.api -------------------------------------------------------------------------------- /ktor-server/ktor-server-tomcat/api/ktor-server-tomcat.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-server/ktor-server-tomcat/api/ktor-server-tomcat.klib.api -------------------------------------------------------------------------------- /ktor-shared/ktor-call-id/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Ktor client and server shared support for CallId" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | -------------------------------------------------------------------------------- /ktor-shared/ktor-events/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(projects.ktorUtils) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ktor-shared/ktor-htmx/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Common HTMX constants for use in client and server" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorUtils) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-shared/ktor-htmx/common/src/io/ktor/htmx/Annotations.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.htmx 6 | 7 | @MustBeDocumented @Retention @RequiresOptIn 8 | public annotation class ExperimentalHtmxApi 9 | -------------------------------------------------------------------------------- /ktor-shared/ktor-htmx/ktor-htmx-html/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "HTMX support for the Kotlin HTML DSL" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(libs.kotlinx.html) 15 | api(projects.ktorHtmx) 16 | implementation(projects.ktorUtils) 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /ktor-shared/ktor-resources/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Common code for Resources feature" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | id("kotlinx-serialization") 10 | } 11 | 12 | kotlin { 13 | sourceSets { 14 | commonMain.dependencies { 15 | api(projects.ktorHttp) 16 | api(projects.ktorUtils) 17 | api(libs.kotlinx.serialization.core) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ktor-shared/ktor-resources/common/src/io/ktor/resources/ResourceSerializationException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.resources 6 | 7 | /** 8 | * Thrown when [de]serialization of the resource failed 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.resources.ResourceSerializationException) 11 | */ 12 | public class ResourceSerializationException(message: String) : Exception(message) 13 | -------------------------------------------------------------------------------- /ktor-shared/ktor-resources/js/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-shared/ktor-resources/js/.gitkeep -------------------------------------------------------------------------------- /ktor-shared/ktor-resources/jvm/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-shared/ktor-resources/jvm/.gitkeep -------------------------------------------------------------------------------- /ktor-shared/ktor-resources/posix/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-shared/ktor-resources/posix/.gitkeep -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Serialization API for client and server" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorWebsockets) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-gson/api/ktor-serialization-gson.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-shared/ktor-serialization/ktor-serialization-gson/api/ktor-serialization-gson.klib.api -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-gson/jvm/test/GsonContentNegotiationTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import io.ktor.client.plugins.contentnegotiation.tests.* 6 | import io.ktor.serialization.gson.* 7 | import kotlin.test.* 8 | 9 | class GsonContentNegotiationTest : JsonContentNegotiationTest(GsonConverter()) { 10 | @Ignore 11 | override fun testJsonWithNullValue() {} 12 | } 13 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-gson/jvm/test/GsonWebsocketTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import io.ktor.client.plugins.contentnegotiation.tests.* 6 | import io.ktor.serialization.gson.* 7 | 8 | class GsonWebsocketTest : JsonWebsocketsTest(GsonWebsocketContentConverter()) 9 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-jackson/api/ktor-serialization-jackson.klib.api: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-shared/ktor-serialization/ktor-serialization-jackson/api/ktor-serialization-jackson.klib.api -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-jackson/jvm/test/JacksonContentNegotiationTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import io.ktor.client.plugins.contentnegotiation.tests.* 6 | import io.ktor.http.* 7 | import io.ktor.serialization.jackson.* 8 | 9 | class JacksonContentNegotiationTest : JsonContentNegotiationTest(JacksonConverter()) { 10 | override val extraFieldResult = HttpStatusCode.BadRequest 11 | } 12 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-jackson/jvm/test/JacksonWebsocketTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import io.ktor.client.plugins.contentnegotiation.tests.* 6 | import io.ktor.serialization.jackson.* 7 | 8 | class JacksonWebsocketTest : JsonWebsocketsTest(JacksonWebsocketContentConverter()) 9 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-kotlinx/jsAndWasmShared/src/io/ktor/serialization/kotlinx/ExtensionsJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.serialization.kotlinx 6 | 7 | internal actual val providers: List 8 | get() = emptyList() 9 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-kotlinx/jvm/src/io/ktor/serialization/kotlinx/ExtensionsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.serialization.kotlinx 6 | 7 | import io.ktor.util.reflect.* 8 | import io.ktor.utils.io.* 9 | 10 | @OptIn(InternalAPI::class) 11 | internal actual val providers: List = 12 | loadServices() 13 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-cbor/api/ktor-serialization-kotlinx-cbor.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/serialization/kotlinx/cbor/CborSupportKt { 2 | public static final fun cbor (Lio/ktor/serialization/Configuration;Lkotlinx/serialization/cbor/Cbor;Lio/ktor/http/ContentType;)V 3 | public static synthetic fun cbor$default (Lio/ktor/serialization/Configuration;Lkotlinx/serialization/cbor/Cbor;Lio/ktor/http/ContentType;ILjava/lang/Object;)V 4 | public static final fun getDefaultCbor ()Lkotlinx/serialization/cbor/Cbor; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-json/jvm/resources/META-INF/services/io.ktor.serialization.kotlinx.KotlinxSerializationExtensionProvider: -------------------------------------------------------------------------------- 1 | io.ktor.serialization.kotlinx.json.KotlinxSerializationJsonExtensionProvider 2 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-kotlinx/ktor-serialization-kotlinx-xml/api/ktor-serialization-kotlinx-xml.api: -------------------------------------------------------------------------------- 1 | public final class io/ktor/serialization/kotlinx/xml/XmlSupportKt { 2 | public static final fun getDefaultXml ()Lnl/adaptivity/xmlutil/serialization/XML; 3 | public static final fun xml (Lio/ktor/serialization/Configuration;Lnl/adaptivity/xmlutil/serialization/XML;Lio/ktor/http/ContentType;)V 4 | public static synthetic fun xml$default (Lio/ktor/serialization/Configuration;Lnl/adaptivity/xmlutil/serialization/XML;Lio/ktor/http/ContentType;ILjava/lang/Object;)V 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ktor-shared/ktor-serialization/ktor-serialization-tests/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.internal") 7 | id("kotlinx-serialization") 8 | } 9 | 10 | kotlin { 11 | sourceSets { 12 | jvmMain.dependencies { 13 | api(projects.ktorServerTestHost) 14 | api(projects.ktorClientContentNegotiationTests) 15 | 16 | api(libs.logback.classic) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-shared/ktor-sse/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Server-sent events API for client and server" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorUtils) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-shared/ktor-test-base/jvm/src/io/ktor/test/junit/MultipleFailureException.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.test.junit 6 | 7 | class MultipleFailureException(children: List) : RuntimeException( 8 | "Exceptions thrown: ${children.joinToString { it::class.simpleName ?: "" }}" 9 | ) 10 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websocket-serialization/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | description = "Shared functionality for WebSocket serialization for client and server" 6 | 7 | plugins { 8 | id("ktorbuild.project.library") 9 | } 10 | 11 | kotlin { 12 | sourceSets { 13 | commonMain.dependencies { 14 | api(projects.ktorSerialization) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websockets/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(projects.ktorUtils) 13 | api(projects.ktorHttp) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websockets/common/src/io/ktor/websocket/Utils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | @file:kotlin.jvm.JvmMultifileClass 6 | @file:kotlin.jvm.JvmName("UtilsKt") 7 | 8 | package io.ktor.websocket 9 | 10 | @Suppress("NOTHING_TO_INLINE") 11 | internal inline infix fun Byte.xor(other: Byte) = toInt().xor(other.toInt()).toByte() 12 | 13 | @Suppress("NOTHING_TO_INLINE") 14 | internal inline fun Boolean.flagAt(at: Int) = if (this) 1 shl at else 0 15 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websockets/jsAndWasmShared/src/io/ktor/websocket/UtilsJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.websocket 6 | 7 | internal actual val OUTGOING_CHANNEL_CAPACITY: Int 8 | get() = 8 9 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websockets/jvm/src/io/ktor/websocket/internals/BytePacketUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.websocket.internals 6 | 7 | import io.ktor.utils.io.core.* 8 | import kotlinx.io.* 9 | 10 | @OptIn(InternalIoApi::class) 11 | internal fun Source.endsWith(data: ByteArray): Boolean { 12 | buffer.copy().apply { 13 | discard(remaining - data.size) 14 | return readByteArray().contentEquals(data) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ktor-shared/ktor-websockets/posix/src/io/ktor/websocket/UtilsNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.websocket 6 | 7 | internal actual val OUTGOING_CHANNEL_CAPACITY: Int 8 | get() = 8 9 | -------------------------------------------------------------------------------- /ktor-test-dispatcher/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | plugins { 6 | id("ktorbuild.project.library") 7 | } 8 | 9 | kotlin { 10 | sourceSets { 11 | commonMain.dependencies { 12 | api(libs.kotlinx.coroutines.test) 13 | } 14 | posixMain.dependencies { 15 | implementation(projects.ktorUtils) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ktor-test-server/README.md: -------------------------------------------------------------------------------- 1 | # ktor-test-server 2 | 3 | The server used for integration tests of Ktor itself. 4 | -------------------------------------------------------------------------------- /ktor-test-server/src/main/kotlin/test-server.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | import test.server.TestServerService 6 | 7 | tasks.withType().configureEach { 8 | val testServerService = TestServerService.registerIfAbsent(project) 9 | usesService(testServerService) 10 | // Trigger server start if it is not started yet 11 | doFirst("start test server") { testServerService.get() } 12 | } 13 | -------------------------------------------------------------------------------- /ktor-test-server/src/main/kotlin/test/server/tests/CloseableGroup.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package test.server.tests 6 | 7 | import java.io.Closeable 8 | 9 | class CloseableGroup : Closeable { 10 | private val resources = mutableListOf() 11 | 12 | fun use(resource: Closeable) { 13 | resources.add(resource) 14 | } 15 | 16 | override fun close() { 17 | resources.forEach { it.close() } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ktor-test-server/src/main/kotlin/test/server/tests/Multithreaded.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package test.server.tests 6 | 7 | import io.ktor.server.application.* 8 | import io.ktor.server.response.* 9 | import io.ktor.server.routing.* 10 | 11 | internal fun Application.multithreadedTest() { 12 | routing { 13 | get("multithreaded") { 14 | call.respondText(counter.incrementAndGet().toString()) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-utils/androidNative/interop/threadUtils.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktorio/ktor/bd41f807a02967990cc45ebe9915af6b6af36f08/ktor-utils/androidNative/interop/threadUtils.def -------------------------------------------------------------------------------- /ktor-utils/androidNative/src/io/ktor/util/ThreadInfo.androidNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | import kotlinx.cinterop.* 8 | import platform.posix.* 9 | 10 | @OptIn(UnsafeNumber::class) 11 | internal actual fun collectStack(thread: pthread_t): List = emptyList() 12 | 13 | internal actual fun setSignalHandler() = Unit 14 | -------------------------------------------------------------------------------- /ktor-utils/common/src/io/ktor/util/Hash.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | public object Hash { 8 | public fun combine(vararg objects: Any): Int = objects.toList().hashCode() 9 | } 10 | -------------------------------------------------------------------------------- /ktor-utils/common/src/io/ktor/util/Ranges.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | /** 8 | * Returns `true` if [other] range is fully contained inside [this] range 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.contains) 11 | */ 12 | public operator fun LongRange.contains(other: LongRange): Boolean = 13 | other.first >= start && other.last <= endInclusive 14 | -------------------------------------------------------------------------------- /ktor-utils/common/src/io/ktor/util/debug/IntellijIdeaDebugDetector.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.debug 6 | 7 | internal expect object IntellijIdeaDebugDetector { 8 | /** 9 | * Checks whether Intellij Idea debugger is connected to the current Ktor server. 10 | * May return true only for JVM debugger. 11 | * */ 12 | val isDebuggerConnected: Boolean 13 | } 14 | -------------------------------------------------------------------------------- /ktor-utils/common/src/io/ktor/util/internal/ExceptionUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.internal 6 | 7 | /** 8 | * Internal helper for setting cause on [Throwable] in MPP 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.internal.initCauseBridge) 11 | */ 12 | public expect fun Throwable.initCauseBridge(cause: Throwable) 13 | -------------------------------------------------------------------------------- /ktor-utils/common/src/io/ktor/util/logging/KtorSimpleLogger.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.logging 6 | 7 | @Suppress("FunctionName") 8 | public expect fun KtorSimpleLogger(name: String): Logger 9 | -------------------------------------------------------------------------------- /ktor-utils/common/test/io/ktor/util/NonceTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | import kotlin.test.* 8 | 9 | class NonceTest { 10 | 11 | @Test 12 | fun testGenerateNonce() { 13 | val nonce1 = generateNonce() 14 | val nonce2 = generateNonce() 15 | assertNotEquals(nonce1, nonce2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ktor-utils/js/src/io/ktor/util/PlatformUtils.js.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | public actual val PlatformUtils.platform: Platform by lazy { 8 | Platform.Js( 9 | when { 10 | hasNodeApi() -> Platform.JsPlatform.Node 11 | else -> Platform.JsPlatform.Browser 12 | } 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/CollectionsJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | public actual fun Set.unmodifiable(): Set = this 8 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/TargetUtilsJsWasm.kt: -------------------------------------------------------------------------------- 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 | package io.ktor.util 6 | 7 | import org.khronos.webgl.ArrayBuffer 8 | import org.khronos.webgl.Int8Array 9 | import kotlin.js.Promise 10 | 11 | public expect fun ByteArray.toJsArray(): Int8Array 12 | public expect fun Int8Array.toByteArray(): ByteArray 13 | 14 | internal expect suspend fun Promise.awaitBuffer(): ArrayBuffer 15 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/converters/ConversionServiceJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.converters 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual fun platformDefaultFromValues(value: String, klass: KClass<*>): Any? = null 10 | internal actual fun platformDefaultToValues(value: Any): List? = null 11 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/debug/IntellijIdeaDebugDetectorJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.debug 6 | 7 | internal actual object IntellijIdeaDebugDetector { 8 | actual val isDebuggerConnected: Boolean = false 9 | } 10 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/internal/ExceptionUtilsJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.internal 6 | 7 | /** 8 | * Internal helper for setting cause on [Throwable] in MPP 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.internal.initCauseBridge) 11 | */ 12 | public actual fun Throwable.initCauseBridge(cause: Throwable) {} 13 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/pipeline/PipelineContext.js.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | internal actual val DISABLE_SFG: Boolean = false 8 | -------------------------------------------------------------------------------- /ktor-utils/jsAndWasmShared/src/io/ktor/util/pipeline/StackTraceRecoverJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | internal actual fun Throwable.withCause(cause: Throwable?): Throwable = this 8 | -------------------------------------------------------------------------------- /ktor-utils/jvm/resources/META-INF/proguard/ktor.pro: -------------------------------------------------------------------------------- 1 | # Most of volatile fields are updated with AtomicFU and should not be mangled/removed 2 | -keepclassmembers class io.ktor.** { 3 | volatile ; 4 | } 5 | 6 | -keepclassmembernames class io.ktor.** { 7 | volatile ; 8 | } 9 | 10 | # client engines are loaded using ServiceLoader so we need to keep them 11 | -keep class io.ktor.client.engine.** implements io.ktor.client.HttpClientEngineContainer 12 | 13 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/CollectionsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | import java.util.* 8 | 9 | /** 10 | * Wraps into an unmodifiable set 11 | * 12 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.unmodifiable) 13 | */ 14 | public actual fun Set.unmodifiable(): Set = Collections.unmodifiableSet(this) 15 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/PlatformUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | private const val DEVELOPMENT_MODE_KEY: String = "io.ktor.development" 8 | 9 | public actual val PlatformUtils.platform: Platform 10 | get() = Platform.Jvm 11 | 12 | internal actual val PlatformUtils.isDevelopmentMode: Boolean 13 | get() = System.getProperty(DEVELOPMENT_MODE_KEY)?.toBoolean() == true 14 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/internal/ExceptionUtilsJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.internal 6 | 7 | /** 8 | * Internal helper for setting cause on [Throwable] in MPP 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.internal.initCauseBridge) 11 | */ 12 | public actual fun Throwable.initCauseBridge(cause: Throwable) { 13 | initCause(cause) 14 | } 15 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/logging/KtorSimpleLoggerJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.logging 6 | 7 | import org.slf4j.* 8 | 9 | @Suppress("FunctionName") 10 | public actual fun KtorSimpleLogger(name: String): Logger = LoggerFactory.getLogger(name) 11 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/logging/LoggerJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.logging 6 | 7 | public actual typealias Logger = org.slf4j.Logger 8 | 9 | public actual val Logger.isTraceEnabled: Boolean get() = isTraceEnabled 10 | public actual val Logger.isDebugEnabled: Boolean get() = isDebugEnabled 11 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/pipeline/PipelineContext.jvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | internal actual val DISABLE_SFG: Boolean = 8 | System.getProperty("io.ktor.internal.disable.sfg") == "true" 9 | -------------------------------------------------------------------------------- /ktor-utils/jvm/src/io/ktor/util/pipeline/StackTraceRecoverJvm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | internal actual fun Throwable.withCause(cause: Throwable?): Throwable = this 8 | -------------------------------------------------------------------------------- /ktor-utils/jvm/test/io/ktor/tests/utils/NonceSmokeTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.tests.utils 6 | 7 | import io.ktor.util.* 8 | import kotlin.test.* 9 | 10 | class NonceSmokeTest { 11 | @Test 12 | fun test() { 13 | val nonceSet = HashSet(4096) 14 | 15 | repeat(4096) { 16 | nonceSet.add(generateNonce()) 17 | } 18 | 19 | assertTrue { nonceSet.size == 4096 } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ktor-utils/mingwX64/src/io/ktor/util/ThreadInfoMingw.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | import platform.posix.* 8 | 9 | internal actual fun collectStack(thread: pthread_t): List = emptyList() 10 | 11 | internal actual fun setSignalHandler() = Unit 12 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/CollectionsNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | public actual fun Set.unmodifiable(): Set = this 8 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/PlatformUtilsNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | internal actual val PlatformUtils.isDevelopmentMode: Boolean 8 | get() = false 9 | 10 | public actual val PlatformUtils.platform: Platform 11 | get() = Platform.Native 12 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/converters/ConversionServiceNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.converters 6 | 7 | import kotlin.reflect.* 8 | 9 | internal actual fun platformDefaultFromValues(value: String, klass: KClass<*>): Any? = null 10 | internal actual fun platformDefaultToValues(value: Any): List? = null 11 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/debug/IntellijIdeaDebugDetectorNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.debug 6 | 7 | internal actual object IntellijIdeaDebugDetector { 8 | actual val isDebuggerConnected: Boolean = false 9 | } 10 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/internal/ExceptionUtilsPosix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.internal 6 | 7 | /** 8 | * Internal helper for setting cause on [Throwable] in MPP 9 | * 10 | * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.util.internal.initCauseBridge) 11 | */ 12 | public actual fun Throwable.initCauseBridge(cause: Throwable) {} 13 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/logging/LogLevelNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.logging 6 | 7 | public enum class LogLevel { 8 | TRACE, 9 | DEBUG, 10 | INFO, 11 | WARN, 12 | ERROR, 13 | } 14 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/pipeline/PipelineContext.posix.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | import kotlinx.cinterop.* 8 | import platform.posix.* 9 | 10 | @OptIn(ExperimentalForeignApi::class) 11 | internal actual val DISABLE_SFG: Boolean = getenv("KTOR_INTERNAL_DISABLE_SFG")?.toKString() == "true" 12 | -------------------------------------------------------------------------------- /ktor-utils/posix/src/io/ktor/util/pipeline/StackTraceRecoverNative.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util.pipeline 6 | 7 | internal actual fun Throwable.withCause(cause: Throwable?): Throwable = this 8 | -------------------------------------------------------------------------------- /ktor-utils/wasmJs/src/io/ktor/util/PlatformUtils.wasmJs.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | */ 4 | 5 | package io.ktor.util 6 | 7 | public actual val PlatformUtils.platform: Platform by lazy { 8 | Platform.WasmJs( 9 | when { 10 | hasNodeApi() -> Platform.JsPlatform.Node 11 | else -> Platform.JsPlatform.Browser 12 | } 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /teamcity.default.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. 3 | # 4 | 5 | # Should be in sync with org.gradle.jvmargs from gradle.properties 6 | # We have to duplicate system properties here because of TW-93433 "TeamCity ignores system properties specified in org.gradle.jvmargs" 7 | env.GRADLE_OPTS=-Xmx4g -Dkotlin.daemon.options="autoshutdownIdleSeconds=30" -Dkotlin.daemon.jvm.options="-Xmx512m,Xms256m,-XX:MaxMetaspaceSize=256m,XX:+HeapDumpOnOutOfMemoryError" 8 | --------------------------------------------------------------------------------