gotoOla
05/17/2019, 3:28 PMvoben
05/19/2019, 9:28 PMio.ktor.server.netty.EngineMain.main(arrayOf("-config=dev.conf"))
. Is it possible for the appropriate file to be set automatically based on my environment? How do I detect what environment I am in to be able to set the config file?Pavel Lechev
05/20/2019, 8:20 AMio.ktor.config.ApplicationConfig
across our application code to access the configuration, however still seeing it as "experimental". Are there plans for this to become "official"?mingkangpan
05/20/2019, 12:00 PMException in thread "main" java.lang.ClassNotFoundException: Module function cannot be found for the fully qualified name 'com.minki.ktor.ApplicationKt.main'
mingkangpan
05/20/2019, 12:00 PMgregorbg
05/21/2019, 1:05 PMCookies
feature plugin? At work, we are communicating with an external service that requires cookies but that sends the Expires
cookie in an incorrect format (i.e. localised, German weekday abbreviations that are only 2 chars long). The ktor-client
module in our codebase subsequently throws an exception at https://github.com/ktorio/ktor/blob/68eef1948ce4c8c11dae794588f8d063afb67d0b/ktor-http/common/src/io/ktor/http/DateUtils.kt#L20 blocking further development. The communications partner is an enterprise-grade provider, so negotiating with them to just abide by the f*ing standards is not an option, I'm afraid. (Although it's sad that a company like them doesn't care for standards in the first place, but that's totally not my point here.)Steven
05/21/2019, 6:02 PMcarrot
05/22/2019, 3:41 PMApplicationCall.receive
with Jackson, I know there's loads of issues on the repo, so would appreciate a sanity check about expected behaviour, if anyone fancies taking a look - happy to close it if it's what people are expecting 🙂 https://github.com/ktorio/ktor/issues/1146Simon Schubert
05/22/2019, 5:29 PMcarrot
05/22/2019, 7:14 PMAntanas A.
05/23/2019, 7:32 AMNikky
05/23/2019, 7:49 AMLawik
05/23/2019, 9:34 AMReceivePipelineException: Fail to run receive pipeline: NoTransformationFoundException: No transformation found: class JsHttpResponse -> class ExerciseProgressDTO
coder82
05/23/2019, 1:25 PMhdarritchon
05/23/2019, 3:30 PMinstall(CallLogging) {
level = <http://Level.INFO|Level.INFO>
filter { call -> call.request.path().startsWith("/api/v1") }
callIdMdc()
}
And I have some logs like : 200 OK: GET - /api/v1/health
but I’d like to have more details like the header and body because in some case I have log like Unhandled: POST - /api/v1/catalogEdito/reunion/store
whereas this endpoint exists and returns some datas for certain type of client. So I think I need to have more details to debug and understand what is going on !
Do you know how I can do it please ?Thomas
05/25/2019, 2:44 PMmingkangpan
05/26/2019, 12:17 PMval ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project
plugins {
application
kotlin("jvm")
}
group = "ktorserver"
version = "0.0.1"
application {
mainClassName = "io.ktor.server.tomcat.EngineMain"
}
repositories {
mavenLocal()
maven { url = uri("<https://kotlin.bintray.com/ktor>") }
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
compile("io.ktor:ktor-server-tomcat:$ktor_version")
compile("ch.qos.logback:logback-classic:$logback_version")
compile("io.ktor:ktor-server-core:$ktor_version")
compile("io.ktor:ktor-jackson:$ktor_version")
testCompile("io.ktor:ktor-server-tests:$ktor_version")
}
^this my gradle.ktsmingkangpan
05/26/2019, 12:22 PMgotoOla
05/27/2019, 9:48 AM<https://ktor.io/advanced/pipeline/route.html>
maybe it should be called to
<https://github.com/ktorio/ktor/blob/master/ktor-features/ktor-metrics/jvm/src/io/ktor/metrics/dropwizard/DropwizardMetrics.kt>
Dzmitry Neviadomski
05/27/2019, 11:57 AMcy
05/28/2019, 10:08 AMirus
05/28/2019, 7:43 PMrocketraman
05/28/2019, 9:51 PM/foo:{bar}/{baz}
/{bar}/{baz}
When calling /foo:123/456
I was expecting the first route to trigger with bar=123 and baz=456. Instead, the second route triggers with bar=foo:123 and baz=456. Is this a bug or expected?tylerwilson
05/28/2019, 11:43 PMjava.lang.IllegalStateException: Cannot modify a builder when final structure has already been built
. Is there a way to do this? Any examples out there I may refer to? Thank you.krtko
05/29/2019, 5:30 AMRick Prata
05/29/2019, 10:56 PMhyukchan
05/30/2019, 11:09 AMAndrey Gromov
05/30/2019, 3:26 PMprivate suspend fun eventLoop(port: Int) {
val server = aSocket(ActorSelectorManager(<http://Dispatchers.IO|Dispatchers.IO>))
.udp()
.bind(InetSocketAddress(port)) <<<<<<<<<<< Exception
I'm sure that port is free on bind moment
Stacktrace
Exception in thread "main" java.net.SocketException: Already bound
at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:164)
at java.base/sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:105)
at io.ktor.network.sockets.UDPSocketBuilder.bind(Builders.kt:152)
at io.ktor.network.sockets.UDPSocketBuilder.bind$default(Builders.kt:143)
at co.fun.multiplayer.udp.ServerListener.eventLoop(ServerListener.kt:34)
at co.fun.multiplayer.udp.ServerListener$start$1.invokeSuspend(ServerListener.kt:26)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:80)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at co.fun.multiplayer.udp.ServerListener.start(ServerListener.kt:25)
at co.fun.multiplayer.udp.MainKt.main(Main.kt:14)
Caused by: java.nio.channels.AlreadyBoundException
at java.base/sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:784)
at java.base/sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:103)
... 14 more
This workaround helping, but it is very ugly
var server: BoundDatagramSocket
while (true) {
try {
server = aSocket(ActorSelectorManager(<http://Dispatchers.IO|Dispatchers.IO>))
.udp()
.bind(InetSocketAddress(port))
break
} catch (e: Exception) {
}
}
anli
05/30/2019, 9:09 PMandev
05/30/2019, 10:39 PMandev
05/30/2019, 10:39 PMmp
05/31/2019, 2:46 PMandev
05/31/2019, 5:16 PMmp
05/31/2019, 7:47 PMwithContext(<http://Dispatchers.IO|Dispatchers.IO>) { ... }
. That’s really what it boils down to