X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=89140cac10ab70ab8abbe9e806b3cd5043328b15;hp=cb195a0596bac36f19f3b93f6bbb5bf77799bf7d;hb=4afceb55388ffa32d18c2b821fda11027540dce5;hpb=7118f8f027744b31c87444da0a47de3b1daa5da2 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 ) {