knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject [1/2] knox git commit: KNOX-589 Fixing Jericho java.lang.IllegalStateException (Jeffrey E Rodriguez via Sumit Gupta)
Date Wed, 27 Jan 2016 15:58:36 GMT
Repository: knox
Updated Branches:
  refs/heads/master 2c18dd898 -> b036065f7


KNOX-589 Fixing Jericho java.lang.IllegalStateException (Jeffrey E Rodriguez via Sumit Gupta)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/e4a844a7
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/e4a844a7
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/e4a844a7

Branch: refs/heads/master
Commit: e4a844a7c3a78c2e35e20582a288eb04f9507083
Parents: aba0f0b
Author: Sumit Gupta <sumit@apache.org>
Authored: Wed Jan 27 10:56:45 2016 -0500
Committer: Sumit Gupta <sumit@apache.org>
Committed: Wed Jan 27 10:56:45 2016 -0500

----------------------------------------------------------------------
 .../filter/rewrite/impl/html/HtmlFilterReaderBase.java        | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/e4a844a7/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
index ee34530..6a7071f 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
@@ -39,18 +39,14 @@ import javax.xml.parsers.ParserConfigurationException;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringWriter;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 import java.util.regex.Pattern;
 
 public abstract class HtmlFilterReaderBase extends Reader implements UrlRewriteFilterReader
{
 
-  private static List<String> JSTYPES = Arrays.asList( new String[] { "application/javascript",
"text/javascript", "*/javascript",
-      "application/x-javascript", "text/x-javascript", "*/x-javascript" } );
   private static final String SCRIPTTAG = "script";
   private static final UrlRewriteFilterPathDescriptor.Compiler<Pattern> REGEX_COMPILER
= new RegexCompiler();
 
@@ -199,9 +195,8 @@ public abstract class HtmlFilterReaderBase extends Reader implements UrlRewriteF
         // This can happen for whitespace outside of the root element.
         //outputValue = filterText( null, inputValue );
       } else {
-        String tagType = stack.peek().getTag().getAttributeValue("type");
         String tagName = stack.peek().getTag().getName();
-        if (SCRIPTTAG.equals(tagName) && JSTYPES.contains(tagType) && config
!= null && !config.getSelectors().isEmpty() ) {
+        if (SCRIPTTAG.equals(tagName) && config != null && !config.getSelectors().isEmpty()
) {
           // embedded javascript content
           outputValue = UrlRewriteUtil.filterJavaScript( inputValue, config, this, REGEX_COMPILER
);
         } else {


Mime
View raw message