You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Carl Brewer <ca...@bl.echidna.id.au> on 2003/06/25 09:35:01 UTC

apache2/mp2 - status?


I'm developing a number of sites under apache2/mp2, and
am at the point where I need to start parsing input from
forms.  Apache::Request is the thing to use, of course, which
is why I'm here.

Before I pull down the CVS repository and try and build it
on my NetBSD 1.6.1 server, can anyone give me a quick
status report on it so I know that I'm best off doing this,
or hacking code out of CGI.pm to get POST data?

I'm very keen to test libapreq2 and use it if at all possible.

thanks

Carl




Re: apache2/mp2 - status?

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Carl Brewer <ca...@bl.echidna.id.au> writes:

[...]

> If I get it to compile, will the CGI->Apache API similarity
> still hold 

Yes, we do our best to maintain that similarity.  However
some details are still missing from the picture.

> or will I have to RTFSC a lot to see how to call the thing?

No, just pay attention to the test modules in 
glue/perl/t/response/.   Other than the config 
issue I mentioned earlier, one of the key problems
right now is:

     We don't "autoparse" the POST data anymore, and
     There's no $req->parse() available yet.  The 
     C-parsers are implemented as input filters, so
     you literally need to pull the POST data through
     the input filter chain before using $req->param.
     Look at the big_input.pm source for the current
     cludge.

Other than that, calling

  $req->param("foo")  will list all the foo params for the request,
  $req->args("foo")   will list the foo params in the query string,
  $req->body("foo")   will list the foo params in the POST data,
  $req->upload("foo") will list the foo uploads.


-- 
Joe Schaefer


Re: apache2/mp2 - status?

Posted by Carl Brewer <ca...@bl.echidna.id.au>.
G'day Joe,

Joe Schaefer wrote:

> Carl Brewer <ca...@bl.echidna.id.au> writes:
> 
> [...]
> 
> 
>>can anyone give me a quick status report on it so I know that I'm best
>>off doing this, or hacking code out of CGI.pm to get POST data?
> 
> 
> You're welcome to try it, but there's
> 
>   1) essentially no documentation, especially for the perl API, since
>   2) the perl API is still in flux.

With regards to this, for the "simple" things(!) like
parsing a POST request, how much is this likely to
change?  I'm not concerned about file uploads or any
of the other mess, that's all I need at the moment to
get going on this project without having to stop in 3 months
and gut it all and recode core bits.  I'm using a very
crude read_post() function cribbed from Stas Bekman's
test library, but it doesn't deal with splitting up
the POST string into hashes or anything nice like that.

If I get it to compile, will the CGI->Apache API similarity
still hold or will I have to RTFSC a lot to see how to
call the thing?

> It does work, though.  Right now, the biggest problem
> with the perl API is sorting out how to configure the
> parsers (POST size limits, temporary directory, etc).

*nod*

> You need ExtUtils::XSBuilder to build the perl API, and
> Apache::Test and Devel::Peek for the tests, and
> probably a few other modules I haven't remembered.

*nod*

> OTOH, the C API for libapreq-2 is rapidly approaching 
> stability, but I gather that's not what you're interested in.

I haven't written any C to deal with web stuff since 1995,
and am not likely to start again now :) Horses for courses!

Is anyone else here in the same position as I am? ie: wanting to
use mp2 libapreq now? or using bits of it that are working?

Carl





Re: apache2/mp2 - status?

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Carl Brewer <ca...@bl.echidna.id.au> writes:

[...]

> can anyone give me a quick status report on it so I know that I'm best
> off doing this, or hacking code out of CGI.pm to get POST data?

You're welcome to try it, but there's

  1) essentially no documentation, especially for the perl API, since
  2) the perl API is still in flux.

It does work, though.  Right now, the biggest problem
with the perl API is sorting out how to configure the
parsers (POST size limits, temporary directory, etc).

You need ExtUtils::XSBuilder to build the perl API, and
Apache::Test and Devel::Peek for the tests, and
probably a few other modules I haven't remembered.

OTOH, the C API for libapreq-2 is rapidly approaching 
stability, but I gather that's not what you're interested in.

-- 
Joe Schaefer