tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
Date Sun, 24 Nov 2002 21:20:40 GMT
remm        2002/11/24 13:20:40

  Modified:    http11/src/java/org/apache/coyote/http11
                        Http11Processor.java
  Log:
  - Oops, I forgot to commit that as part of the remote host address
    lazy evaluation.
  
  Revision  Changes    Path
  1.44      +21 -7     jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Http11Processor.java	9 Nov 2002 17:12:17 -0000	1.43
  +++ Http11Processor.java	24 Nov 2002 21:20:39 -0000	1.44
  @@ -366,8 +366,7 @@
           throws IOException {
   
           // Set the remote address
  -        remoteAddr = socket.getInetAddress().getHostAddress();
  -        request.remoteAddr().setString(remoteAddr);
  +        remoteAddr = null;
           remoteHost = null;
   
           // Setting up the I/O
  @@ -564,13 +563,27 @@
               } catch (Exception e) {
                   log.warn("Exception getting SSL attributes " ,e);
               }
  +
  +        } else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) {
  +
  +            if (remoteAddr == null) {
  +                remoteAddr = socket.getInetAddress().getHostAddress();
  +                request.remoteAddr().setString(remoteAddr);
  +            }
  +
           } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE) {
  -            request.remoteAddr().setString(remoteAddr);
  -            if( remoteHost == null )
  +
  +            if (remoteAddr == null) {
  +                remoteAddr = socket.getInetAddress().getHostAddress();
  +                request.remoteAddr().setString(remoteAddr);
  +            }
  +            if (remoteHost == null) {
                   remoteHost = socket.getInetAddress().getHostName();
  -            request.remoteHost().setString(remoteHost);
  +                request.remoteHost().setString(remoteHost);
  +            }
  +
  +        } else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE) {
   
  -        } else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE ) {
               try {
                   Object sslO = sslSupport.getPeerCertificateChain(true);
                   if( sslO != null) {
  @@ -580,9 +593,10 @@
               } catch (Exception e) {
                   log.warn("Exception getting SSL Cert",e);
               }
  +
           }
  +
       }
  -            
   
   
       // ------------------------------------------------------ Connector Methods
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message