This should be simple, but it's turning out not to be.
First I used this code, which I got from a post at openacs.org (and
the poster got it from the AOLserver docs for ns_respond):
set headers [ns_set new myheaders]
ns_set put $headers location $url
ns_respond -status $return_code -type text/plain -string Redirect -
headers $headers
This worked as far as the redirect and status code are concerned, but
cookies were no longer functioning.
I noticed that ad_set_cookie (an openacs proc) adds a key called Set-
Cookie to the "ns_conn outputheaders" set, so I tried this, hoping to
capture all possible relevant values:
set headers [ad_conn headers]
set outputheaders [ad_conn outputheaders]
set allheaders [ns_set merge $headers $outputheaders]
ns_set idelkey $allheaders location
ns_set put $allheaders location $url
ns_respond -status $return_code -type text/plain -string Redirect -
headers $allheaders
No improvement; cookies still don't work. BTW, I tried it with both
ns_conn and ad_conn but they both give the exact same output, so same
end result.
Any suggestions on what I might be doing wrong here?
I know that the best way to fix this would be to create an
ns_returnmoved function in AOLserver, but I was trying to avoid
having any of our clients using a customized version.
Thanks for any suggestions,
janine
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.