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 11:33:58 GMT

Andy sent me this snippit of code which is probably the cause of the
local redirects failing..

> mod_cgi.c, cgi_handler(), about line 310:
> 
> 	if (location && location[0] == '/' && r->status == 200) {
> 	...
> 		internal_redirect (location, r);
> 	}

The "&& r->status == 200" looks wrong at first glance. If Apache
follows the logic of the old .6.5 code then the status gets set
to 302 (or whatever number it is) when script headers are read
but no explicit status line is read. 

So shouldn't the check be for "301" or "302".

A 301 "moved permanently" makes little sense in terms of a local
redirect so, perhaphs it's just "302" that needs to be covered.

Change "200" to "302" ?

rob

Mime
View raw message