costin 01/04/09 23:26:15 Modified: src/share/org/apache/tomcat/core Request.java src/share/org/apache/tomcat/modules/aaa AccessInterceptor.java src/share/org/apache/tomcat/util/collections SimplePool.java Log: Fix form login with URL rewriting ( now seems to work fine ) Thanks Bojan Smojver <[EMAIL PROTECTED]> for finding the bug. Revision Changes Path 1.99 +1 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java Index: Request.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java,v retrieving revision 1.98 retrieving revision 1.99 diff -u -r1.98 -r1.99 --- Request.java 2001/03/08 18:42:32 1.98 +++ Request.java 2001/04/10 06:26:14 1.99 @@ -732,6 +732,7 @@ // -------------------- Sub requests -------------------- /** If this is a sub-request, return the parent + * ( the request embeding this request ) */ public Request getParent() { return parent; 1.9 +7 -5 jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java Index: AccessInterceptor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AccessInterceptor.java 2001/03/09 22:54:07 1.8 +++ AccessInterceptor.java 2001/04/10 06:26:15 1.9 @@ -457,8 +457,8 @@ Context ctx=req.getContext(); ServerSession session=req.getSession( false ); - if( session == null ) { - } + // we didn't had a session + boolean noSession= ( session==null ); String page=ctx.getFormLoginPage(); String errorPage=ctx.getFormErrorPage(); @@ -485,11 +485,13 @@ && !req.queryString().toString().equals("")) originalLocation += "?" + req.queryString().toString(); //XXX is needed to put the JVM route too? - if (req.getSessionIdSource().equals(Request.SESSIONID_FROM_URL)){ - String id=";jsessionid="+req.getSessionId() ; + if (noSession + || Request.SESSIONID_FROM_URL.equals(req.getSessionIdSource())) { + // If new session we have no way to know if cookies are supported + String id=";jsessionid="+req.getSessionId() ; originalLocation += id ; page += id ; - } + } session.setAttribute( "tomcat.auth.originalLocation", originalLocation); if( debug > 0 ) 1.4 +4 -4 jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimplePool.java Index: SimplePool.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimplePool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SimplePool.java 2001/03/23 02:25:32 1.3 +++ SimplePool.java 2001/04/10 06:26:15 1.4 @@ -1,8 +1,4 @@ /* - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimplePool.java,v 1.3 2001/03/23 02:25:32 costin Exp $ - * $Revision: 1.3 $ - * $Date: 2001/03/23 02:25:32 $ - * * ==================================================================== * * The Apache Software License, Version 1.1 @@ -157,6 +153,10 @@ return current+1; } + + public void shutdown() { + } + private void log( String s ) { System.out.println("SimplePool: " + s ); }