From 23ee5fef5ad15c17b72574bb2832b7ad4c64ae83 Mon Sep 17 00:00:00 2001 From: Mike Heins Date: Tue, 28 Mar 2006 17:05:07 +0000 Subject: [PATCH] * Add Interchange::Link patches from devel. --- dist/src/mod_perl2/Interchange/Link.pm | 40 +++++++++++-------- .../Link.pm.mod_perl-1.999_21_and_before | 4 +- dist/src/mod_perl2/README | 13 ++++-- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/dist/src/mod_perl2/Interchange/Link.pm b/dist/src/mod_perl2/Interchange/Link.pm index eb6679206..4d2b77945 100644 --- a/dist/src/mod_perl2/Interchange/Link.pm +++ b/dist/src/mod_perl2/Interchange/Link.pm @@ -2,7 +2,7 @@ # Interchange::Link -- mod_perl 1.99/2.0 module for linking to Interchange # -# $Id: Link.pm,v 1.8 2005-11-08 18:14:44 jon Exp $ +# $Id: Link.pm,v 1.8.2.1 2006-03-28 17:05:07 mheins Exp $ # # Copyright (C) 2002-2005 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. @@ -23,14 +23,17 @@ package Interchange::Link; + use strict; use ModPerl::Registry; use ModPerl::Code; -use Apache::Const; -require Apache::Connection; -require Apache::RequestRec; -require Apache::RequestIO; -require Apache::RequestUtil; +#use Apache::Const; +use Apache2::Const; +use Apache2::ServerRec (); +require Apache2::Connection; +require Apache2::RequestRec; +require Apache2::RequestIO; +require Apache2::RequestUtil; use Socket; $ENV{PATH} = "/bin:/usr/bin"; @@ -45,7 +48,7 @@ Interchange::Link -- mod_perl 1.99/2.0 module for linking to Interchange =head1 VERSION -$Revision: 1.8 $ +$Revision: 1.8.2.1 $ =head1 SYNOPSIS @@ -99,6 +102,11 @@ via this procedure: mkdir -p /usr/lib/httpd/perl/Interchange cp Link.pm /usr/lib/httpd/perl/Interchange +If you have mod_perl2 1.999_21 or earlier, you should instead do: + + mkdir -p /usr/lib/httpd/perl/Interchange + cp Link.pm.mod_perl-1.999_21_and_before /usr/lib/httpd/perl/Interchange + Then you provide a startup script that tells mod_perl where its libraries are: @@ -339,7 +347,7 @@ sub setup_location { my $s = $r->server; my $location = $r->location; - return $config{$location} if $config{$location} && !($s->is_virtual); + return $config{$location} if $config{$location} && !($s->is_virtual()); #warn "Getting location $location\n"; @@ -490,7 +498,7 @@ sub send_environment { for(@$ord) { #warn "checking for OrdinaryFile $_\n"; next unless $uri =~ $_; - $global_status = Apache::DECLINED; + $global_status = Apache2::Const::DECLINED; return undef; } } @@ -502,7 +510,7 @@ sub send_environment { $r->headers_out->{Status} = '404 Not found'; $r->content_type('text/html'); #warn "dropping request for $uri\n"; - $global_status = Apache::NOT_FOUND; + $global_status = Apache2::Const::NOT_FOUND; return undef; } } @@ -669,7 +677,7 @@ sub handler { $ok or do { server_not_running($r); - return Apache::OK; + return Apache2::Const::OK; }; my $former = select SOCK; @@ -730,12 +738,12 @@ sub handler { #warn "Doing redirect\n"; $r->content_type($set_content); close (SOCK) or die "close: $!\n"; - return Apache::REDIRECT; + return Apache2::Const::REDIRECT; } elsif($set_status =~ /^404/) { #warn "404 not found status\n"; close (SOCK) or die "close: $!\n"; - return Apache::OK; + return Apache2::Const::OK; } elsif($set_status eq 'httpd_deliver') { $deliver_object = $set_status; @@ -754,11 +762,11 @@ sub handler { $r->content_type('text/html'); if(! -e $fn) { $r->headers_out->{Status} = '404 Not found'; - return Apache::NOT_FOUND; + return Apache2::Const::NOT_FOUND; } else { $r->headers_out->{Status} = '403 Permission denied'; - return Apache::FORBIDDEN; + return Apache2::Const::FORBIDDEN; } } @@ -784,7 +792,7 @@ sub handler { } #warn "Returning OK\n"; - return Apache::OK; + return Apache2::Const::OK; } 1; diff --git a/dist/src/mod_perl2/Interchange/Link.pm.mod_perl-1.999_21_and_before b/dist/src/mod_perl2/Interchange/Link.pm.mod_perl-1.999_21_and_before index 510a2bdf4..5f842a5f7 100644 --- a/dist/src/mod_perl2/Interchange/Link.pm.mod_perl-1.999_21_and_before +++ b/dist/src/mod_perl2/Interchange/Link.pm.mod_perl-1.999_21_and_before @@ -2,7 +2,7 @@ # Interchange::Link -- mod_perl 1.99/2.0 module for linking to Interchange # -# $Id: Link.pm.mod_perl-1.999_21_and_before,v 1.1 2006-03-28 17:02:47 mheins Exp $ +# $Id: Link.pm.mod_perl-1.999_21_and_before,v 1.1.2.1 2006-03-28 17:05:07 mheins Exp $ # # Copyright (C) 2002-2005 Interchange Development Group # Copyright (C) 1996-2002 Red Hat, Inc. @@ -45,7 +45,7 @@ Interchange::Link -- mod_perl 1.99/2.0 module for linking to Interchange =head1 VERSION -$Revision: 1.1 $ +$Revision: 1.1.2.1 $ =head1 SYNOPSIS diff --git a/dist/src/mod_perl2/README b/dist/src/mod_perl2/README index 062d31805..294c4ac41 100644 --- a/dist/src/mod_perl2/README +++ b/dist/src/mod_perl2/README @@ -7,7 +7,7 @@ NAME change VERSION - $Revision: 1.2 $ + $Revision: 1.2.2.1 $ SYNOPSIS @@ -57,6 +57,11 @@ INSTALLATION mkdir -p /usr/lib/httpd/perl/Interchange cp Link.pm /usr/lib/httpd/perl/Interchange + If you have mod_perl2 1.999_21 or earlier, you should instead do: + + mkdir -p /usr/lib/httpd/perl/Interchange + cp Link.pm.mod_perl-1.999_21_and_before /usr/lib/httpd/perl/Interchange + Then you provide a startup script that tells mod_perl where its libraries are: @@ -105,7 +110,7 @@ CONFIGURATION Note that your file permissions for the socket file need to allow the Apache User uid to read and write it. This usually means "Sock- etPerms 0666" or in interchange.cfg. You can also do "SocketPerms - 0666" if you set the group of the containing directory to the + 0660" if you set the group of the containing directory to the Apache Group value, and change the directory permissions to enable the setgid bit. (That is accomplished with "chmod g+s ".) @@ -271,7 +276,7 @@ BUGS COPYRIGHT AND LICENSE Copyright (C) 1996-2002 Red Hat, Inc. - Copyright (C) 2002-2004 Interchange Development Group + Copyright (C) 2002-2005 Interchange Development Group This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -285,4 +290,4 @@ COPYRIGHT AND LICENSE -perl v5.8.4 2004-06-29 Interchange::Link(3) +perl v5.8.8 2006-03-28 Interchange::Link(3)