Теперь у меня ктор сервер на основе нетты. Когда я выполняю длинный запрос GET (около 9300 символов (в основном в параметрах запроса)), ktor отвечает Unhandled: GET - /bad-request. Если я уменьшу длину URL, он будет работать нормально.
Unhandled: GET - /bad-request
В конфигурации вашего встроенного сервера вы можете предоставить функцию «httpServerCodec» для создания HttpServerCodec (https://netty.io/4.1/api/io/netty/handler/codec/http/HttpServerCodec.html), в которой вы можете установить свойство maxInitialLineLength.
embeddedServer(Netty, configure = { // Size of the queue to store [ApplicationCall] instances that cannot be immediately processed requestQueueLimit = 16 // Do not create separate call event group and reuse worker group for processing calls shareWorkGroup = false // User-provided function to configure Netty's [ServerBootstrap] configureBootstrap = { // ... } httpServerCodec = { HttpServerCodec(.......) } // Timeout in seconds for sending responses to client responseWriteTimeoutSeconds = 10 }) { // ... }.start(true)