[
https://issues.apache.org/jira/browse/SLING-13354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143645#comment-18143645
]
Joerg Hoh commented on SLING-13354:
-----------------------------------
[~davidsanchez] thanks for your contribution!
> StreamRenderer: Fix content-type when rendering an index file
> -------------------------------------------------------------
>
> Key: SLING-13354
> URL: https://issues.apache.org/jira/browse/SLING-13354
> Project: Sling
> Issue Type: Task
> Components: Servlets
> Reporter: Joerg Hoh
> Priority: Major
> Fix For: Servlets Get 3.0.0
>
>
> When the StreamRenderer renders a directory, it iterates through a series of
> hard-coded resource names; if such a resource is present, it tries to guess
> its content-type from that resource's ResourceMetadata, and chooses
> "application/octet-stream" if no such information is available.
> And if the resourcename does not contain a "." (dot) the StreamRenderer
> appends the ".html" extension to that resource and feeds it as parameter to
> the ResourceDispatcher to include.
> In this particular case if guessing the content type did not work the
> content-type should be set to "text/html" instead of
> "application/octet-stream".
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)