You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by gi...@apache.org on 2018/11/08 22:52:43 UTC
hadoop git commit: HADOOP-15903. Allow HttpServer2 to discover
resources in /static when symlinks are used. Contributed by Inigo Goiri.
Repository: hadoop
Updated Branches:
refs/heads/trunk 31614bcc7 -> 89b49167a
HADOOP-15903. Allow HttpServer2 to discover resources in /static when symlinks are used. Contributed by Inigo Goiri.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/89b49167
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/89b49167
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/89b49167
Branch: refs/heads/trunk
Commit: 89b49167a5a7b78cb25d2ee56ac011f344e9c9e4
Parents: 31614bc
Author: Giovanni Matteo Fumarola <gi...@apache.org>
Authored: Thu Nov 8 14:52:24 2018 -0800
Committer: Giovanni Matteo Fumarola <gi...@apache.org>
Committed: Thu Nov 8 14:52:24 2018 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/http/HttpServer2.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/89b49167/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
index a9c2319..598d3ee 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
@@ -84,6 +84,7 @@ import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SessionManager;
import org.eclipse.jetty.server.SslConnectionFactory;
+import org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.server.handler.RequestLogHandler;
@@ -725,6 +726,7 @@ public final class HttpServer2 implements FilterContainer {
asm.getSessionCookieConfig().setSecure(true);
}
logContext.setSessionHandler(handler);
+ logContext.addAliasCheck(new AllowSymLinkAliasChecker());
setContextAttributes(logContext, conf);
addNoCacheFilter(logContext);
defaultContexts.put(logContext, true);
@@ -747,6 +749,7 @@ public final class HttpServer2 implements FilterContainer {
asm.getSessionCookieConfig().setSecure(true);
}
staticContext.setSessionHandler(handler);
+ staticContext.addAliasCheck(new AllowSymLinkAliasChecker());
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org