httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject redirection revisited
Date Mon, 03 Apr 1995 18:14:34 GMT

Hi y'all,


I've been playing with redirection today, I extended the
custom error responses code to work with a common or garden
variety of redirect, so that the new "REDIRECT_" prefixed
cgi-var 'extensions' are available after a redirect.

Also, while I was doing this I fixed,

 1) a die() redirect after an AUTH REQ will always return a 401 status,
     so you can have a beautiful html file to explain how to register,
     'cos it'll come back with a 401 instead of a 200 status.

 2) all redirects, whether explicit or after a die() will log both
     the original URL and the new one,
     e.g.

ooo.lanl.gov - - [03/A .. ] "GET /cgi-bin/loc?weeeeeee HTTP/1.0" 302 0
ooo.lanl.gov - - [03/A .. ] "GET /cgi-bin/tester" 200 1506


{/cgi-bin/loc redirects to /cgi-bin/tester}

and

ooo.lanl.gov - - [03/A .. ] "GET /cgi-bin/crach?bleah HTTP/1.0" 500 0
ooo.lanl.gov - - [03/A .. ] "GET /try.html" 200 1148


{/cgi-bin/crach?bleah is a buggy script, with ErrorDocument 500 pointing to
/try.html}


You don't deserve it, but I also introduced a new variable "REDIRECT_STATUS"
which will let scripts now why the redirect happened. e.g. if it is
set to 500, then we know that REDIRECT_URL exploded on us. So you can
now write a general purpose problem reporter/analyzer.

A cleaned up patch will be uploaded to hyperreal tomorrow, assuming
nobody has a problem with the above.


robh

Mime
View raw message