Re: Apache 2.4 Upgrade

John Dunlap <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAC5eUSsyE0LYj4vjqe11jPWjGbqpC4dJYV6Q9s6v-ZD2qBTEjA@mail.gmail.com>
Where do I get the source for 2.09-rc3? I don't see a tag for it in SVN.

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]
100x60.png (image/png, 2.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.