[
https://issues.apache.org/jira/browse/SLING-547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler resolved SLING-547.
------------------------------------
Resolution: Won't Fix
> Included header.html (node of type nt:file) through a script sling.include
> uses HtmlRendererServlet instead of StreamRendererServlet
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-547
> URL: https://issues.apache.org/jira/browse/SLING-547
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.0.2, Scripting Core 2.0.2
> Environment: Ubuntu 8.04, Java 1.6
> Reporter: Bryce Ewing
> Priority: Minor
>
> Hi,
> Well at least I think that this is a bug. The ScriptHelper.include method
> says that it includes the "output of another request" which I would have
> thought meant that if I included "/content/include/header.html" this would do
> the same thing as if I requested
> http://localhost:8080/content/include/header.html. In this case the
> header.html file is a snippet of html that has been loaded as a file (i.e.
> with type nt:file). When I request the file directly as
> http://localhost:8080/content/include/header.html I get the file streamed
> directly using StreamRendererServlet, but from an include this instead uses
> the extension from the original request (which was for a html rendered view
> of a node) and then uses the HtmlRendererServlet.
> I would make a suggestion as to where a fix to this could be applied but got
> myself a little bogged down in the details of this, not sure if something
> like checking the node type, and if it is a file that already matches the
> extension then stream it might work? Or maybe a different request object
> needs to be created for this "request".
> Cheers
> Bryce
--
This message was sent by Atlassian Jira
(v8.20.10#820010)