knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject knox git commit: KNOX-1391 - Fix IllegalStateException when accessing Admin UI
Date Thu, 19 Jul 2018 22:00:19 GMT
Repository: knox
Updated Branches:
  refs/heads/v1.1.0 6040e0050 -> 036569f30


KNOX-1391 - Fix IllegalStateException when accessing Admin UI


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

Branch: refs/heads/v1.1.0
Commit: 036569f309caff5e60a64857bdb29ed72c837649
Parents: 6040e00
Author: Sandeep More <more@apache.org>
Authored: Thu Jul 19 18:00:12 2018 -0400
Committer: Sandeep More <more@apache.org>
Committed: Thu Jul 19 18:00:12 2018 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/knox/gateway/GatewayServlet.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/036569f3/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServlet.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServlet.java b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServlet.java
index 055496d..21aa29b 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServlet.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServlet.java
@@ -168,8 +168,13 @@ public class GatewayServlet implements Servlet, Filter {
       if( f != null ) {
         try {
           f.doFilter( servletRequest, servletResponse );
-          //TODO: This should really happen naturally somehow as part of being a filter.
 This way will cause problems eventually.
-          chain.doFilter( servletRequest, servletResponse );
+
+          /* if response is committed in case of SSO redirect no need to apply further filters
*/
+          if(!servletResponse.isCommitted()) {
+            //TODO: This should really happen naturally somehow as part of being a filter.
 This way will cause problems eventually.
+            chain.doFilter( servletRequest, servletResponse );
+          }
+
         } catch( IOException e ) {
           LOG.failedToExecuteFilter( e );
           throw e;


Mime
View raw message