Browse Source

HADOOP-13414. Hide Jetty Server version header in HTTP responses. Contributed by Surendra Singth Lilhore.

Vinayakumar B 8 years ago
parent
commit
1e8301b215

+ 1 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java

@@ -424,6 +424,7 @@ public final class HttpServer2 implements FilterContainer {
         : new QueuedThreadPool(maxThreads);
         : new QueuedThreadPool(maxThreads);
     threadPool.setDaemon(true);
     threadPool.setDaemon(true);
     webServer.setThreadPool(threadPool);
     webServer.setThreadPool(threadPool);
+    webServer.setSendServerVersion(false);
 
 
     SessionManager sm = webAppContext.getSessionHandler().getSessionManager();
     SessionManager sm = webAppContext.getSessionHandler().getSessionManager();
     if (sm instanceof AbstractSessionManager) {
     if (sm instanceof AbstractSessionManager) {