Permalink
Browse files

MAHOUT-755 use application/* MIME types

git-svn-id: https://svn.apache.org/repos/asf/mahout/trunk@1143533 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 17f8ae3 commit 6131e18016337f5444ade019834d18f478e0bb17 @srowen srowen committed Jul 6, 2011
View
4 integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
@@ -115,7 +115,7 @@ public void doGet(HttpServletRequest request,
}
private static void writeXML(HttpServletResponse response, Iterable<RecommendedItem> items) throws IOException {
- response.setContentType("text/xml");
+ response.setContentType("application/xml");
response.setCharacterEncoding("UTF-8");
response.setHeader("Cache-Control", "no-cache");
PrintWriter writer = response.getWriter();
@@ -131,7 +131,7 @@ private static void writeXML(HttpServletResponse response, Iterable<RecommendedI
}
private static void writeJSON(HttpServletResponse response, Iterable<RecommendedItem> items) throws IOException {
- response.setContentType("text/plain");
+ response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.setHeader("Cache-Control", "no-cache");
PrintWriter writer = response.getWriter();

0 comments on commit 6131e18

Please sign in to comment.