You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/09/29 08:50:44 UTC

[jira] Closed: (SLING-679) DefaultSlingScript unconditionally sets the response character encoding

     [ https://issues.apache.org/jira/browse/SLING-679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-679.
-----------------------------------

    Resolution: Fixed

Content type and encoding is properly set now. Therefore closing this issue.

> DefaultSlingScript unconditionally sets the response character encoding
> -----------------------------------------------------------------------
>
>                 Key: SLING-679
>                 URL: https://issues.apache.org/jira/browse/SLING-679
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Scripting Core 2.0.4
>
>
> The DefaultSlingScript.service method, which is called by the Sling runtime to execute a script to handle a request, sets the response content type and character encoding. While the content type is only set if it can be defaulted throught the request (SlingHttpServletRequest.getResponseContentType()) the charatcer encoding is unconditionally set to UTF-8.
> This causes such interesting content type headers as "image/png; charset=UTF-8", which is not technically wrong, but certainly strange.
> It would be more correct to only set the default character encoding if the default content type as retrieved from the request is a text content type, e.g. text/plain, text/html, text/x-whatever.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.