costin      02/04/08 16:49:18

  Modified:    http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Set the SSLSupport and socket into the processor, so it can use them in the
  hook
  
  Revision  Changes    Path
  1.4       +12 -30    
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Http11Protocol.java       7 Apr 2002 21:11:33 -0000       1.3
  +++ Http11Protocol.java       8 Apr 2002 23:49:18 -0000       1.4
  @@ -147,7 +147,7 @@
       
       // -------------------- Properties--------------------
       protected PoolTcpEndpoint ep=new PoolTcpEndpoint();
  -    boolean secure;
  +    protected boolean secure;
       
       protected ServerSocketFactory socketFactory;
       protected SSLImplementation sslImplementation;
  @@ -299,9 +299,9 @@
   
           public void processConnection(TcpConnection connection, Object thData[]) {
               Socket socket=null;
  -            Processor  processor=null;
  +            Http11Processor  processor=null;
               try {
  -                processor=(Processor)thData[1];
  +                processor=(Http11Processor)thData[1];
                   
                   if (processor instanceof ActionHook) {
                       ((ActionHook) processor).action(ActionCode.ACTION_START, null);
  @@ -312,35 +312,17 @@
                   InputStream in = socket.getInputStream();
                   OutputStream out = socket.getOutputStream();
   
  -                // XXX Should be a request note
  -                //reqA.setSocket(socket);
  -                //if( secure ) {
  -                // Load up the SSLSupport class
  -                //   if(sslImplementation != null)
  -             //sslSupport = sslImplementation.getSSLSupport(socket);
  -                // }
  -
  -                //                 boolean secure=false;
  -                //                 SSLImplementation sslImplementation=null;
  -                //                 SSLSupport sslSupport=null;
  -                
  -                //                 if( secure ) {
  -                //                     reqA.scheme().setString( "https" );
  -                
  -                //                     // Load up the SSLSupport class
  -                //                     if(sslImplementation != null)
  -                //                         reqA.setSSLSupport(sslSupport);
  -                //                 }
  -
  +                if( proto.secure ) {
  +                    SSLSupport sslSupport=null;
  +                    if(proto.sslImplementation != null)
  +                        sslSupport = proto.sslImplementation.getSSLSupport(socket);
  +                    processor.setSSLSupport(sslSupport);
  +                } else {
  +                    processor.setSSLSupport( null );
  +                }
  +                processor.setSocket( socket );
                   
                   processor.process(in, out);
  -                
  -                // Recycle reqA notes
  -                //                 secure = false;
  -                //                 sslImplementation=null;
  -                //                 sslSupport=null;
  -
  -
                   
                   // If unread input arrives after the shutdownInput() call
                   // below and before or during the socket.close(), an error
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to