* John Dunlap <[email protected]> wrote:
> Date: Mon, 15 Jun 2015 17:20:09 -0400
> From: John Dunlap <[email protected]>
> To: "Kevin A. McGrail" <[email protected]>
> CC: Vincent Veyron <[email protected]>, mod_perl list
> <[email protected]>
> Subject: Re: Apache 2.4 Upgrade
>
> Where do I get the source for 2.09-rc3? I don't see a tag for it in SVN.
http://people.apache.org/~stevehay/mod_perl-2.0.9-rc3.tar.gz
-Jie
> On Mon, Jun 15, 2015 at 5:12 PM, Kevin A. McGrail <[email protected]> wrote:
>
> > On 6/15/2015 5:02 PM, John Dunlap wrote:
> >
> > I am getting the client ip address in every request and checking it
> > against an access control list which is stored in my database(so that the
> > user can maintain the ACL's without the assistance of an administrator).
> > These are the code snippets which are grabbing the IP address:
> >
> > ==== Begin Snippet 1 ====
> > # Check which method is available and use the correct one. For some
> > # reason, remote_ip was changed to client_ip in Apache 2.4
> > if ($connection->can('client_ip')) {
> > $R->{remote_host} = $connection->client_ip();
> > } elsif($connection->can('remote_ip')) {
> > $R->{remote_host} = $connection->remote_ip();
> > } else {
> > die("I don't know how to find the client's ip address");
> > }
> > ==== End Snippet 1 ====
> >
> > ==== Begin Snippet 2 ====
> > if ($connection->can('client_ip')) { # Apache >= 2.4
> > return $connection->client_addr->ip_get;
> > } else { # Apache <= 2.2
> > return $connection->remote_addr->ip_get;
> > }
> > ==== End Snippet 2 ====
> >
> > Looks to me like someone has already made Apache 2.4 modifications to the
> > code.
> >
> > You might want to compile the mod perl 2.09-rc3 and test with that as I
> > don't know what SVN version debian is working with.
> >
> > regards,
> > KAM
> >
>
>
>
> --
> John Dunlap
> *CTO | Lariat *
>
> *Direct:*
> *[email protected] <[email protected]>*
>
> *Customer Service:*
> 877.268.6667
> [email protected]