Joerg Hoh created SLING-13354:
---------------------------------

             Summary: 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
             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
(v8.20.10#820010)

Reply via email to