[Rt-commit] [svn] r1121 - in rt: . branches/rt-3.3/bin branches/rt-3.3/html/Elements branches/rt-3.3/html/NoAuth branches/rt-3.3/lib/RT/Interface

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Sun Jun 20 13:59:08 EDT 2004


Author: autrijus
Date: Sun Jun 20 13:59:07 2004
New Revision: 1121

Modified:
   rt/   (props changed)
   rt/branches/rt-3.3/bin/webmux.pl.in
   rt/branches/rt-3.3/html/Elements/Header
   rt/branches/rt-3.3/html/Elements/SetupSessionCookie
   rt/branches/rt-3.3/html/NoAuth/webrt.css
   rt/branches/rt-3.3/lib/RT/Interface/Web.pm
Log:
 ----------------------------------------------------------------------
 r5682 at not:  autrijus | 2004-06-20T17:57:48.360088Z
 
 * Supports native MasonX::Apache2Handler.
 * Changed header_out to use headers_out instead (which should be
   used in 1.0 as well). Cf.:
   http://perl.apache.planetmirror.com/docs/2.0/user/porting/compat.html
 
 ----------------------------------------------------------------------


Modified: rt/branches/rt-3.3/bin/webmux.pl.in
==============================================================================
--- rt/branches/rt-3.3/bin/webmux.pl.in	(original)
+++ rt/branches/rt-3.3/bin/webmux.pl.in	Sun Jun 20 13:59:07 2004
@@ -32,7 +32,8 @@
     $ENV{'ENV'}    = '' if defined $ENV{'ENV'};
     $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
 
-    eval { require Apache2; require Apache::compat }
+    eval { require Apache2; require APR::Table; require MasonX::Apache2Handler; 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)};
 }
 
@@ -55,12 +56,16 @@
 	    # warn $@ if $@;
 	    return $r;
 	};
+	require HTML::Mason::ApacheHandler;
+        $RT::MasonHandlerClass = 'HTML::Mason::ApacheHandler';
     }
-    if ($CGI::MOD_PERL) {
+    elsif ($CGI::MOD_PERL) {
 	require HTML::Mason::ApacheHandler;
+        $RT::MasonHandlerClass = 'HTML::Mason::ApacheHandler';
     }
     else {
 	require HTML::Mason::CGIHandler;
+        $RT::MasonHandlerClass = 'HTML::Mason::CGIHandler';
     }
 }
 

Modified: rt/branches/rt-3.3/html/Elements/Header
==============================================================================
--- rt/branches/rt-3.3/html/Elements/Header	(original)
+++ rt/branches/rt-3.3/html/Elements/Header	Sun Jun 20 13:59:07 2004
@@ -81,8 +81,8 @@
 </table>
 <%INIT>
 
-$r->header_out('Pragma' => 'no-cache');
-$r->header_out('Cache-control' => 'no-cache');
+$r->headers_out->{'Pragma'} = 'no-cache';
+$r->headers_out->{'Cache-control'} = 'no-cache';
 </%INIT>
 
 <%ARGS>

Modified: rt/branches/rt-3.3/html/Elements/SetupSessionCookie
==============================================================================
--- rt/branches/rt-3.3/html/Elements/SetupSessionCookie	(original)
+++ rt/branches/rt-3.3/html/Elements/SetupSessionCookie	Sun Jun 20 13:59:07 2004
@@ -74,7 +74,7 @@
             -value => $session{_session_id},
             -path  => '/',
         );
-        $r->header_out('Set-Cookie', $cookie->as_string);
+        $r->headers_out->{'Set-Cookie'} = $cookie->as_string;
 
     } 
 

Modified: rt/branches/rt-3.3/html/NoAuth/webrt.css
==============================================================================
--- rt/branches/rt-3.3/html/NoAuth/webrt.css	(original)
+++ rt/branches/rt-3.3/html/NoAuth/webrt.css	Sun Jun 20 13:59:07 2004
@@ -353,5 +353,5 @@
 </%flags>
 <%init>
 $r->content_type('text/css');
-$r->header_out('Expires' ,'+30m');
+$r->headers_out->{'Expires'} = '+30m';
 </%init>

Modified: rt/branches/rt-3.3/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/rt-3.3/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/rt-3.3/lib/RT/Interface/Web.pm	Sun Jun 20 13:59:07 2004
@@ -57,8 +57,8 @@
 =cut
 
 sub NewApacheHandler {
-    require HTML::Mason::ApacheHandler;
-    my $ah = new HTML::Mason::ApacheHandler( 
+    $RT::MasonHandlerClass ||= 'HTML::Mason::ApacheHandler';
+    my $ah = $RT::MasonHandlerClass->new( 
     
         comp_root                    => [
             [ local    => $RT::MasonLocalComponentRoot ],


More information about the Rt-commit mailing list