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/startup EmbededTomcat.java
Date Sat, 12 Aug 2000 02:43:52 GMT
costin      00/08/11 19:43:50

  Modified:    src/share/org/apache/tomcat/service/http Tag: tomcat_32
                        HttpConnectionHandler.java
               src/share/org/apache/tomcat/startup Tag: tomcat_32
                        EmbededTomcat.java
  Log:
  Small ( but important ) fix - allow the user to specify that a particular
  adapter is "secure".
  
  This will make isSecure() and getScheme()=="https" work.
  
  I think it's a decent solution - the admin is supposed to know when
  ssl is used.
  
  Sam - if you have any problem with this please let me know and I'll roll
  back. I think it's important to fix this.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.26.2.1  +15 -4     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.26
  retrieving revision 1.26.2.1
  diff -u -r1.26 -r1.26.2.1
  --- HttpConnectionHandler.java	2000/06/22 23:14:50	1.26
  +++ HttpConnectionHandler.java	2000/08/12 02:43:48	1.26.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java,v
1.26 2000/06/22 23:14:50 alex Exp $
  - * $Revision: 1.26 $
  - * $Date: 2000/06/22 23:14:50 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpConnectionHandler.java,v
1.26.2.1 2000/08/12 02:43:48 costin Exp $
  + * $Revision: 1.26.2.1 $
  + * $Date: 2000/08/12 02:43:48 $
    *
    * ====================================================================
    *
  @@ -76,7 +76,8 @@
   
   
   public class HttpConnectionHandler  implements  TcpConnectionHandler {
  -    
  +
  +    boolean secure=false;
       ContextManager contextM;
       
       public HttpConnectionHandler() {
  @@ -88,6 +89,10 @@
   	    contextM=(ContextManager)value;
   	}
       }
  +
  +    public void setSecure( boolean b ) {
  +	secure=b;
  +    }
       
       public void setServer( Object  contextM ) {
   	this.contextM=(ContextManager)contextM;
  @@ -191,6 +196,12 @@
   		sis.setLimit(contentLength);
   	    }
   
  +	    // If this connection handler was declared as "secure",
  +	    // mark this in the request
  +	    if( secure ) {
  +		reqA.setScheme( "https" );
  +	    }
  +	    
   	    contextM.service( reqA, resA );
   
   	    try {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.1  +3 -1      jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java
  
  Index: EmbededTomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java,v
  retrieving revision 1.13
  retrieving revision 1.13.2.1
  diff -u -r1.13 -r1.13.2.1
  --- EmbededTomcat.java	2000/07/01 00:43:29	1.13
  +++ EmbededTomcat.java	2000/08/12 02:43:50	1.13.2.1
  @@ -129,7 +129,9 @@
   	sc.setAttribute( "socketFactory",
   			 "org.apache.tomcat.net.SSLSocketFactory");
   	//	System.out.println("XXX " + keyFile + " " + keyPass);
  -	sc.setTcpConnectionHandler( new HttpConnectionHandler());
  +	HttpConnectionHandler ch=new HttpConnectionHandler();
  +	ch.setSecure(true);
  +	sc.setTcpConnectionHandler( ch );
   	// XXX add the secure socket
   	
   	contextM.addServerConnector(  sc );
  
  
  

Mime
View raw message