summaryrefslogtreecommitdiff
path: root/rt/bin/mason_handler.fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'rt/bin/mason_handler.fcgi')
-rwxr-xr-xrt/bin/mason_handler.fcgi24
1 files changed, 5 insertions, 19 deletions
diff --git a/rt/bin/mason_handler.fcgi b/rt/bin/mason_handler.fcgi
index 93d1f8855..431eccbd3 100755
--- a/rt/bin/mason_handler.fcgi
+++ b/rt/bin/mason_handler.fcgi
@@ -27,7 +27,7 @@ use strict;
use File::Basename;
require ('/opt/rt3/bin/webmux.pl');
-my $h = &RT::Interface::Web::NewCGIHandler(@RT::MasonParameters);
+my $h = &RT::Interface::Web::NewCGIHandler();
# Enter CGI::Fast mode, which should also work as a vanilla CGI script.
require CGI::Fast;
@@ -44,25 +44,11 @@ while ( my $cgi = CGI::Fast->new ) {
$ENV{'ENV'} = '' if defined $ENV{'ENV'};
$ENV{'IFS'} = '' if defined $ENV{'IFS'};
- RT::ConnectToDatabase();
-
- if ( ( !$h->interp->comp_exists( $cgi->path_info ) )
- && ( $h->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
- $cgi->path_info( $cgi->path_info . "/index.html" );
- }
-
- eval { $h->handle_cgi_object($cgi); };
- if ($@) {
- $RT::Logger->crit($@);
- }
-
-
- if ($RT::Handle->TransactionDepth) {
- $RT::Handle->ForceRollback;
- $RT::Logger->crit("Transaction not committed. Usually indicates a software fault. Data loss may have occurred") ;
+ unless ($h->interp->comp_exists($cgi->path_info)) {
+ $cgi->path_info($cgi->path_info . "/index.html");
}
-
-
+ $h->handle_cgi_object($cgi);
+ # _should_ always be tied
}
1;