knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-439: URL pattern matching fails for default ports HTTP 80 and HTTPS 443
Date Fri, 10 Oct 2014 20:52:35 GMT
Repository: knox
Updated Branches:
  refs/heads/v0.5.0 809877e4e -> 5e6de495e


KNOX-439: URL pattern matching fails for default ports HTTP 80 and HTTPS 443

(cherry picked from commit b40aa7881697645ce9dca5f167ce12bfa91c4d59)


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

Branch: refs/heads/v0.5.0
Commit: 5e6de495eab6a6f169941de701a66ed6d2e8d9a4
Parents: 809877e
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Fri Oct 10 16:51:17 2014 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Fri Oct 10 16:52:19 2014 -0400

----------------------------------------------------------------------
 .../gateway/filter/rewrite/impl/UrlRewriteRequest.java | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/5e6de495/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRequest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRequest.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRequest.java
index cbe6806..e97d8e1 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRequest.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRequest.java
@@ -76,8 +76,17 @@ public class UrlRewriteRequest extends GatewayRequestWrapper implements
Resolver
   }
 
   private Template getSourceUrl() {
-    Template urlTemplate = null;
-    StringBuffer urlString = super.getRequestURL();
+    Template urlTemplate;
+    //KNOX-439[
+    //StringBuffer urlString = super.getRequestURL();
+    StringBuffer urlString = new StringBuffer( 128 );
+    urlString.append( getScheme() );
+    urlString.append( "://" );
+    urlString.append( getServerName() );
+    urlString.append( ":" );
+    urlString.append( getServerPort() );
+    urlString.append( super.getRequestURI() );
+    //]
     String queryString = super.getQueryString();
     if( queryString != null ) {
       urlString.append( '?' );


Mime
View raw message