httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chip Turner <>
Subject Re: Directory completion?
Date Tue, 01 Jan 2002 04:26:48 GMT
"William A. Rowe, Jr." <> writes:

> > Why not base the redirect on the incoming Host: header?  That should
> > work in most cases (certainly for the browser, also should work for
> > proxies in front).  This way users don't mysteriously hop servers and
> > such.  In cases where there is no Host, perhaps fallback to the vhost
> > ServerName.
>   You've just described an existing directive;
>     With  UseCanonicalName off  Apache will form
>     self-referential URLs using the hostname and port supplied by
>     the client if any are supplied (otherwise it will use the
>     canonical name). These values are the same that are used to
>     implement name based virtual hosts, and are available with the 
>     same clients. The CGI variables SERVER_NAME and SERVER_PORT
>     will be constructed from the client supplied values as well.

Seems like this would almost always be the preferred behavior, at
least for internally-generated self-referential URLs.  Maybe not
appropriate when passed to unknown code (such as CGI etc).

Validating ServerName/ServerAlias could be tough, especially in a
proxy setup and other peculiar situations.  It would certainly be nice
for the "general" case, but the behavior of "UseCanonicalName off"
would almost certainly generate correct results in the largest number
of cases.  Any particular reason it doesn't default to on, at least
for apache's own codepaths?  Is there something I'm missing that would
make that less desirable?


Chip Turner         
                              Red Hat Network

View raw message