You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/06/27 11:56:45 UTC

DO NOT REPLY [Bug 51436] New: ServletRequestListener fails to access request parameters when an Expect-Header is sent

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


DO NOT REPLY [Bug 51436] ServletRequestListener fails to access request parameters when an Expect-Header is sent

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51436

--- Comment #2 from Simon Olofsson <si...@olofsson.de> 2011-06-29 11:57:44 UTC ---
Great, thanks Mark.

-- 
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


DO NOT REPLY [Bug 51436] ServletRequestListener fails to access request parameters when an Expect-Header is sent

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51436

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-06-28 17:49:50 UTC ---
Thanks for the patch. I applied a variation of it (with a little more error
handling) to 7.0.x and it will be included in 7.0.17 onwards.

-- 
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