httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Oppermann <lars.opperm...@germany.sun.com>
Subject Re: Incorrect behaviour in ap_get_server_port()?
Date Tue, 20 Feb 2001 09:08:29 GMT
Tony Finch wrote:
> 
> Lars Oppermann <lars.oppermann@germany.sun.com> wrote:
> >
> >Now, whenever a self-referencing, absolute URL is to be constructed, it
> >has to point to said application responsible for request distribution,
> >and not to the particular Apache server that generated the response
> >containing this URL. To achive this, we set the 'Host:' header in the
> >request sent from the distributing application to the Apache server
> >accordingly. This does indeed work for hostnames, but not for
> >Portnumbers (UseCanonicalName is turned off in Apache).
> 
> Gosh, this is becoming a *very* frequently asked question. I'm not
> sure where we can improve the documentation to make it clearer, though.
> 
> Use the "Listen" directive to configure the port that Apache listens
> on, and use the "Port" directive to configure the port that Apache
> uses to refer to itself.
> 

This is true, as long as the value for the 'Port' directive can be
determined before apache is started and is the same for all entrypoints
that relay requests to the apache server.

However I am of the opinion that the content of the Host header supplied
by the client should be used when UseCanonicalNames is turned off. I
don't think that the current behaviour of using the portnumber through
which the connection was made whenever a host header is present
(hostname in the request_rec is set) or else fall back to the value of
the Port directive is realy the right way to handle this.

What do you think?

Greetings,
Lars
-- 
----------------------------------------------------------------------
Lars Oppermann                                        Sun Microsystems
Software Engineer                                      Staroffice GmbH  
Phone: +49 40 23646 959                                  Sachsenfeld 4
Fax:   +49 40 23646 550                                D-20097 Hamburg
lars.oppermann@germany.sun.com           http://www.sun.com/staroffice
----------------------------------------------------------------------

Mime
View raw message