Skip to content

Commit

Permalink
* Add Interchange::Link patches from devel.
Browse files Browse the repository at this point in the history
  • Loading branch information
perusionmike committed Mar 28, 2006
1 parent 9a6ba08 commit 23ee5fe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
40 changes: 24 additions & 16 deletions dist/src/mod_perl2/Interchange/Link.pm
Expand Up @@ -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.
Expand All @@ -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";
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -669,7 +677,7 @@ sub handler {

$ok or do {
server_not_running($r);
return Apache::OK;
return Apache2::Const::OK;
};

my $former = select SOCK;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}

Expand All @@ -784,7 +792,7 @@ sub handler {
}

#warn "Returning OK\n";
return Apache::OK;
return Apache2::Const::OK;
}

1;
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions dist/src/mod_perl2/README
Expand Up @@ -7,7 +7,7 @@ NAME
change

VERSION
$Revision: 1.2 $
$Revision: 1.2.2.1 $

SYNOPSIS
<Location /foundation>
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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 <direc-
tory>".)
Expand Down Expand Up @@ -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
Expand All @@ -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)

0 comments on commit 23ee5fe

Please sign in to comment.