Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 11885 invoked by uid 500); 29 Jun 2000 18:01:48 -0000 Delivered-To: apmail-jakarta-tomcat-cvs@apache.org Received: (qmail 11741 invoked by uid 1052); 29 Jun 2000 18:01:46 -0000 Date: 29 Jun 2000 18:01:46 -0000 Message-ID: <20000629180146.11714.qmail@locus.apache.org> From: costin@locus.apache.org To: jakarta-tomcat-cvs@apache.org Subject: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request AccessInterceptor.java SimpleMapper1.java costin 00/06/29 11:01:43 Modified: . build.xml src/examples/WEB-INF web.xml src/share/org/apache/tomcat/core RequestImpl.java src/share/org/apache/tomcat/request AccessInterceptor.java SimpleMapper1.java Log: Minor fixes: - added optimize flag - 80 col indentations :-) - don't include j2ee adapter in webserver.jar, make it a separate jar ( previous release of tomcat had it inside ) . - FORM login for examples - it seems to work fine ( it is a feature that we should support and is implemented ) - AccessInterceptor used to give bad warnings. We still detect pages starting with cpath and work around, plus warn about it ( pet store will be fixed, but other may have this problem ) - removed debug trace in mapper Revision Changes Path 1.52 +34 -8 jakarta-tomcat/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- build.xml 2000/06/26 18:01:26 1.51 +++ build.xml 2000/06/29 18:01:21 1.52 @@ -5,10 +5,12 @@ work --> - + + @@ -33,12 +35,14 @@ - + - + @@ -63,6 +67,7 @@ @@ -89,6 +94,7 @@ @@ -104,15 +110,18 @@ @@ -120,6 +129,7 @@ @@ -127,12 +137,13 @@ - + @@ -141,8 +152,13 @@ + basedir="${tomcat.build}/classes" > + + + + + + @@ -191,13 +207,23 @@ + + + + + + + + + - - + 1.10 +3 -3 jakarta-tomcat/src/examples/WEB-INF/web.xml Index: web.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/examples/WEB-INF/web.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- web.xml 2000/04/07 22:59:00 1.9 +++ web.xml 2000/06/29 18:01:27 1.10 @@ -80,25 +80,25 @@ + - 1.52 +1 -1 jakarta-tomcat/src/share/org/apache/tomcat/core/RequestImpl.java Index: RequestImpl.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestImpl.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- RequestImpl.java 2000/06/22 19:49:35 1.51 +++ RequestImpl.java 2000/06/29 18:01:30 1.52 @@ -386,7 +386,7 @@ String checkRoles[]=new String[1]; checkRoles[0]=role; int status=contextM.doAuthorize(this, response, checkRoles); - return status==200; + return status==0; } public String getServletPath() { 1.12 +10 -10 jakarta-tomcat/src/share/org/apache/tomcat/request/AccessInterceptor.java Index: AccessInterceptor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/AccessInterceptor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AccessInterceptor.java 2000/06/22 19:49:38 1.11 +++ AccessInterceptor.java 2000/06/29 18:01:35 1.12 @@ -152,20 +152,20 @@ String cpath=ctx.getPath(); // Workaround for common error - ctx path included - if( ! page.startsWith( cpath ) ) - page= cpath + page; - else - if( ! "/".equals(cpath)) + if( page.startsWith( cpath ) ) { + if( ! ("".equals(cpath) || "/".equals(cpath)) ) ctx.log("FORM: WARNING, login page starts with " + - "context path " + page); - + "context path " + page + " " + cpath ); + } else + page= cpath + page; - if( ! errorPage.startsWith( cpath ) ) - errorPage= cpath + errorPage; - else - if( ! "/".equals(cpath)) + + if( errorPage.startsWith( cpath ) ) { + if( ! ("/".equals(cpath) || "".equals( cpath )) ) ctx.log("FORM: WARNING, error page starts with " + "context path " + errorPage); + } else + errorPage= cpath + errorPage; // Adjust login and error paths - avoid computations in handlers ctx.setFormLoginPage( page ); 1.15 +2 -2 jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleMapper1.java Index: SimpleMapper1.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleMapper1.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- SimpleMapper1.java 2000/06/28 20:37:08 1.14 +++ SimpleMapper1.java 2000/06/29 18:01:36 1.15 @@ -402,8 +402,8 @@ // For exact matching - can't have path info ( or it's // a prefix map ) //path.substring( ctxPLen + sLen , pathLen); - /*DEBUG*/ try {throw new Exception(); } catch(Exception ex) {ex.printStackTrace();} - if( debug>0 ) log( "Adjust for path map " + s + " " + pathI + container.getPath()); + if( debug>0 ) log( "Adjust for path map " + + s + " " + pathI + container.getPath()); break; // keep the path case Container.EXTENSION_MAP: /* adjust paths */