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-





begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;internet:[EMAIL PROTECTED]
title:Tech Guru
tel;work:718-388-5424
x-mozilla-html:FALSE
version:2.1
end:vcard


-- 
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

Reply via email to