tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55595] New: Request parameter parsing is not thread-safe
Date Wed, 25 Sep 2013 17:23:53 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55595

            Bug ID: 55595
           Summary: Request parameter parsing is not thread-safe
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: tajuddin@amazon.com

Created attachment 30882
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30882&action=edit
Proposed patch to trunk

I have a use case for accessing the parameters of a request in multiple threads
in order to generate the response. In that situation, there is a race condition
in org.apache.catalina.connector.Request when attempting to access parameters. 

The first thread in will flag the parameters as parsed while successive threads
may retrieve partially-constructed parameters. I can retrieve the parameters in
the request thread before dispatching to the other threads, and this problem
does not occur. However, that imposes overhead on my environment where it may
not be required.

A little synchronization should handle this case without creating any overhead
for the standard single-threaded request handling use cases. I have attached a
patch with a proposed solution. Any feedback is welcome.

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