knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject knox git commit: [KNOX-685] - Knox tests cleanup after Jetty 9 upgrade. Potential charset reencoding fix (KNOX-678).
Date Thu, 10 Mar 2016 03:28:12 GMT
Repository: knox
Updated Branches:
  refs/heads/master 933b73e77 -> d98a80f2e


[KNOX-685] - Knox tests cleanup after Jetty 9 upgrade. Potential charset reencoding fix (KNOX-678).


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

Branch: refs/heads/master
Commit: d98a80f2e8d4589e316cb9c01278c0377ee0dc6d
Parents: 933b73e
Author: Kevin Minder <kminder@apache.org>
Authored: Wed Mar 9 22:28:05 2016 -0500
Committer: Kevin Minder <kminder@apache.org>
Committed: Wed Mar 9 22:28:05 2016 -0500

----------------------------------------------------------------------
 .../filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java   | 2 +-
 .../filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java   | 2 +-
 .../impl/javascript/JavaScriptUrlRewriteStreamFilter.java      | 2 +-
 .../filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java   | 2 +-
 .../filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java     | 2 +-
 .../java/org/apache/hadoop/gateway/SpiGatewayMessages.java     | 6 ++++++
 .../org/apache/hadoop/gateway/dispatch/DefaultDispatch.java    | 5 +++++
 7 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java
index bc0402b..35f8318 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/form/FormUrlRewriteStreamFilter.java
@@ -53,7 +53,7 @@ public class FormUrlRewriteStreamFilter implements UrlRewriteStreamFilter
{
           throws IOException {
     return new ReaderInputStream(
         new FormUrlRewriteFilterReader(
-            new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
) );
+            new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
), encoding );
   }
 
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java
index 60b3f9e..b51a328 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlUrlRewriteStreamFilter.java
@@ -55,7 +55,7 @@ public class HtmlUrlRewriteStreamFilter implements UrlRewriteStreamFilter
{
     try {
       return new ReaderInputStream(
           new HtmlUrlRewriteFilterReader(
-              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
) );
+              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
), encoding );
     } catch( ParserConfigurationException e ) {
       throw new IOException( e );
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptUrlRewriteStreamFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptUrlRewriteStreamFilter.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptUrlRewriteStreamFilter.java
index 0259649..d8865f4 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptUrlRewriteStreamFilter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptUrlRewriteStreamFilter.java
@@ -55,7 +55,7 @@ public class JavaScriptUrlRewriteStreamFilter implements UrlRewriteStreamFilter
     if ( config != null ) {
       return new ReaderInputStream(
           new JavaScriptUrlRewriteFilterReader(
-              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
) );
+              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
), encoding );
     } else {
       return stream;
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java
index 7f71f56..9599f40 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/json/JsonUrlRewriteStreamFilter.java
@@ -53,7 +53,7 @@ public class JsonUrlRewriteStreamFilter implements UrlRewriteStreamFilter
{
           throws IOException {
     return new ReaderInputStream(
         new JsonUrlRewriteFilterReader(
-            new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
) );
+            new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
), encoding );
   }
 
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java
index 66bbadd..d1c693e 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlUrlRewriteStreamFilter.java
@@ -56,7 +56,7 @@ public class XmlUrlRewriteStreamFilter implements UrlRewriteStreamFilter
{
     try {
       return new ReaderInputStream(
           new XmlUrlRewriteFilterReader(
-              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
) );
+              new InputStreamReader( stream, encoding ), rewriter, resolver, direction, config
), encoding );
     } catch( ParserConfigurationException e ) {
       throw new IOException( e );
     } catch( XMLStreamException e ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-spi/src/main/java/org/apache/hadoop/gateway/SpiGatewayMessages.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/SpiGatewayMessages.java b/gateway-spi/src/main/java/org/apache/hadoop/gateway/SpiGatewayMessages.java
index 4c760cb..ff80714 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/SpiGatewayMessages.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/SpiGatewayMessages.java
@@ -61,4 +61,10 @@ public interface SpiGatewayMessages {
 
   @Message( level = MessageLevel.DEBUG, text = "Using explicit character set {1} for entity
of type {0}" )
   void usingExplicitCharsetForEntity( String mimeType, Charset charset );
+
+  @Message( level = MessageLevel.DEBUG, text = "Inbound response entity content type not
provided." )
+  void unknownResponseEntityContentType();
+
+  @Message( level = MessageLevel.DEBUG, text = "Inbound response entity content type: {0}"
)
+  void inboundResponseEntityContentType( String fullContentType );
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/d98a80f2/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
index 6a7e6d8..acd8ef7 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultDispatch.java
@@ -197,6 +197,11 @@ public class DefaultDispatch extends AbstractGatewayDispatch {
         fullContentType = entityContentType.toString();
       }
     }
+    if( fullContentType == null ) {
+      LOG.unknownResponseEntityContentType();
+    } else {
+      LOG.inboundResponseEntityContentType( fullContentType );
+    }
     return fullContentType;
   }
 


Mime
View raw message