You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2010/04/22 04:29:51 UTC
GET on http://localhost:8080/dev/ not generating correct content type
Hi,
If I do a get to a directory that contains an index file (eg index.hmtl) the content type is not set correctly, confusing some browsers.
I think this is because the StreamRenderServlet when rendering a directory (/dev/) includes the index resource (/dev/index.html) which arrives back at at the StreamRenderServlet.
However when including, the StreamRenderServlet does not set any response headers.
I think that the StreamRenderServlet.renderDirectory() should at least try and set the response headers for the included resource, ideally using the same mechanism as used when rendering the index resource directly (eg /dev/index.html)
WDYT?
Ian
Re: GET on http://localhost:8080/dev/ not generating correct content type
Posted by Ian Boston <ie...@tfd.co.uk>.
Verified this, opened a jira [1] and fixed, just checking before commit.
Probably didn't need to ask, fix was trivial :)
Ian
1 https://issues.apache.org/jira/browse/SLING-1496
On 22 Apr 2010, at 12:29, Ian Boston wrote:
> Hi,
>
> If I do a get to a directory that contains an index file (eg index.hmtl) the content type is not set correctly, confusing some browsers.
>
> I think this is because the StreamRenderServlet when rendering a directory (/dev/) includes the index resource (/dev/index.html) which arrives back at at the StreamRenderServlet.
>
> However when including, the StreamRenderServlet does not set any response headers.
>
> I think that the StreamRenderServlet.renderDirectory() should at least try and set the response headers for the included resource, ideally using the same mechanism as used when rendering the index resource directly (eg /dev/index.html)
>
> WDYT?
>
> Ian