Skip to content

[Bug] Server failed on missing body length #2368

Description

@krzema12

Component

Action

Not sure what triggered it, but see GET - //%20%20%20%20%22/wp-config.php.save%22,,/php-perf.php below.

Expected

No failure.

Actual

What happens instead?

Got this stack trace:

2026-06-24 21:35:39.628	
2026-06-24 19:35:39,628 <INFO > <eventLoopGroupProxy-4-5            > <[]> <{request-id=4jj9s36l5eqi6si}> <                        io.ktor.server.Application> 500 Internal Server Error: GET - //%20%20%20%20%22/wp-config.php.save%22,,/php-perf.php in 103ms
	
		2026-06-24 21:35:39.627	
	... 12 more
	
		2026-06-24 21:35:39.627	
	at io.ktor.http.cio.HttpBodyKt.parseHttpBody(HttpBody.kt:112)
	
		2026-06-24 21:35:39.627	
keep-alive should be disabled (connection: close)
	
		2026-06-24 21:35:39.627	
chunked transfer encoding should be used or
	
		2026-06-24 21:35:39.627	
Caused by: java.lang.IllegalStateException: Failed to parse request body: request body length should be specified,
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	
		2026-06-24 21:35:39.627	
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	
		2026-06-24 21:35:39.627	
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	
		2026-06-24 21:35:39.627	
	at io.ktor.utils.io.ByteWriteChannelOperationsKt$writer$job$1.invokeSuspend(ByteWriteChannelOperations.kt:185)
	
		2026-06-24 21:35:39.627	
	at io.ktor.client.engine.cio.UtilsKt$readResponse$2$1$body$httpBodyParser$1.invoke(utils.kt)
	
		2026-06-24 21:35:39.627	
	at io.ktor.client.engine.cio.UtilsKt$readResponse$2$1$body$httpBodyParser$1.invoke(utils.kt)
	
		2026-06-24 21:35:39.627	
	at io.ktor.client.engine.cio.UtilsKt$readResponse$2$1$body$httpBodyParser$1.invokeSuspend(utils.kt:211)
	
		2026-06-24 21:35:39.627	
	at io.ktor.http.cio.HttpBodyKt.parseHttpBody(HttpBody.kt:120)
	
		2026-06-24 21:35:39.627	
	at io.ktor.utils.io.ByteWriteChannelOperationsKt.close(ByteWriteChannelOperations.kt:130)
	
		2026-06-24 21:35:39.627	
	at io.ktor.utils.io.ByteChannel.cancel(ByteChannel.kt:462)
	
		2026-06-24 21:35:39.627	
keep-alive should be disabled (connection: close)
	
		2026-06-24 21:35:39.627	
chunked transfer encoding should be used or
	
		2026-06-24 21:35:39.627	
io.ktor.utils.io.ClosedByteChannelException: Failed to parse request body: request body length should be specified,
	
		2026-06-24 21:35:39.627	
2026-06-24 19:35:39,627 <WARN > <DefaultDispatcher-worker-15        > <[]> <{}> <com.github.benmanes.caffeine.cache.LocalAsyncCache> Exception thrown during asynchronous load

Workaround, if exists

None/unknonw.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions