[Rt-commit] r2952 - in rt/branches/CHALDEA-EXPERIMENTAL: bin
lib/RT/Interface/Web
autrijus at bestpractical.com
autrijus at bestpractical.com
Tue May 24 17:59:02 EDT 2005
Author: autrijus
Date: Tue May 24 17:59:01 2005
New Revision: 2952
Modified:
rt/branches/CHALDEA-EXPERIMENTAL/bin/webmux.pl.in
rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm
Log:
* mod_perl2 fix, part #1
Modified: rt/branches/CHALDEA-EXPERIMENTAL/bin/webmux.pl.in
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/bin/webmux.pl.in (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/bin/webmux.pl.in Tue May 24 17:59:01 2005
@@ -56,10 +56,13 @@
use CGI qw(-private_tempfiles); #bring this in before mason, to make sure we
#set private_tempfiles
- eval { require Apache2; require Apache::Request; 1 } or
- eval { require Apache2; require Apache::compat; 1 } or die $@
- if $ENV{'MOD_PERL'}
- and $ENV{'MOD_PERL'} =~ m{mod_perl/(?:2|1\.9)};
+ if ($ENV{MOD_PERL} =~ m{mod_perl/1\.9}) {
+ die "ModPerl 1.9x is no longer supported -- upgrade to 2.0 first";
+ }
+ if ($ENV{MOD_PERL} =~ m{mod_perl/2}) {
+ require mod_perl2;
+ require Apache2::RequestUtil;
+ }
}
Modified: rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm Tue May 24 17:59:01 2005
@@ -90,8 +90,7 @@
if ($MasonX::Apache2Handler::VERSION) {
goto &NewApache2Handler;
}
- elsif ( $mod_perl::VERSION && $mod_perl::VERSION >= 1.9908 ) {
- require Apache::RequestUtil;
+ elsif ( $mod_perl::VERSION && $mod_perl::VERSION >= 2 ) {
no warnings 'redefine';
my $sub = *Apache::request{CODE};
*Apache::request = sub {
@@ -120,11 +119,10 @@
# Clean up our umask to protect session files
umask(0077);
- if ($CGI::MOD_PERL) {
+ if ($CGI::MOD_PERL) { local $@; eval {
chown( Apache->server->uid, Apache->server->gid,
$RT::MasonSessionDir )
- if Apache->server->can('uid');
- }
+ } }
# Die if WebSessionDir doesn't exist or we can't write to it
stat($RT::MasonSessionDir);
More information about the Rt-commit
mailing list