[
https://issues.apache.org/jira/browse/MAHOUT-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060787#comment-13060787
]
Julian Bell commented on MAHOUT-755:
------------------------------------
Thanks.
A browser might want to save the output rather than display text when manually
testing, but it's better to minimise the possibility of character encoding
problems (IMO).
> RecommenderServlet response content types for XML and JSON
> ----------------------------------------------------------
>
> Key: MAHOUT-755
> URL: https://issues.apache.org/jira/browse/MAHOUT-755
> Project: Mahout
> Issue Type: Bug
> Components: Integration
> Affects Versions: 0.6
> Reporter: Julian Bell
> Assignee: Sean Owen
> Priority: Minor
> Labels: Encoding
> Fix For: 0.6
>
>
> In my opinion I believe the following changes should be made:
> For the writeJSON method, the content type should be changed from
> "text/plain" to "application/json". It's not as 'friendly' to some browsers
> but is more technically correct. See http://www.ietf.org/rfc/rfc4627.txt
> For the writeXML method, if you don't put the character encoding type into
> the same line at the content type, then the encoding type can be ignored and
> decoded as ASCII (see http://annevankesteren.nl/2005/03/text-xml). So you
> could change the content type from "text/xml" to "text/xml; charset=utf-8"
> but it's probably better to change it to "application/xml". See
> http://www.grauw.nl/blog/entry/489
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira