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/http11/src/java/org/apache/coyote/http11 Http11Processor.java
Date Thu, 11 Apr 2002 19:59:48 GMT

----- Original Message -----
From: <costinm@covalent.net>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Thursday, April 11, 2002 7:41 AM
Subject: Re: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
Http11Processor.java


> On Thu, 11 Apr 2002, Remy Maucherat wrote:
>
> > > > >   -- Degrade to the socket port on HTTP/1.0 requests with a
> > > > Host header
> > > > but no port number.
> > > > >
> > >
> > > if you are under a nat, dafaulting to the socket port maybe no
correct,
> > > you could have tomcat in 8080, and the request would be redirected
from
> > > a 80 port, so if a host header with no port is present the correct
> > > behavior should be to degrade to 80, without taking the socket port
into
> > > consideration, as the client can actually see it as 80.. so we must
obey
> > > the host header ever if present..
> >
> > That's what is done.
> >
> > In HTTP/1.0, there's no host header defined in the spec, so a client
using
> > and expecting it to work is non-compliant.
> > In HTTP/1.1, we always follow the host header, and ignore what the
socket
> > says, according to the spec.
>
> What we should do is respect the common practice ( the same as we do with
> the encoding - where almost all browsers are broken and we deal with
that ).
>
> From what I've seen, HTTP/1.0 browsers do send the port if it's not 80 -
> and don't if the port is the default. If a Host is present we should use
> the port number the same as in HTTP/1.1.
>

We do use the port number from the header, if the port is present. The
current code handles HTTP/1.0 clients much the same way as Http10Interceptor
does. Since the main HTTP/1.0 client that uses Tomcat is Watchdog,  I don't
really like enforcing the HTTP/1.1 behavior on HTTP/1.0 clients.

> 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