costin      02/04/08 15:57:36

  Modified:    coyote/src/java/org/apache/coyote/tomcat3
                        Tomcat3Request.java
  Log:
  Pass the request for lazy attributes to the protocol.
  
  That's used for stuff that is not allways needed ( remote host ) and expensive
  to compute.
  
  Revision  Changes    Path
  1.3       +7 -10     
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java
  
  Index: Tomcat3Request.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Tomcat3Request.java       5 Apr 2002 22:17:49 -0000       1.2
  +++ Tomcat3Request.java       8 Apr 2002 22:57:36 -0000       1.3
  @@ -73,6 +73,7 @@
   import org.apache.tomcat.util.log.*;
   import org.apache.tomcat.util.compat.*;
   import org.apache.coyote.Adapter;
  +import org.apache.coyote.ActionCode;
   import org.apache.coyote.Processor;
   
   /** The Request to connect with Coyote.
  @@ -196,24 +197,20 @@
       // -------------------- override special methods
   
       public MessageBytes remoteAddr() {
  -
  -// XXX Call back the protocol layer - lazy evaluation.
  -//   if( remoteAddrMB.isNull() ) {
  -//       remoteAddrMB.setString(socket.getInetAddress().getHostAddress());
  -//   }
  +     if( remoteAddrMB.isNull() ) {
  +         coyoteRequest.action( ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest 
);
  +     }
        return remoteAddrMB;
       }
   
       public MessageBytes remoteHost() {
  -//   if( remoteHostMB.isNull() ) {
  -//       remoteHostMB.setString( socket.getInetAddress().getHostName() );
  -//   }
  +     if( remoteAddrMB.isNull() ) {
  +         coyoteRequest.action( ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest 
);
  +     }
        return remoteHostMB;
       }
   
       public String getLocalHost() {
  -//   InetAddress localAddress = socket.getLocalAddress();
  -//   localHost = localAddress.getHostName();
        return localHost;
       }
   
  
  
  

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

Reply via email to