perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Kaluža <jkal...@redhat.com>
Subject Re: mod_perl and httpd-2.4
Date Wed, 09 May 2012 07:40:07 GMT
On 05/08/2012 06:26 AM, Fred Moyer wrote:
> On Tue, Apr 10, 2012 at 11:44 PM, Jan Kaluža<jkaluza@redhat.com>  wrote:
>> I've talked with Torsten about the mod_perl and httpd-2.4 compatibility and
>> he advised me to start discussion about this problem.
>>
>> Attached patch against httpd24 branch fixes the compilation with httpd-2.4.
>> I was not able to generate xs using "make source_scan", so I've changed them
>> manually. Should source_scan.pl work...?
>
> What changes to source_scan.pl did you have to make?

So far I've the attached patch to compile mod_perl-2.0.6 against 
httpd-2.4. It's based on Stefan's patches. The only problem I have now 
is that after running source_scan and building mod_perl, ModPerl::Global 
is not included which causes later runtime failure. I'm not sure why it 
behaves like that and I'm in state of debugging this problem, but help 
is welcome.

>
> I've gotten httpd 2.4 to compile successfully, and I think this patch
> will work in terms of the api changes, but it needs to provide the
> appropriate method depending on the httpd minor version, remote_ip for
> 2.0, 2.2 and client_ip for 2.4. I'm not sure where that happens yet in
> the codebase - maybe FunctionTable.pm?

Right, those patches only hardcodes it for httpd-2.4. The next step 
should be to probably put #ifdefs around remote_ip. Other things should 
be done by source_scan script I believe.

> I would favor the compatibility layer approach personally. I have some
> code on CPAN that uses remote_ip, so I don't really want to go change
> that to support 2.4 just yet.

If you find a way how to do it, tell me :). As I said, I think 90% of 
httpd modules uses remote_ip/remote_addr in the meaning of 
useragent_ip/useragent_addr.

So, there's currently used conn_rec->remote_ip and new 
request_rec->useragent_ip. I can't imagine how would you write some 
layer to map current conn_rec->remote_ip to request_rec->remote_ip, 
since there's no way how to get particular request_rec from conn_rec. I 
just think it can't be done transparently and there will be need to 
change the modules anyway...

Regards,
Jan Kaluza

Mime
View raw message