httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [PATCH] PR#1049: name-based, multi-port servers don't work
Date Tue, 16 Sep 1997 20:31:30 GMT
I don't think the standard has anything to say about what to do when a
request comes in on port N but has a full-uri or Host: header listing port
M where M != N ... so we can do anything we want.  I'm not sure what's the
most sensible.  In the presence of the proxy it makes sense to trust the
physical socket port more than the string from the request -- especially
if the request is a proxy request. 

So I'd +1 a patch which changes it to:

    unsigned port = ntohs(r->connection.local_addr.sin_port);

and completely ignores the port that came with the request.

Dean

On Tue, 16 Sep 1997, Martin Kraemer wrote:

> On Tue, Sep 16, 1997 at 10:31:40AM -0700, Dean Gaudet wrote:
> 
> > But r->server->port may not be the port supplied in the URI.  And I seem
> > to recall us changing this from r->server->port to 80 ages ago ... and I
> > don't recall why.  I'll have to dig through the cvs history.
> 
> Of course. This routine's purpose is to _find_ the server. The initial
> setting of r->server is just a sensible default.
> 
> But how about using
>     unsigned port = ... ? ... : ntohs(r->connection.local_addr.sin_port);
> This would use the REAL port the request came in on. There are only few
> places in apache where it is used (check_default_server() uses it).
> 
>     Martin
> -- 
> | S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
> | ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
> | N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
> ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request
> 


Mime
View raw message