----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to