X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htetc%2Fhandler.pl;h=5544ebbe85296b35c2baef9e2266e97ea6b09e25;hp=37f2d37663f123ed171dcdd53bbbaba916d8640c;hb=22a35047ecdffff80110e06cc08fc84f9ddba9b0;hpb=b4bce0bf487b4ee3620e13f1fdf56ecc1d001a42 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;