[interchange-cvs] interchange - pvinci modified
dist/src/mod_perl2/Interchange/Link.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun Apr 3 15:40:23 EDT 2005
User: pvinci
Date: 2005-04-03 19:40:23 GMT
Modified: dist/src/mod_perl2/Interchange Link.pm
Log:
* Don't cache location if in a virtual host.
* Pass $r to die_page and server_not_running as they are looking for them. (fixes 500 errors in the admin)
Revision Changes Path
1.6 +9 -8 interchange/dist/src/mod_perl2/Interchange/Link.pm
rev 1.6, prev_rev 1.5
Index: Link.pm
===================================================================
RCS file: /var/cvs/interchange/dist/src/mod_perl2/Interchange/Link.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Link.pm 25 Jan 2005 04:15:24 -0000 1.5
+++ Link.pm 3 Apr 2005 19:40:23 -0000 1.6
@@ -1,11 +1,11 @@
#!/usr/bin/perl
-# Interchange::Link -- mod_perl 1.99/2.0 module for linking to Interchange
+# tlink.pl: runs as a cgi program and passes request to Interchange server
#
-# $Id: Link.pm,v 1.5 2005/01/25 04:15:24 mheins Exp $
+# $Id: Link.pm,v 1.6 2005/04/03 19:40:23 pvinci Exp $
#
-# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
+# Copyright (C) 2002-2004 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
@@ -45,7 +45,7 @@
=head1 VERSION
-$Revision: 1.5 $
+$Revision: 1.6 $
=head1 SYNOPSIS
@@ -317,8 +317,8 @@
=head1 COPYRIGHT AND LICENSE
- Copyright (C) 2002-2005 Interchange Development Group
Copyright (C) 1996-2002 Red Hat, Inc.
+ Copyright (C) 2002-2004 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
@@ -336,9 +336,10 @@
sub setup_location {
my $r = shift;
+ my $s = $r->server;
my $location = $r->location;
- return $config{$location} if $config{$location};
+ return $config{$location} if $config{$location} && !($s->is_virtual);
#warn "Getting location $location\n";
@@ -610,8 +611,8 @@
my $cfg = setup_location($r);
- $SIG{PIPE} = sub { die_page("signal"); };
- $SIG{ALRM} = sub { server_not_running(); exit 1; };
+ $SIG{PIPE} = sub { die_page($r); };
+ $SIG{ALRM} = sub { server_not_running($r); exit 1; };
my ($remote, $port, $iaddr, $paddr, $proto, $line);
More information about the interchange-cvs
mailing list