Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
None
Description
RequestCacheThreadLocal holds a per-request "cache" that is used, in particular, by Crowd's implementation of WebResourceIntegration (and in turn, by WebResourceManager and SoyTemplateRenderer).
This cache is initialized and cleaned-up in RequestCacheThreadLocalFilter. This filter is mapped to a number of patterns, including /plugins/servlet/*. However, it is mapped only for the REQUEST dispatcher.
Our problem in our plugin is when using the QUnit plugin: it uses URL rewriting so you can access it using /qunit, which is not covered by the mapping. It eventually ends up forwarding the request to /plugin/servlet/something but since the mapping does not apply to the FORWARD dispatcher, the filter is never applied.
Other problem: RequestCacheThreadLocal defines an initial value. However:
- it is also initialized in the filter, which is redundant
- the clean-up code sets the thread local value to null, instead of calling remove()