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 21:58:06 GMT
Repository: knox
Updated Branches:
  refs/heads/master 529854861 -> 4fdefcbbe


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/4fdefcbb
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/4fdefcbb
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/4fdefcbb

Branch: refs/heads/master
Commit: 4fdefcbbea9bbbe838fef9a718895729be6c21c9
Parents: 5298548
Author: Sandeep More <more@apache.org>
Authored: Thu Jul 19 17:58:01 2018 -0400
Committer: Sandeep More <more@apache.org>
Committed: Thu Jul 19 17:58:01 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/4fdefcbb/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