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 2006/11/01 13:29:16 UTC

DO NOT REPLY [Bug 40860] New: - Tomcat loses request parameters

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40860

           Summary: Tomcat loses request parameters
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: thiagocosta@infonet.com.br


Hi,

I�m having a problem with parameters loses in tomcat. It�s an intermittent
problem. That occurs when I do some ajax�s request and then I do one or more
form submissions. 

I put the tomcat in debug mode and  I observed the class CoyoteAdapter � the
method service(). There exists a request variable (CoyoteRequest type) that has
a protected variable requestParametersParsed that is a flag to parse or not
parse the parameters of a post or get. In the end of the method exists a
�finally� clause that force the request variable to do a recycle. The recycle
forces the requestParametersParsed variable to change to false. Then in the next
utilization of the class the parameters will be parsed again. 

The problem that I�ve found is in some situations (as described at the start)
the requestParametersParsed variable is true and the parameters are not parsed. 

The consequence of this is that in my servlet when I ask request.getParameter(�)
and it returns null but in my query string or in my post data has the parameter.
The prove of that is when I ask request.getQueryString() and it returns a not
empty string with my parameter.

Ex:

request.getQueryString() = servlet?param=x
request.getParameter(�param�) = null


See a pierce of the method service of CoyoteAdapter:
 
    public void service(Request req, Response res)
        throws Exception {

�
        try {

            // Parse and set Catalina and configuration specific
            // request parameters
            if ( postParseRequest(req, request, res, response) ) {
                // Calling the container
                connector.getContainer().invoke(request, response);
            }

�
        } finally {
            // Recycle the wrapper request and response
            request.recycle();
            response.recycle();
        }

    }

At line �if postParseRequest(�� the request. requestParametersParsed must be
false but in some situations it is true!

I cant find the cause of the problem but I found the problem. To resolve my
problem I put a request.recycle(); before the line to force the
requestParametersParsed  variable to false.
I don�t want to have a tomcat modified by me. Its not good. 

See the post
http://mail-archives.apache.org/mod_mbox/tomcat-dev/200601.mbox/%3C43D11EAA.1090905@amazon.com.br%3E
He is having the same problem.

Thanks

Thiago

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

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


DO NOT REPLY [Bug 40860] - Tomcat loses request parameters

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40860





------- Additional Comments From thiagocosta@infonet.com.br  2006-11-01 06:42 -------
(In reply to comment #1)
> I suppose the logical conclusion would be to look why the flag is false, rather
> than resort to hacking. Most likely you are seeing concurrent access to the
> request object.

But i�m an user and not a developer. As an user i cant do nothing to resolve the
problem. As i observe, the recycle must set to false! There is a finally clause
that force the recycle! I supose that or the recycle may throw an exception or
an other process is accessing the request object.

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

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


DO NOT REPLY [Bug 40860] - Tomcat loses request parameters

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40860


remm@apache.org changed:

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




------- Additional Comments From remm@apache.org  2006-11-01 05:20 -------
I suppose the logical conclusion would be to look why the flag is false, rather
than resort to hacking. Most likely you are seeing concurrent access to the
request object.

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

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


DO NOT REPLY [Bug 40860] - Tomcat loses request parameters

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40860


markt@apache.org changed:

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




------- Additional Comments From markt@apache.org  2006-11-11 13:41 -------
A new request object is generated for each request. Therefore, the only ways I
can for what you report to happen are:
- Multiple threads trying to read the parameters at the same time. This isn't
something any of the internal Tomcat code does.
- An exception during the parameter processing.

I have added additional logging if the parameter processing fails to SVN and
this will be included in 5.5.21 onwards.

If you still see this problem post 5.5.21 and there is no helpful information in
the logs, please re-open and provide a test case so I can investigate further.

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

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


DO NOT REPLY [Bug 40860] - Tomcat loses request parameters

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40860


thiagocosta@infonet.com.br changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




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

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