Does ktor automatically convert request header key...
# ktor
b
Does ktor automatically convert request header keys to some weird camel case? My GitHub webhook allegedly sends the header
X-GitHub-Event
but the server receives
X-Github-Event
with a lower case h. I've contacted GitHub support and they said it's caused by the receiving server. If it Is caused by ktor, is there a way to keep the original names?
s
Arent headers supposed to be case insensitive ?
b
Yes which is why this causes issues for me
a
If I send
X-GitHub-Event: 123
to a Ktor server with the following code:
Copy code
routing {
    get("/") {
        call.request.headers.forEach { s, strings -> println(s) }
    }
}
then the following is printed:
Copy code
Host
User-Agent
Accept
Accept-Charset
X-GitHub-Event
content-length
b
Hm weird. Maybe it's caused by my reverse proxy. I'll look into that