Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tapestry-5
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/IgnoredPathsFilter.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/IgnoredPathsFilter.java
index b356092..862b9b8 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/IgnoredPathsFilter.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/IgnoredPathsFilter.java
@@ -27,6 +27,9 @@
{
private final Pattern[] ignoredPatterns;
+ // if there are no ignore patterns, just pass every request to the next item in the pipeline
+ private final boolean passThrough;
+
public IgnoredPathsFilter(Collection<String> configuration)
{
ignoredPatterns = new Pattern[configuration.size()];
@@ -39,6 +42,7 @@
ignoredPatterns[i++] = p;
}
+ passThrough = ignoredPatterns.length == 0;
}
public boolean service(HttpServletRequest request, HttpServletResponse response, HttpServletRequestHandler handler)
@@ -46,15 +50,18 @@
{
// The servlet path should be "/", and path info is everything after that.
- String path = request.getServletPath();
- String pathInfo = request.getPathInfo();
-
- if (pathInfo != null) path += pathInfo;
-
-
- for (Pattern p : ignoredPatterns)
+ if (!passThrough)
{
- if (p.matcher(path).matches()) return false;
+ String path = request.getServletPath();
+ String pathInfo = request.getPathInfo();
+
+ if (pathInfo != null) path += pathInfo;
+
+
+ for (Pattern p : ignoredPatterns)
+ {
+ if (p.matcher(path).matches()) return false;
+ }
}
// Not a match, so let it go.
diff --git a/tapestry-webresources/build.gradle b/tapestry-webresources/build.gradle
index 235e632..28b6466 100644
--- a/tapestry-webresources/build.gradle
+++ b/tapestry-webresources/build.gradle
@@ -3,7 +3,7 @@
dependencies {
compile project(":tapestry-core")
compile "com.github.sommeri:less4j:1.12.0"
- compile "com.google.javascript:closure-compiler:v20170218"
+ compile "com.google.javascript:closure-compiler-unshaded:v20170218"
compile "org.mozilla:rhino:1.7.7.1"
testCompile project(":tapestry-runner")