Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.92 -r1.93 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 22 Mar 2008 18:31:32 -0000 1.92 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 7 Jun 2008 20:28:58 -0000 1.93 @@ -812,6 +812,20 @@ the server. } { + + # DRB: Fix obscure case where we are served a request like GET http://www.google.com. + # In this case AOLserver 4.0.10 (at least) doesn't run the preauth filter "rp_filter", + # but rather tries to serve /global/file-not-found directly. rp_handler dies a horrible + # death if it's called without ad_conn being set up. My fix is to simply redirect + # to the url AOLserver substitutes if ad_conn does not exist (rp_filter begins with + # ad_conn -reset) ... + + global ad_conn + if { ![info exists ad_conn] } { + ad_returnredirect [ns_conn url] + return + } + # JCD: keep track of rp_handler call count to prevent dev support from recording # information twice when for example we get a 404 internal redirect. We should probably set recursion_count [ad_conn recursion_count]