httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <>
Subject Re: Reading post parameters from apache request
Date Fri, 20 Nov 2009 21:59:46 GMT
On Fri, Nov 20, 2009 at 22:01, pranil dasika <> wrote:
> Hi,
> I am trying to write a custom module where I need to read post parameters
> from the request. I guess apreq library is relevant to this but could not
> find any substantial examples or documents.
> Is there any other way to read the params other than apreq. Any pseudocode/
> examples will be appreciated.
> Thanks,
> Pranil

Here you have an example. It is not optimal, you could, for example,
take the brigade creation out of the loop and clean the brigade at the
end of each iteration, after you extracted the data.

apr_bucket_brigade *bb;
do {
   bb = apr_brigade_create(req->pool, req->connection->bucket_alloc);
   if (0 == bb)
        // error
   if (APR_SUCCESS != ap_get_brigade(req->input_filters, bb,
        // error
   extract data from bb;
} while (EOS not yet encountered in bb);


View raw message