Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-3413

RequestCacheThreadLocalFilter is not applied to /qunit resources

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.7
    • 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()

      Attachments

        Activity

          People

            abusch Antoine Büsch (Inactive)
            abusch Antoine Büsch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: