[
https://issues.apache.org/jira/browse/SLING-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889845#action_12889845
]
Felix Meschberger commented on SLING-1596:
------------------------------------------
Some comments to the patch:
- You should check the actual type of the request attribute (in the
getRequestData method) instead of simply casting. If some rogue
script would set that request attribute, this would cause improperly
handled issues
- Theoretically with SLING-500/SLING-1603 the RequestData request attribute
may be set multiple times. Thus setting it must be
be accompanied with storing any previous value and resetting the previous
value at the end of the request
Finally, we should clearly see, where the RequestData.unwrap methods are used
and fix that use (the unwrap methods are internal to the bundle, so this search
should be complete).
> Reduce coupling between RequestData and SlingHttpServletRequestImpl
> -------------------------------------------------------------------
>
> Key: SLING-1596
> URL: https://issues.apache.org/jira/browse/SLING-1596
> Project: Sling
> Issue Type: Improvement
> Components: Engine
> Affects Versions: Engine 2.0.6
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Priority: Minor
> Attachments: SLING-1596.patch
>
>
> As discussed in http://markmail.org/thread/ldayz27ehldyvzr4 the tight
> coupling between RequestData and SlingHttpServletRequestImpl makes it
> impossible to use request classes that just implement SlingHttpServletRequest.
> I need this for example for SLING-550, where servlets run outside of the
> container's request/response cycle.
> I'll attach a patch that reduces coupling by grabbing the RequestData from a
> request attribute instead of relying on the SlingHttpServletRequestImpl class
> to provide it. All tests including integration pass with this patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.