diff options
author | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
commit | eb9668a6f3181ee02cb335272c5ee4616e61fd09 (patch) | |
tree | f5a22d9141723fd9e2fdb40430e4a38743b72604 /rt/bin/mason_handler.fcgi.in | |
parent | 25953817e61fd252c18241699c0b6cdc3fa54121 (diff) | |
parent | 289340780927b5bac2c7604d7317c3063c6dd8cc (diff) |
This commit was generated by cvs2svn to compensate for changes in r3241,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/bin/mason_handler.fcgi.in')
-rw-r--r-- | rt/bin/mason_handler.fcgi.in | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/rt/bin/mason_handler.fcgi.in b/rt/bin/mason_handler.fcgi.in index e932bfc29..a009663b9 100644 --- a/rt/bin/mason_handler.fcgi.in +++ b/rt/bin/mason_handler.fcgi.in @@ -27,7 +27,7 @@ use strict; use File::Basename; require ('@RT_BIN_PATH@/webmux.pl'); -my $h = &RT::Interface::Web::NewCGIHandler(); +my $h = &RT::Interface::Web::NewCGIHandler(@RT::MasonParameters); # Enter CGI::Fast mode, which should also work as a vanilla CGI script. require CGI::Fast; @@ -44,11 +44,25 @@ while ( my $cgi = CGI::Fast->new ) { $ENV{'ENV'} = '' if defined $ENV{'ENV'}; $ENV{'IFS'} = '' if defined $ENV{'IFS'}; - unless ($h->interp->comp_exists($cgi->path_info)) { - $cgi->path_info($cgi->path_info . "/index.html"); + 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") ; } - $h->handle_cgi_object($cgi); - # _should_ always be tied + + } 1; |