Invalid Content-Length
of incoming request causes to java.util.concurrent.TimeoutException: Idle timeout expired
#1862
Labels
if you send
Content-Length
header value longer than request body actually is - java.util.concurrent.TimeoutException: Idle timeout expired will be thrown.Description
It is clear that this is initially the client's problem if they send an invalid
Content-Length
and of course, it's clear that when we tell the server I'm sending you 10 bytes but send only 6, it expects 4 more until the end of the timeout, but the problem appears only if there is a Logbook dependency (which is logical due to buffering request), without it everything works fine.So maybe the problem here is more conceptual, like we need to support new behavior for the new
org.zalando.logbook.servlet.FormRequestMode
?Expected Behavior
Request handled normally
Actual Behavior
Possible Fix
Check content-length and compare with
request.getInputStream().available()
?Steps to Reproduce
Content-Length
header like:Context
After Logbook introducing - the client's requests started to fall.
Your Environment
2.7.* spring boot and 2.16 logbook, Jetty/Tomcat
3.2.* spring boot and 3.9 logbook, Jetty/Tomcat
The text was updated successfully, but these errors were encountered: