httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: UseCanonicalName considered harmful
Date Tue, 05 Feb 2002 21:07:11 GMT
(I'm hitting send too soon..)

As an example, consider a 'ServerName "MyServer" running on
localhost, and requesting the directory object

http://localhost:30000/foo

mod_dir will cause a redirect in order to pick up '/foo/'
instead, but if UseCanonicalName is set to 'On', the
redirect will actually be to:

http://MyServer/foo/

And if you look at the body that accompanies the 301 response,
it says at the bottom:

"Apache/2.0.32-dev Server at ServerName Port 80"

which is patently a lie, since the request didn't come in on
port 80 and the server isn't even listening there.

If UseCanonicalName is set to 'Off', the result will be

http://localhost:30000/foo/
"Apache/2.0.32-dev Server at localhost Port 30000"

So I feel our current UseCanonicalName options paint with
too wide a brush.  They either set both the hostname and
the port to canonical values, or neither.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

Mime
View raw message