Patch to support Apache 2 / mod_perl 2 in Freeside 1.5.7
[freeside.git] / install / rpm / freeside-1.5.7.mod_perl2.patch
1 diff -Naur freeside-1.5.7.orig/FS/FS/CGI.pm freeside-1.5.7/FS/FS/CGI.pm
2 --- freeside-1.5.7.orig/FS/FS/CGI.pm    2004-12-10 17:28:25.000000000 -0500
3 +++ freeside-1.5.7/FS/FS/CGI.pm 2005-07-26 22:41:07.000000000 -0400
4 @@ -91,7 +91,8 @@
5        if ( $header =~ /^Content-Type$/ ) {
6          $HTML::Mason::Commands::r->content_type($value);
7        } else {
8 -        $HTML::Mason::Commands::r->header_out( $header => $value );
9 +       # Modified for mod_perl 1.99+
10 +        $HTML::Mason::Commands::r->headers_out->{ $header } = $value;
11        }
12      } else {
13        die "http_header called in unknown environment";
14 @@ -168,8 +169,9 @@
15  
16  sub eidiot {
17    warn "eidiot depriciated";
18 -  $HTML::Mason::Commands::r->send_http_header
19 -    if defined $HTML::Mason::Commands::r;
20 +# Disabled for mod_perl 1.99+, should be an eval{}
21 +#  $HTML::Mason::Commands::r->send_http_header
22 +#    if defined $HTML::Mason::Commands::r;
23    idiot(@_);
24    &myexit();
25  }