[
https://issues.apache.org/jira/browse/SLING-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848089#action_12848089
]
Felix Meschberger commented on SLING-1456:
------------------------------------------
The problem is that the StreamRendererServlet inspects the
"org.apache.sling.api.include.servlet" request attribute which is defined to
indicate the servlet including the currently running servlet or script.
In the case of a forwarded request, this attribute is not expected to be set
(exactly like the respective javax.servlet.include.* attributes) since a
forward is just like a direct a request to the forward target.
The problem here is, that the RequestData.pushContent method in preparation of
a call to a servlet being called from the SlingRequestDispatcher ignoring
whether the content is included due to RequestDispatcher.include or
RequestDispatcher.forward.
The fix is to set the request attributes properly in the
SlingRequestDispatcher.include method.
> "org.apache.sling.api.include.servlet" request attribute is set as well when
> RequestDispatcher#forward is called which is wrong
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-1456
> URL: https://issues.apache.org/jira/browse/SLING-1456
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Reporter: Philipp Koch
> Assignee: Felix Meschberger
> Priority: Critical
>
> how to reproduce:
> forward a file resource and look at the http conversation. you will encounter
> that the "If-Modified-Since" header is never set because of a !included check
> in the StreamRendererServlet#doGet method. in consequence browser caching is
> not possible.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.