[mp2] Usage: Apache::Connection::remote_ip(obj) error
[prev]
[thread]
[next]
[Date index for 2004/11/18]
--------------030808030203040303070701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
apache 2.0.52
mod_perl 1.99_17
perl 5.8.0
code in question:
package ProxyRemoteAddr;
use Apache::Const qw(OK);
use strict;
sub handler
{
my $r = shift;
return OK unless ( $r->connection->remote_ip eq '127.0.0.1' ) &&
$r->header_in( 'X-Forwarded-For' );
if ( my ( $ip ) = $r->headers_in->{ 'X-Forwarded-For' } =~
/([^,\s]+)$/ )
{
$r->connection->remote_ip($ip);
}
return OK;
}
1;
Internal server error thrown error message:
[Thu Nov 18 01:48:49 2004] [error] [client 127.0.0.1] Usage:
Apache::Connection::remote_ip(obj) at /ai/toppik/lib/ProxyRemoteAddr.pm
line 15.\n
Line 15 being the: $r->connection->remote_ip($ip);
I've seen numerous examples of this working. Any ideas on my problem?
Thanks in advance...
-Sean-
--------------030808030203040303070701
Content-Type: text/x-vcard; charset=utf-8;
name="sean.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sean.vcf"
begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;internet:sean@xxxxxxxxxx.xxx
title:Tech Guru
tel;work:718-388-5424
x-mozilla-html:FALSE
version:2.1
end:vcard
--------------030808030203040303070701
Content-Type: text/plain; charset=us-ascii
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
--------------030808030203040303070701--
 |
[mp2] Usage: Apache::Connection::remote_ip(obj) error
Sean T Allen 08:55 on 18 Nov 2004
|