hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1564927 - in /hbase/trunk/hbase-server/src: main/java/org/apache/hadoop/hbase/rest/RESTServer.java main/java/org/apache/hadoop/hbase/util/InfoServer.java test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
Date Wed, 05 Feb 2014 21:11:30 GMT
Author: stack
Date: Wed Feb  5 21:11:30 2014
New Revision: 1564927

URL: http://svn.apache.org/r1564927
Log:
HBASE-10473 Add utility for adorning http Context

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java?rev=1564927&r1=1564926&r2=1564927&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java Wed
Feb  5 21:11:30 2014
@@ -35,9 +35,8 @@ import org.apache.hadoop.classification.
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.rest.filter.AuthFilter;
-import org.apache.hadoop.hbase.rest.filter.GzipFilter;
-import org.apache.hadoop.hbase.security.User;
 import org.apache.hadoop.hbase.security.UserProvider;
+import org.apache.hadoop.hbase.util.HttpServerUtil;
 import org.apache.hadoop.hbase.util.InfoServer;
 import org.apache.hadoop.hbase.util.Strings;
 import org.apache.hadoop.hbase.util.VersionInfo;
@@ -235,6 +234,7 @@ public class RESTServer implements Const
       filter = filter.trim();
       context.addFilter(Class.forName(filter), "/*", 0);
     }
+    HttpServerUtil.constrainHttpMethods(context);
 
     // Put up info server.
     int port = conf.getInt("hbase.rest.info.port", 8085);

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java?rev=1564927&r1=1564926&r2=1564927&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java Wed
Feb  5 21:11:30 2014
@@ -89,6 +89,7 @@ public class InfoServer extends HttpServ
           logsContextPath);
       logContext.setResourceBase(logDir);
       logContext.addServlet(DefaultServlet.class, "/");
+      HttpServerUtil.constrainHttpMethods(logContext);
       defaultContexts.put(logContext, true);
     }
   }

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java?rev=1564927&r1=1564926&r2=1564927&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
Wed Feb  5 21:11:30 2014
@@ -22,8 +22,8 @@ import org.apache.commons.lang.ArrayUtil
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.rest.filter.GzipFilter;
 import org.apache.hadoop.hbase.security.User;
+import org.apache.hadoop.hbase.util.HttpServerUtil;
 import org.apache.hadoop.util.StringUtils;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.servlet.Context;
@@ -75,6 +75,7 @@ public class HBaseRESTTestingUtility {
       filter = filter.trim();
       context.addFilter(Class.forName(filter), "/*", 0);
     }
+    HttpServerUtil.constrainHttpMethods(context);
     LOG.info("Loaded filter classes :" + filterClasses);
       // start the server
     server.start();



Mime
View raw message