https://kotlinlang.org logo
#ktor
Title
# ktor
j

Jan

08/20/2021, 8:20 PM
I wanted to make a little server to share files, but I get an error when I try to go to the server.
Copy code
routing {
     static("/static") {
          staticBasePackage = "/home/pi/Raspy/"
          files("public")
     }
}

2021-08-20 22:15:54.514 [eventLoopGroupProxy-4-2] TRACE ktor.application - Failed to decode request
java.lang.IllegalArgumentException: invalid version format: XV�PÒ�ÆICL;ÅËÊ)|$À+À/̨̩À,À0À
URL I try: https://localhost:26666/static/public/test.txt
a

Aleksei Tirman [JB]

08/23/2021, 8:46 AM
The problem is that you are trying to make a secure request to a server that doesn't support it. Just replace
https
with
http
in your URL.
7 Views