tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 Tomcat3Request.java
Date Tue, 09 Apr 2002 20:22:41 GMT

----- Original Message -----
From: <costinm@covalent.net>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Tuesday, April 09, 2002 1:45 PM
Subject: Re: cvs commit:
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3
Tomcat3Request.java


> On Tue, 9 Apr 2002, Bill Barker wrote:
>
> > >   +
> > >   +        remoteAddrMB = coyoteRequest.remoteAddr();
> > >   + remoteHostMB = coyoteRequest.remoteHost();
> > >   + serverNameMB = coyoteRequest.serverName();
> > >   +
> > >   +
> >
> > This forces the lookup to always be per-request, when it would be much
nicer
> > to do it per-connection.
>
> This is done when the tomcat3 request is created  - and it only means
> that the buffers for storing the remoteHost and serverName are identical (
> we override the tomcat.Request fields with the MessageBytes from
> coyote.Request ). That avoids copying them.
>
> ( the request is recycled, but the fields remain )
>
> Unless I'm missing something.

These fields are recycled per-request, so we lose the value of
remoteHost/remoteAddr and will have to look it up again.  If the buffers are
identical, then the o.a.c.Request field is recycled as well. At least for
remoteHost, I'd prefer the copy.

>
> > >   +    public void setAttribute(String name, Object value) {
> > >   + coyoteRequest.setAttribute( name, value );
> > >   +    }
> > >   +
> > >   +    public Object getAttribute(String name) {
> > >   +        if (name == null) {
> > >   +            return null;
> > >   +        }
> > >   +        return coyoteRequest.getAttribute( name );
> > >   +    }
> > >   +
> >
> > Unless I'm missing something, this competely breaks SSL support, since
> > CoyoteInterceptor2.getInfo is never called.
>
> Yes, I'll fix it. Thanks !

I'd be +1 for making get/setAttribute final on the core Request.

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


--
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