tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
Date Tue, 09 Apr 2002 19:41:03 GMT
> On Tue, 9 Apr 2002, Remy Maucherat wrote:
>
> > >   ( this used to be in the 3.3-specific code, and is needed to
construct
> > >   redirects, etc )
> > >   +            //The info from socket is usually acurate
> > >   +            // req.setServerPort(80);
> >
> > That's not good. If no host is specified with HTTP/1.1, we must default
to
> > the protocol default (as per the HTTP spec).
>
> The information on the socket is allways accurate - the default isn't.
> I mean, if the request was received on port 8000, that's what the socket
> will 'tell' us, and it's allways correct. Same for 80, 443, etc.
>
> It's true, for HTTP/1.1 with the currect host you'll allways have the
> port if it is not the standard one.
>
> But if the Host header is correct, it'll allways be the same thing as
> the getPort on socket - if it's https on standard port, the port will
> be 443 as the default, etc.

Even if the port in the host header isn't correct, we have to use it. Even
if the socket isn't 80, we also have to default to that. That's bug 6668.

> > The if HostMB == null implies HTTP/1.0 (with HTTP/1.1, the request
> > processing would be mostly over without a Host header, with a 400
response).
> > I've modified the patch to reflect this.
>
> So you don't fallback to HTTP/1.0 if a HTTP/1.0 request is
> received ? I thought that's required.

Yes, HTTP/1.0 (with old style keepalives; that's new in Coyote HTTP/1.1) and
HTTP/0.9 are supported.
When using HTTP/1.0, the host header will be null, so we'll be using that
code.
Is there anything wrong ?

Remy


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