tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51436] New: ServletRequestListener fails to access request parameters when an Expect-Header is sent
Date Mon, 27 Jun 2011 09:56:45 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51436

             Bug #: 51436
           Summary: ServletRequestListener fails to access request
                    parameters when an Expect-Header is sent
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: simon@olofsson.de
    Classification: Unclassified


Created attachment 27209
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27209
Acknowledge a request before any listeners are called.

I wrote a ServletRequestListener that tries to access a Request Parameter in
requestInitialized(.) with:
 sre.getServletRequest().getParameter("x");

This works fine with POST-Requests. But when I send the "Expect: 100-continue"
HTTP Header the Listener hangs, waiting for the Request Body. See the
stacktrace at:
 http://pastebin.com/r2J0P3qx
This happens because the Request isn't acknowledged and thus the body
(containing the parameters) isn't send.

The attached patch fixes this by acknowledging the request before the listeners
are called. With the patch applied everything works fine and all tests pass.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message