Forum OpenACS Development: Response to rp_serve_abstract_file and PerformanceModeP

It can be so easy ... Don suggested on IRC to just remember the value of ad_conn file, call rp_serve_abstract_file and restore ad_conn file afterwards, so here is the first attempt at an ad_internal_redirect function:

https://openacs.org/sdm/one-patch.tcl?patch_id=328

I added the capability to enter relative paths by prepending the directory of ad_conn file when there is no / at the beginning of the path to redirect to.

It does not touch the page parameters, so everything passed to the first page will be preserved and you can use ad_page_contract in either one. Having an ad_form_put as Lars suggested above would still be nice though.

It seems to follow nested redirects, e.g. you can call ad_internal_redirect in a file you just redirected to. I tried a circular redirect which resulted in a server crash - not a big problem I guess, since you should never need more than one redirect in practice.