tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 55595] New: Request parameter parsing is not thread-safe
Date Wed, 25 Sep 2013 17:23:53 GMT

            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

Created attachment 30882
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:
For additional commands, e-mail:

View raw message