https://issues.apache.org/bugzilla/show_bug.cgi?id=55595

--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
A bit more commentary to avoid grumbling:

1. While uncontended locks are cheap, they still have a cost that nobody else
wants to pay.

2. If you need to access request parameters from multiple threads, you can do
so yourself without having to modify the container to do it for you. Two
examples I can think of are to wrap the request in an HttpServletRequestWrapper
that you write which includes synchronization for any of the getParameter...()
family of methods, or to use a similar but simpler interface (e.g. just not
HttpServletRequestWrapper).

In any case, you will need to take special care not to retain references to the
request or response in those other threads. Otherwise, you risk a security
vulnerability at worst and mass confusion at the least.

If you don't want to complicate your own servlet code with this kind of thing,
you could even write a Filter to apply a wrapper for those servlets for which
it is appropriate.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to