mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1143533 - /mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
Date Wed, 06 Jul 2011 19:03:45 GMT
Author: srowen
Date: Wed Jul  6 19:03:45 2011
New Revision: 1143533

URL: http://svn.apache.org/viewvc?rev=1143533&view=rev
Log:
MAHOUT-755 use application/* MIME types

Modified:
    mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java

Modified: mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
URL: http://svn.apache.org/viewvc/mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java?rev=1143533&r1=1143532&r2=1143533&view=diff
==============================================================================
--- mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
(original)
+++ mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/web/RecommenderServlet.java
Wed Jul  6 19:03:45 2011
@@ -115,7 +115,7 @@ public final class RecommenderServlet ex
   }
 
   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 @@ public final class RecommenderServlet ex
   }
 
   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();



Mime
View raw message