summaryrefslogtreecommitdiff
path: root/htetc/handler.pl
diff options
context:
space:
mode:
authorivan <ivan>2002-02-10 13:21:31 +0000
committerivan <ivan>2002-02-10 13:21:31 +0000
commit22a35047ecdffff80110e06cc08fc84f9ddba9b0 (patch)
tree5a9db14bebc973ba6effb8407b08d10c33807bbe /htetc/handler.pl
parentb4bce0bf487b4ee3620e13f1fdf56ecc1d001a42 (diff)
removed <!-- $Id$ --> 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
Diffstat (limited to 'htetc/handler.pl')
-rw-r--r--htetc/handler.pl23
1 files changed, 20 insertions, 3 deletions
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;