From 22a35047ecdffff80110e06cc08fc84f9ddba9b0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 13:21:31 +0000 Subject: removed from all files to fix any redirects, whew Mason handler.pl overrides CGI::redirect fixed strict; problems in edit/part_pkg.cgi & edit/process/part_pkg.cgi --- htetc/handler.pl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'htetc/handler.pl') diff --git a/htetc/handler.pl b/htetc/handler.pl index 37f2d3766..5544ebbe8 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -101,6 +101,24 @@ sub handler use FS::svc_www; use FS::type_pkgs; + *CGI::redirect = sub { + my( $self, $location ) = @_; + + #http://www.masonhq.com/docs/faq/#how_do_i_do_an_external_redirect + $m->clear_buffer; + # The next two lines are necessary to stop Apache from re-reading + # POSTed data. + $r->method('GET'); + $r->headers_in->unset('Content-length'); + $r->content_type('text/html'); + $r->err_header_out('Location' => $location); + $r->header_out('Content-Type' => 'text/html'); + $m->abort(302); + + ''; + + }; + $cgi = new CGI; &cgisuidsetup($cgi); #&cgisuidsetup($r); @@ -114,9 +132,8 @@ sub handler #$r->no_cache(1); $headers->{'Expires'} = '0'; - my $status = $ah->handle_request($r); - - return $status; + $ah->handle_request($r); + } 1; -- cgit v1.2.1