nacho 00/11/06 07:16:33 Modified: src/share/org/apache/tomcat/core ContextManager.java Handler.java Request.java Log: Various problems: * getting the servername for redirections * calling Context interceptors * A error loop when reload it's hit many times. Revision Changes Path 1.147 +5 -5 jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java Index: ContextManager.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v retrieving revision 1.146 retrieving revision 1.147 diff -u -r1.146 -r1.147 --- ContextManager.java 2000/11/02 21:35:30 1.146 +++ ContextManager.java 2000/11/06 15:16:30 1.147 @@ -379,7 +379,7 @@ * added before init() and those added by interceptors in * engineInit hook ). * - * It is possible to add and init contexts later. + * It is possible to add and init contexts later. * * Note that addContext() is called each time a context is added, * and that can be _before_ tomcat is initialized. @@ -429,7 +429,7 @@ * It must be called after init. */ public final void start() throws TomcatException { - + Enumeration enum = getContexts(); while (enum.hasMoreElements()) { Context ctx = (Context)enum.nextElement(); @@ -633,8 +633,8 @@ String roles[]=req.getRequiredRoles(); if(roles != null ) { status=0; - BaseInterceptor reqI[]= req.getContainer(). - getInterceptors(Container.H_authorize); + BaseInterceptor reqI[]= req.getContext().getContainer(). + getInterceptors(Container.H_authorize); // Call all authorization callbacks. for( int i=0; i< reqI.length; i++ ) { @@ -947,5 +947,5 @@ System.setProperty(RANDOM_CLASS_PROPERTY, randomClass); } - + } 1.21 +2 -2 jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java Index: Handler.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Handler.java 2000/11/02 21:44:37 1.20 +++ Handler.java 2000/11/06 15:16:30 1.21 @@ -319,14 +319,14 @@ reqI[i].preService( req, res ); } } - + Throwable t=null; try { doService( req, res ); } catch( Throwable t1 ) { t=t1; } - + // continue with the postService if( ! internal ) { for( int i=0; i< reqI.length; i++ ) { 1.71 +5 -5 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.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- Request.java 2000/11/02 21:39:12 1.70 +++ Request.java 2000/11/06 15:16:31 1.71 @@ -442,8 +442,8 @@ // Call all authentication callbacks. If any of them is able to // identify the user it will set the principal in req. int status=0; - BaseInterceptor reqI[]= getContainer(). - getInterceptors(Container.H_authenticate); + BaseInterceptor reqI[]= getContext().getContainer().getInterceptors(Container.H_authenticate); + //.getInterceptors(this,); for( int i=0; i< reqI.length; i++ ) { status=reqI[i].authenticate( this, response ); if ( status != 0 ) { @@ -798,14 +798,14 @@ serverName=hostHeader; return serverName; } - if( localHost != null ) { serverName = localHost; return serverName; } // default to localhost - and warn // log("No server name, defaulting to localhost"); - serverName="localhost"; + localHost=getLocalHost(); + serverName=localHost; return serverName; } @@ -925,7 +925,7 @@ protoMB.setString("HTTP/1.0"); remoteAddr="127.0.0.1"; remoteHost="localhost"; - localHost="localhost"; +// localHost="localhost"; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]