hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1079157 - in /hadoop/common/branches/yahoo-merge/src: java/org/apache/hadoop/http/HttpServer.java test/core/org/apache/hadoop/http/TestHttpServer.java
Date Tue, 08 Mar 2011 04:40:38 GMT
Author: omalley
Date: Tue Mar  8 04:40:38 2011
New Revision: 1079157

URL: http://svn.apache.org/viewvc?rev=1079157&view=rev
Log:
commit 079d1c4270ae6c652726b06956395df40b25ccf9
Author: Luke Lu <llu@yahoo-inc.com>
Date:   Thu Dec 23 18:46:39 2010 -0800

     Fix content type for /stacks servlet

Modified:
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/http/HttpServer.java
    hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/http/TestHttpServer.java

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/http/HttpServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/http/HttpServer.java?rev=1079157&r1=1079156&r2=1079157&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/http/HttpServer.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/http/HttpServer.java Tue
Mar  8 04:40:38 2011
@@ -406,7 +406,7 @@ public class HttpServer implements Filte
     for (Context ctx : defaultContexts.keySet()) {
       defineFilter(ctx, name, classname, parameters, ALL_URLS);
     }
-    LOG.info("Added global filter" + name + " (class=" + classname + ")");
+    LOG.info("Added global filter '" + name + "' (class=" + classname + ")");
   }
 
   /**
@@ -738,6 +738,7 @@ public class HttpServer implements Filte
           response)) {
         return;
       }
+      response.setContentType("text/plain; charset=utf-8");
 
       PrintWriter out = new PrintWriter
                     (HtmlQuoting.quoteOutputStream(response.getOutputStream()));

Modified: hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/http/TestHttpServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/http/TestHttpServer.java?rev=1079157&r1=1079156&r2=1079157&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/http/TestHttpServer.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/test/core/org/apache/hadoop/http/TestHttpServer.java
Tue Mar  8 04:40:38 2011
@@ -56,6 +56,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class TestHttpServer extends HttpServerFunctionalTest {
+  static final Log LOG = LogFactory.getLog(TestHttpServer.class);
   private static HttpServer server;
   private static URL baseUrl;
   private static final int MAX_THREADS = 10;
@@ -116,6 +117,7 @@ public class TestHttpServer extends Http
     server.addServlet("echomap", "/echomap", EchoMapServlet.class);
     server.start();
     baseUrl = getServerURL(server);
+    LOG.info("HTTP server started: "+ baseUrl);
   }
   
   @AfterClass public static void cleanup() throws Exception {
@@ -199,9 +201,6 @@ public class TestHttpServer extends Http
    * 
    */
   public static class DummyServletFilter implements Filter {
-
-    private static final Log LOG = LogFactory.getLog(
-        DummyServletFilter.class);
     @Override
     public void destroy() { }
 



Mime
View raw message