X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=89140cac10ab70ab8abbe9e806b3cd5043328b15;hb=cdcb49048123ab536a9ae1dcba2e5d31d0159b0d;hp=cb195a0596bac36f19f3b93f6bbb5bf77799bf7d;hpb=2d2ba7d543ab88f52a245a8f274950f443c7c3df;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index cb195a059..89140cac1 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -471,15 +471,19 @@ if ( -e $addl_handler_use_file ) { no warnings 'redefine'; *CGI::redirect = sub { my $self = shift; - my $cookie = ''; - if ( $_[0] eq '-cookie' ) { #this isn't actually used at the moment - (my $x, $cookie) = (shift, shift); - $HTML::Mason::r->err_headers_out->add( 'Set-cookie' => $cookie ); - } - my $location = shift; use vars qw($m); + my $location = ''; + if ( $_[0] =~ /^-/ ) { + my %opt = @_; + $location = $opt{'-uri'}; + my $cookie = $opt{'-cookie'}; + $m->apache_req->err_headers_out->{'Set-cookie'} = $cookie if $cookie; + } else { + $location = shift; + } + # false laziness w/below if ( @DBIx::Profile::ISA ) {