tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/service/http HttpConnectionHandler.java
Date Thu, 17 Feb 2000 23:37:52 GMT
costin      00/02/17 15:37:52

  Modified:    src/share/org/apache/tomcat/core ContextManager.java
               src/share/org/apache/tomcat/service TcpEndpoint.java
               src/share/org/apache/tomcat/service/http
                        HttpConnectionHandler.java
  Log:
  Few more cosmetic changes, added few debug lines.
  
  It seems we pass all but 3 watchdog tests ( and I'm not sure it's a problem
  with tomcat or with the tests).
  We have 6 tomcat-test bugs ( all related with error reporting ).
  
  We have some VM-specific problems, it some cases JDK1.2.2/Linux will hang
  up ( refuse to server connections ) - I'm unable to start the debuger,
  need a bit of time.
  We also have a 1.1.8 problem ( IBM vm/Linux ) - I don't know how the
  local address is read as 1.0.0.127 instead of localhost or at least
  127.0.0.1.
  
  Revision  Changes    Path
  1.48      +11 -9     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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ContextManager.java	2000/02/17 07:52:19	1.47
  +++ ContextManager.java	2000/02/17 23:37:47	1.48
  @@ -480,6 +480,7 @@
   	code duplication
       */
       public void service( Request rrequest, Response rresponse ) {
  +	//	log( "New  request " + rrequest );
   	try {
   	    rrequest.setContextManager( this );
   	    rrequest.setResponse(rresponse);
  @@ -502,13 +503,18 @@
   		// something went wrong
   		handleError( rrequest, rresponse, null, status );
   	    }
  -	    
  +	} catch (Throwable t) {
  +	    handleError( rrequest, rresponse, t, 0 );
  +	}
  +
  +	try {
   	    rresponse.finish();
   	    rrequest.recycle();
   	    rresponse.recycle();
  -	} catch (Throwable t) {
  -	    handleError( rrequest, rresponse, t, 0 );
  +	} catch( Throwable ex ) {
  +	    log( "Error closing request " + ex);
   	}
  +	//	log( "Done with request " + rrequest );
   	return;
       }
   
  @@ -559,14 +565,10 @@
       void handleError( Request req, Response res , Throwable t, int code ) {
   	Context ctx = req.getContext();
   	if(ctx==null) {
  -	    ///*DEBUG*/ try {throw new Exception(); } catch(Exception ex) {ex.printStackTrace();}
  +	    /// *DEBUG*/ try {throw new Exception(); } catch(Exception ex) {ex.printStackTrace();}
   	    ctx=getContext("");
   	}
  -
  -	if( code!=0) 
  -	    ctx.log("Status: " + code + " in " + req );
  -	if( t!=null) 
  -	    ctx.log("Exception: " + t.getMessage() + " in " + req );
  +	if(ctx.getDebug() > 0 ) ctx.log("In error handler " + code + " " + t +  " / " + req
);
   	
   	String path=null;
   	ServletWrapper errorServlet=null;
  
  
  
  1.9       +7 -4      jakarta-tomcat/src/share/org/apache/tomcat/service/TcpEndpoint.java
  
  Index: TcpEndpoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/TcpEndpoint.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TcpEndpoint.java	2000/02/17 10:37:42	1.8
  +++ TcpEndpoint.java	2000/02/17 23:37:49	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/TcpEndpoint.java,v
1.8 2000/02/17 10:37:42 shachor Exp $
  - * $Revision: 1.8 $
  - * $Date: 2000/02/17 10:37:42 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/TcpEndpoint.java,v
1.9 2000/02/17 23:37:49 costin Exp $
  + * $Revision: 1.9 $
  + * $Date: 2000/02/17 23:37:49 $
    *
    * ====================================================================
    *
  @@ -373,7 +373,9 @@
   
       public void run() {
   	    while(endpoint.running) {
  +		//		System.out.println("XXX accept socket");
   	        Socket s = endpoint.acceptSocket();
  +		//		System.out.println("XXX accepted " + s );
   	        if(null != s) {
   	            // Continue accepting on another thread...
   	            endpoint.tp.runIt(this);
  @@ -397,10 +399,11 @@
                       con.recycle();
                       connectionCache.addElement(con);
                   }
  -
  +		    //		System.out.println("XXX done " + s  );
                   break;
   	        }
   	    }
  +	    //	    System.out.println("End thread "   );
       }
   }
   
  
  
  
  1.13      +5 -8      jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java
  
  Index: HttpConnectionHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HttpConnectionHandler.java	2000/02/17 07:52:23	1.12
  +++ HttpConnectionHandler.java	2000/02/17 23:37:51	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java,v
1.12 2000/02/17 07:52:23 costin Exp $
  - * $Revision: 1.12 $
  - * $Date: 2000/02/17 07:52:23 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java,v
1.13 2000/02/17 23:37:51 costin Exp $
  + * $Revision: 1.13 $
  + * $Date: 2000/02/17 23:37:51 $
    *
    * ====================================================================
    *
  @@ -108,16 +108,14 @@
   	    socket=connection.getSocket();
   	    InputStream in=socket.getInputStream();
   	    OutputStream out=socket.getOutputStream();
  -	    //	    RequestImpl request=new RequestImpl();
  +
   	    HttpRequestAdapter reqA=new HttpRequestAdapter();
   	    reqA.setContextManager( contextM );
  -	    //	    ResponseImpl response=new ResponseImpl();
  +
   	    HttpResponseAdapter resA=new HttpResponseAdapter();
   	    
   	    resA.setRequest(reqA);
   	    reqA.setResponse( resA );
  -	    //	    request.setRequestAdapter( reqA );
  -	    //	    res.setResponseAdapter( resA );
   	    
   	    reqA.setSocket( socket );
   	    resA.setOutputStream( out );
  @@ -143,7 +141,6 @@
                }
       
   	    contextM.service( reqA, resA );
  -
   	    try {
                  InputStream is = socket.getInputStream();
                  int available = is.available ();
  
  
  

Mime
View raw message