[ 
https://issues.apache.org/jira/browse/SLING-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571024#action_12571024
 ] 

Felix Meschberger commented on SLING-263:
-----------------------------------------

Yes, I agree with you both and this will be part of migrating these renderer 
servlets into a new location and bundle and separating the ujax POST servlet 
into its own servlet.

In the meantime I fix this issue by adding a response.setCharacterEncoding() to 
all servlets (instead of extending the content type as proposed by the initial 
description).

Currently I am trying to test this, but there are issues with transferrring 
non-ASCII7 characters from the integration tests to Sling, which I am analyzing 
at the moment.

> json render servlet does not set charset of content type
> --------------------------------------------------------
>
>                 Key: SLING-263
>                 URL: https://issues.apache.org/jira/browse/SLING-263
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>            Reporter: Tobias Bocanegra
>            Assignee: Felix Meschberger
>
> the launchpad JsonRenderServlet uses incomplete response content type not 
> specifying the charset.
> Index: 
> launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/LaunchpadDefaultServlet.java
> ===================================================================
> --- 
> launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/LaunchpadDefaultServlet.java
>  (revision 629192)
> +++ 
> launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/LaunchpadDefaultServlet.java
>  (working copy)
> @@ -94,7 +94,7 @@
>  
>          getServlets = new HashMap<String, Servlet>();
>          getServlets.put("html", new DefaultHtmlRendererServlet("text/html"));
> -        getServlets.put("json", new JsonRendererServlet("application/json"));
> +        getServlets.put("json", new JsonRendererServlet("application/json; 
> charset=utf-8"));
>          getServlets.put("txt", defaultGetServlet);
>          getServlets.put("res", streamServlet);
>      }

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

Reply via email to