+ use FS::part_export;
+ use FS::part_export_option;
+ use FS::export_svc;
+ use FS::msgcat;
+
+ *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('Location' => $location);
+ $r->header_out('Content-Type' => 'text/html');
+ $m->abort(302);
+
+ '';
+ };