httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moon" <bri...@dealnews.com>
Subject Location header for redirects after directory requests is wrong.
Date Mon, 04 Jun 2001 19:32:51 GMT
I have a setup like:

<VirtualHost _default_>
  ServerName dev.dealnews.com
  ServerAlias *.dealnews.com
.
.
.
</VirutalHost>

In code we switch things based no HTTP_HOST.

However, if requests for directories are made like:

http://brian.dealnews.com/images

where images is a dir, Apache sends a 301 and a Location of:

http://dev.dealnews.com/images/

Is there a reason that this happens this way with the ServerName being used
instead of HTTP_HOST?  If someone can point me to the file that sets this I
will change it and submit a patch.  Does Apache 2 do this as well?

We have a development environment here where it matters what the HTTP_HOST
is.  It also bit us on some of our code that uses ServerName thinking it
would be the same.  That was our mistake.  I now know that they could not
be.

I have dug into the 1.3 code and can find many places like:

ap_table_get(r->headers_out, "Location");

This seems to get the Location out of something.  However I can not find the
place where this is built and put into the hash or whatever.

Brian Moon
------------------------------------------
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/



Mime
View raw message