You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by na...@locus.apache.org on 2000/05/30 01:59:27 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core RequestImpl.java

nacho       00/05/29 16:59:27

  Modified:    src/share/org/apache/tomcat/core RequestImpl.java
  Log:
  Fixed a bug in recycle method notes are not cleaned,
  and this makes security fails, all the request get the
  roles from the last request.
  
  Fixed
  
  Revision  Changes    Path
  1.44      +29 -28    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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- RequestImpl.java	2000/05/26 17:32:05	1.43
  +++ RequestImpl.java	2000/05/29 23:59:27	1.44
  @@ -596,11 +596,11 @@
   
       // -------------------- End utils
       public void recycle() {
  -	if( requestFacade != null && context!=null ) {
  -	    context.getFacadeManager().recycle(this);
  -	}
  +        if( requestFacade != null && context!=null ) {
  +            context.getFacadeManager().recycle(this);
  +        }
   
  -	context = null;
  +        context = null;
           attributes.clear();
           parameters.clear();
           cookies.removeAllElements();
  @@ -612,31 +612,32 @@
           authType = null;
           remoteUser = null;
           reqSessionId = null;
  -	serverSession = null;
  -	didParameters = false;
  -	didReadFormData = false;
  -	didCookies = false;
  -	container=null;
  -	handler=null;
  -	jvmRoute = null;
  -	scheme = "http";// no need to use Constants
  -	method = "GET";
  -	requestURI="/";
  -	queryString=null;
  -	protocol="HTTP/1.0";
  -	headers.clear(); // XXX use recycle pattern
  -	serverName=null;
  -	serverPort=8080;
  -	pathTranslated=null;
  -	pathInfo=null;
  -	pathTranslatedIsSet=false;
  +        serverSession = null;
  +        didParameters = false;
  +        didReadFormData = false;
  +        didCookies = false;
  +        container=null;
  +        handler=null;
  +        jvmRoute = null;
  +        scheme = "http";// no need to use Constants
  +        method = "GET";
  +        requestURI="/";
  +        queryString=null;
  +        protocol="HTTP/1.0";
  +        headers.clear(); // XXX use recycle pattern
  +        serverName=null;
  +        serverPort=8080;
  +        pathTranslated=null;
  +        pathInfo=null;
  +        pathTranslatedIsSet=false;
   
  -	// XXX a request need to override those if it cares
  -	// about security
  -	remoteAddr="127.0.0.1";
  -	remoteHost="localhost";
  -	localHost="localhost";
  -	for( int i=0; i<ACCOUNTS; i++ ) accTable[i]=0;
  +        // XXX a request need to override those if it cares
  +        // about security
  +        remoteAddr="127.0.0.1";
  +        remoteHost="localhost";
  +        localHost="localhost";
  +        for( int i=0; i<ACCOUNTS; i++ ) accTable[i]=0;
  +        for( int i=0; i<ContextManager.MAX_NOTES; i++ ) notes[i]=null;
       }
   
       public MimeHeaders getMimeHeaders() {