Hi! I'm wondering why query parameters can overrid...
# ktor
v
Hi! I'm wondering why query parameters can override path parameters with the same name. For example I have such a route in the application:
Copy code
route("/{id}") {
    get { println(call.parameters["id"]) }
}
Given a request
GET /foo?id=bar
the printed value will be "bar", not "foo". It looks like this is intended behavior (see https://github.com/ktorio/ktor/blob/d4e1a7caaa031fb466beb1cc102192cc88623bfe/ktor-server/ktor-server-core/jvm/src/io/ktor/routing/RoutingApplicationCall.kt#L25), but why?
r
Posted an issue as I'm really curious about this too: https://github.com/ktorio/ktor/issues/1015