This could well be me being as thick as a whale
omlette but after doing a quick search on Google with
obvious strings "axkit-users returning status codes"
and such like, I couldn't find any help.
The problem is returning status codes, in particular
REDIRECT, from my own package. Doing it within my XSP
file is no problem but I want to keep code out of
there.
So, I have ....
MyXSP -> MyPackage1 -> MyPackage2
The following snippet is in MyPackage1
....
redirect( "new_location" );
return REDIRECT;
and the called function is in MyPackage2
sub redirect($){
my $location = shift;
my $r = Apache->request();
$r->header_out( Location => HOST . "/" . $location
);
return REDIRECT; #HTTP_MOVED_TEMPORARILY;
}
Right, what happens is, if I leave the "return
REDIRECT" from MyPackage1, the program continues when
"sub redirect()" returns. If I leave the "return
REDIRECT" in MyPackage1, then I get 302 appearing in
my XML as shown with the trace
<?xml version="1.0" encoding="UTF-8"?>
<main_page>302</main_page>
How do I perform a successful REDIRECT in my code.
If this is obvious, don't flame me.
TIA -Ants
___________________________________________________________ALL-NEW Yahoo!
Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]