httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <>
Subject Re: cvs commit: httpd-apreq-2/build
Date Fri, 31 Oct 2003 06:32:29 GMT
On Thu, 30 Oct 2003, Joe Schaefer wrote:

[ ... ]
> However, I'd really like to see the perl glue ported to
> CGI first, since we've already got that working in C.
> How much of the APR:: stuff (pools, brigades, etc.) in mp2
> will run outside of mp2?

Until things are arranged so that all the needed APR::* can
be used outside of mp2, I've been looking at the perl glue
in a CGI context, just to see what's involved. This entails
having available as an so/dll. Although this may
not be the best model, I tried the following, just to see if
it works:
- make an Apreq::Base, consisting of a Base.xs that just
made available apr_initialize() and apr_terminate2().
- make an Apreq::Request which loads Apreq::Base and has
a new() method to create an Apreq::Request object by
    - calling apr_initialize()
    - creating a $p = APR::Pool->new()
    - creating a $req = Apache::Request->new($p, @_)
- make an Apreq::Cookie which similarly passes a $p pool
in as the $env within Apache/
- I'm not sure about this, but I also made a DESTROY sub
which calls apr_terminate2().

Testing this with the env/t/cgi.t tests against a perl
version of env/test_cgi.c has all tests passing, except for
a problem with the largest POST tests. But this very well
may be due to something I've missed in setting things up.

best regards,

View raw message