Nathan Ashworth wrote:
Thanks, Filip.
Upon further investigation, we've discovered that our POSTs were bigger than
the default maxPostSize value (2MB). The call to getParameter("foo") was
returning null and doing a trace showed that the client was not sending the
body.
good catch
It appears
Thanks, Filip.
Upon further investigation, we've discovered that our POSTs were bigger than
the default maxPostSize value (2MB). The call to getParameter("foo") was
returning null and doing a trace showed that the client was not sending the
body.
It appears that Tomcat is returning "100 Continue
That is how it is with every single request.
Tomcat will never read a body unless the servlet initiates the action.
So to read a body you can either
- read the input stream
- read the reader
- issue a request.getParameter (if the body is form encoded, tomcat will
read the body and parse the param
What we are observing is: 1) Client initiates the POST with the 'Expect:
100-continue' header, 2) Tomcat responds with '100 Continue', 3) Tomcat
calls the servlet. Now once we are in our servlet, unless we explicitly read
from the request's BufferedReader, the client will not send the remainder of
if you use wireshark, you should see that Tomcat already does it
automatically.
if you look at the code StandardWrapperValve.java, it should call
response.acknowledge(), and if the client sent an expect header, tomcat
will write out the 100 continue
Filip
Nathan Ashworth wrote:
What's the sim