costin      01/02/26 18:47:39

  Modified:    src/share/org/apache/tomcat/core Request.java
  Log:
  2 more fields converted to MessageBytes ( Ajp13 is setting them
  on every request - they were implemented as callbacks in standalone
  so the change was not absolutely needed - and it got postponed ).
  
  Revision  Changes    Path
  1.92      +14 -20    jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java
  
  Index: Request.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- Request.java      2001/02/20 03:17:56     1.91
  +++ Request.java      2001/02/27 02:47:39     1.92
  @@ -109,8 +109,8 @@
       // -------------------- properties --------------------
   
       protected int serverPort;
  -    protected String remoteAddr;
  -    protected String remoteHost;
  +    //    protected String remoteAddr;
  +    //    protected String remoteHost;
       protected String localHost;
   
       protected int state;
  @@ -130,6 +130,10 @@
       protected MessageBytes servletPathMB=new MessageBytes();
       protected MessageBytes pathInfoMB=new MessageBytes();
   
  +    // remote address/host
  +    protected MessageBytes remoteAddrMB=new MessageBytes();
  +    protected MessageBytes remoteHostMB=new MessageBytes();
  +    
       // GS, used by the load balancing layer in the Web Servers
       // jvmRoute == the name of the JVM inside the plugin.
       protected String jvmRoute;
  @@ -139,7 +143,6 @@
   
       // Processed information ( redundant ! )
       protected Parameters params=new Parameters();
  -    //    protected Hashtable parametersH = new Hashtable();
       protected boolean didReadFormData=false;
   
       protected int contentLength = -1;
  @@ -177,9 +180,6 @@
       Container container;
   
       Cookies scookies;
  -    //    ServerCookie scookies[]=new ServerCookie[4];
  -    // -1 = cookies not processed yet
  -    //    int cookieCount=-1;
   
       // sub-request support 
       Request top;
  @@ -300,21 +300,13 @@
       public void setServerPort(int serverPort ) {
        this.serverPort=serverPort;
       }
  -
  -    public String getRemoteAddr() {
  -        return remoteAddr;
  -    }
  -
  -    public void setRemoteAddr( String remoteAddr ) {
  -     this.remoteAddr=remoteAddr;
  -    }
   
  -    public String getRemoteHost() {
  -     return remoteHost;
  +    public MessageBytes remoteAddr() {
  +     return remoteAddrMB;
       }
   
  -    public void setRemoteHost(String remoteHost) {
  -     this.remoteHost=remoteHost;
  +    public MessageBytes remoteHost() {
  +     return remoteHostMB;
       }
   
       public String getLocalHost() {
  @@ -873,6 +865,8 @@
        queryMB.recycle();
        methodMB.recycle();
        protoMB.recycle();
  +     remoteAddrMB.recycle();
  +     remoteHostMB.recycle();
   
        // XXX Do we need such defaults ?
           schemeMB.setString("http");
  @@ -880,7 +874,7 @@
           uriMB.setString("/");
           queryMB.setString("");
           protoMB.setString("HTTP/1.0");
  -        remoteAddr="127.0.0.1";
  -        remoteHost="localhost";
  +        remoteAddrMB.setString("127.0.0.1");
  +        remoteHostMB.setString("localhost");
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to