Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2411

ResourceDecorator(Resource, HttpServletRequest) doesn't get called consistently

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JCR Resource 2.1.0, API 2.3.0
    • Component/s: API, JCR
    • Labels:
      None

      Description

      The ResourceDecorator currently has two methods:
      decorate(Resource)
      decorate(Resource, HttpServletRequest)

      The JcrResourceResolver uses the latter method when resolve(HttpServletRequest,String) is invoked. In all other cases, the former method is used. This behavior is correct.

      However, the JcrResourceResolver (and any future ResourceResolver implementation for that matter) really doesn't have any control over how it is invoked. For example, at present <sling:include> and <sling:forward> call resolve(String), not resolve(HttpServletRequest,String) (see http://s.apache.org/lL5). But even if we did a code audit within Sling and fixed all the cases like this, we don't have any control over downstream applications which may or may not invoke the two-argument resolve() method.

        Attachments

          Activity

            People

            • Assignee:
              justinedelson Justin Edelson
              Reporter:
              justinedelson Justin Edelson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: