tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: ServletRequestListener and Expect-Header
Date Thu, 09 Jun 2011 18:20:29 GMT
Christopher Schultz wrote:
> Hash: SHA1
> Simon,
> On 6/8/2011 1:47 PM, Simon Olofsson wrote:
>> I have a ServletRequestListener that tries too access a Request Parameter:
>>  sre.getServletRequest().getParameter("x");
>> When I send a POST-Request with the "Expect: 100-continue" HTTP Header
>> it hangs waiting for the Request Body which isn't send because Tomcat
>> didn't send a 100-continue Response. See the Stacktrace at [1]. This
>> happens with a Tomcat built from SVN-Trunk.
>> This problem only occurs in a ServletRequestListener. Accessing a
>> Request Parameter from a Servlet works, because the Request is
>> acknowledged beforehand (StandardWrapperValve:176).
>> I would suggest to acknowledge the Request in
>> catalina.connector.Request.parseParameters().

Maybe slightly OT, and just a naive question for my own edification :

As I read the API for the ServletRequestListener, I understand that this thing is called 
very early in the cycle.  The spirit seems to be : provide a way to warn as soon as 
possible that a servlet request has come in.
Perhaps even, before we even know that it is really a /HTTP/ servlet request.

Now, /if/ it is a HTTP servlet request, (and particularly a POST request) then the fact of

calling ServletRequest.getParameter(x) would force, at that point, the parsing of the 
request, headers and body, as a HTTP request.

But what if it is not a HTTP request ?

I guess that my question could be rephrased as : is Tomcat a Java servlet engine, or just

a Java HTTP servlet engine ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message