Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 6131e18016337f5444ade019834d18f478e0bb17 1 parent 17f8ae3
Sean Owen authored July 06, 2011
4  integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
@@ -115,7 +115,7 @@ public void doGet(HttpServletRequest request,
115 115
   }
116 116
 
117 117
   private static void writeXML(HttpServletResponse response, Iterable<RecommendedItem> items) throws IOException {
118  
-    response.setContentType("text/xml");
  118
+    response.setContentType("application/xml");
119 119
     response.setCharacterEncoding("UTF-8");
120 120
     response.setHeader("Cache-Control", "no-cache");
121 121
     PrintWriter writer = response.getWriter();
@@ -131,7 +131,7 @@ private static void writeXML(HttpServletResponse response, Iterable<RecommendedI
131 131
   }
132 132
 
133 133
   private static void writeJSON(HttpServletResponse response, Iterable<RecommendedItem> items) throws IOException {
134  
-    response.setContentType("text/plain");
  134
+    response.setContentType("application/json");
135 135
     response.setCharacterEncoding("UTF-8");
136 136
     response.setHeader("Cache-Control", "no-cache");
137 137
     PrintWriter writer = response.getWriter();

0 notes on commit 6131e18

Please sign in to comment.
Something went wrong with that request. Please try again.