You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/11/02 22:49:55 UTC
Re: [mp2] Handler Order
> The best thing to do is to use the ssl_var_lookup hook which the C
> interface to mod_ssl exports, or better yet, if using 2.0.51 or later,
> the ssl_is_https hook. This means you don't have to use "SSLOptions
> +StdEnvVars" to get SSL variables via subprocess_env, which adds a lot
> of overhead since you probably don't need most of them, and the hook
> orderings don't matter.
>
> You'd have to right Perl bindings for this first of course!
I've been meaning to take care of this since you mentioned it.
http://www.modperlcookbook.org/~geoff/modules/Apache-SSLLookup-2.00_01.tar.gz
I'll probably move it to cpan in the next day or so.
--Geoff
--
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] Handler Order
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Joe Orton wrote:
> On Tue, Nov 02, 2004 at 04:49:55PM -0500, Geoffrey Young wrote:
>
>>I've been meaning to take care of this since you mentioned it.
>>
>>http://www.modperlcookbook.org/~geoff/modules/Apache-SSLLookup-2.00_01.tar.gz
>>
>>I'll probably move it to cpan in the next day or so.
>
>
> Very nice! Now can I just borrow some of your round tuits?
>
> Did you try #include'ing mod_ssl.h to pick up the optional function
> declarations rather than copy'n'pasting them? It should work OK with
> recent 2.0 releases.
I'm pretty sure I did and things bombed, then I saw the warning in
mod_rewrite and removed it. but it was early on in the dev process so the
problem may have been elsewhere.
anyway, I'll play around with it a bit more and try again. I actually only
tested against 2.0.52, though I meant to try 2.0.47 but apparently forgot.
I did make sure it worked both with and without mod_ssl installed, though.
btw, for those that are interested, as an exercise I created an
Apache::RequestRec subclass entirely from XS, which required a few minor
acrobatics.
--Geoff
--
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] Handler Order
Posted by Joe Orton <jo...@redhat.com>.
On Tue, Nov 02, 2004 at 08:37:42PM -0500, Geoffrey Young wrote:
>
> > Did you try #include'ing mod_ssl.h to pick up the optional function
> > declarations rather than copy'n'pasting them? It should work OK with
> > recent 2.0 releases.
...
> /apache/2.0.52/ssl/perl-5.8.5/include/mod_ssl.h:91:17: ssl.h: No such file
> or directory
> In file included from /apache/2.0.52/ssl/perl-5.8.5/include/mod_ssl.h:92,
> from SSLLookup.xs:5:
>
> which I gather is because mod_perl does not include the
> -I/usr/include/openssl that apache does when I activate mod_ssl. I can't
> find the list of includes in apxs or apr-config either, so I'm not sure how
> we could expect mod_perl to retain this information and pass it along in
> WriteMakefile.
> I'm not really the best at this kind of thing, so suggestions welcome.
> otherwise, I guess the declaration stays.
Fair enough, yes, it's probably in there somewhere but apxs in 2.0 is
not most helpful about this stuff...
> as an aside, do you know why mod_rewrite doesn't list mod_ssl as a
> predecessor when calling register_hooks? it would seem that mod_rewrite
> could be loaded after mod_ssl and thus not get access to those optional
> functions. but I've only used the optional stuff a few times, mainly with
> mod_include's stuff, so maybe things are different here.
The optional functions are registered in a pre_config hook and extracted
in a post_config hook which ensures that (I presume this is true for
mod_ssl, haven't checked).
joe
--
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] Handler Order
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Did you try #include'ing mod_ssl.h to pick up the optional function
> declarations rather than copy'n'pasting them? It should work OK with
> recent 2.0 releases.
just putting in
# include "mod_ssl.h"
gives
cc -c -I/apache/2.0.52/ssl/perl-5.8.5/include -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/local/include -I/usr/include/gdbm
-I/perl/perl-5.8.5/lib/5.8.5/i686-linux-thread-multi/CORE -DMOD_PERL -Wall
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror
-DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER -DMP_DEBUG -DMP_TRACE -DLINUX=2
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -DAP_DEBUG -g
-DVERSION=\"2.00_01\" -DXS_VERSION=\"2.00_01\" -fpic
"-I/perl/perl-5.8.5/lib/5.8.5/i686-linux-thread-multi/CORE" SSLLookup.c
In file included from SSLLookup.xs:5:
/apache/2.0.52/ssl/perl-5.8.5/include/mod_ssl.h:91:17: ssl.h: No such file
or directory
In file included from /apache/2.0.52/ssl/perl-5.8.5/include/mod_ssl.h:92,
from SSLLookup.xs:5:
which I gather is because mod_perl does not include the
-I/usr/include/openssl that apache does when I activate mod_ssl. I can't
find the list of includes in apxs or apr-config either, so I'm not sure how
we could expect mod_perl to retain this information and pass it along in
WriteMakefile.
I'm not really the best at this kind of thing, so suggestions welcome.
otherwise, I guess the declaration stays.
as an aside, do you know why mod_rewrite doesn't list mod_ssl as a
predecessor when calling register_hooks? it would seem that mod_rewrite
could be loaded after mod_ssl and thus not get access to those optional
functions. but I've only used the optional stuff a few times, mainly with
mod_include's stuff, so maybe things are different here.
--Geoff
--
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] Handler Order
Posted by Joe Orton <jo...@redhat.com>.
On Tue, Nov 02, 2004 at 04:49:55PM -0500, Geoffrey Young wrote:
> I've been meaning to take care of this since you mentioned it.
>
> http://www.modperlcookbook.org/~geoff/modules/Apache-SSLLookup-2.00_01.tar.gz
>
> I'll probably move it to cpan in the next day or so.
Very nice! Now can I just borrow some of your round tuits?
Did you try #include'ing mod_ssl.h to pick up the optional function
declarations rather than copy'n'pasting them? It should work OK with
recent 2.0 releases.
joe
--
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