httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: local redirects
Date Wed, 01 Nov 1995 13:12:42 GMT
 
> Rob, the way you trigger an internal redirect from a CGI script is
> (and always has been) to have the script write a location header
> *without* setting explicit Status --- the only point in setting
> Status is if you want the revised Status to get all the way back
> to the client.  Failing to perform a redirect *unless* status was
> changed (as you suggest) would break a whole lot of scripts, 
> including a bunch here.

I'm pretty sure I did the code for .0.6 which handled the Location:
line from scripts (and asis as a result). From what I remember 
(without going to the code for reference), seeing a "Location"
header changed the status of the response to 302 (unless that
had been overridden by an earlier Status line). Apache then only
looked if a "location" had been seen, then did a local redirect if
it started with a "/".

the result was that any script (+ asis) redirect would do a local
redirect if the destination was local.

Perhaps my memory is a blur on this. I'm too busy with other things
these days to check old and new code for differences.

What I've seen certainly took me be surprise and wasn't what I was
expecting or what I though looked correct.

What I think apache should be doing is..

  if a "Location:" header is seen (alone or with other headers), and the
destination starts with a "/", then do a local redirect to it... nothing
more elaborate than that.

The reason this is now an issue is that a user tried to do a local
redirect from an asis file, but couldn't.

I made an earlier error with my

print "Location: /Announce\r\n\r\n";

example. That does work. It was missing a trailing "/". Doh.

rob

Mime
View raw message