Re: [mp2] Usage: Apache::Connection::remote_ip(obj) error

[prev] [thread] [next] [Date index for 2004/11/18]

From: Tom Schindl
Subject: Re: [mp2] Usage: Apache::Connection::remote_ip(obj) error
Date: 09:06 on 18 Nov 2004
Sean T Allen wrote:
> 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;

http://gossamer-threads.com/lists/engine?list=modperl&do=search_results&search_forum=forum_4&search_string=%22Report+on+mp2+accessors+in+apache_structures.map%22&search_type=AND

yes its readonly since _15, in cvs/svn it's writeable once more.

A patch against can be found here:
http://gossamer-threads.com/lists/modperl/modperl/73063?search_string=Apache-AuthenNTLM-2.07%20and%20ModPerl%201.99_16;#73063

Tom

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


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

Re: [mp2] Usage: Apache::Connection::remote_ip(obj) error
Tom Schindl 09:06 on 18 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52