Open notlaW opened 3 years ago
Thanks for the question, @notlaW.
val route = post { complete(StatusCodes.OK) } }
You are not reading the request body here, so the warning is expected.
This was discovered in the logs of a service that acts as a pass through proxy. The warning indicates that we are responding BACK to the client before the LAST chunk is read or marked as processed by the service. Due to it being a proxy we do not have any intention of reading in all the bytes into memory, and are hoping to shed some more light as to why we are seeing this warning.
In that case, it depends on the proxy implementation and also on the backend behavior. You will see the warning either if you don't pass all request body data to the backend, or if the backend sends back a response before all request body data has been propagated by the proxy.
We're seeing this warning in our logs:
Sending an 2xx 'early' response before end of request for http://localhost:8080/test received... Note that the connection will be closed after this response. Also, many clients will not read early responses! Consider only issuing this response after the request data has been completely read!
We think it might have to do with the handling chunked requests. Here is a very basic example:
OR
When the request includes a large payload (130kb+)
Will yield the same warning.
This was discovered in the logs of a service that acts as a pass through proxy. The warning indicates that we are responding BACK to the client before the LAST chunk is read or marked as processed by the service. Due to it being a proxy we do not have any intention of reading in all the bytes into memory, and are hoping to shed some more light as to why we are seeing this warning.