Servlet engine (e.g. Tomcat
or Jetty
) receives an HTTP request and calls a servlet with an HttpServletRequest
object, which contains an InputStream
of the request body.
Now I wonder if the engine has already read the whole request from the network and the InputStream
is just a buffer in memory or it has read the request partially and when the servlet calls the InputStream.read
it actually reads the socket.