httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <>
Subject Re: Questions about apreq_params
Date Mon, 15 Dec 2008 21:41:53 GMT
Michael Koziarski wrote:
> Hey guys,
> first, apologies for messing up the subscribe email!
> We've just started using apreq for some apache module development and
> it's working out quite nicely.  However we've noticed a few strange
> issues.
> The first of which is that apreq_params returns NULL if we use the
> following as the multipart body:
>   apr_table_t *request_body = apreq_params(req, r->pool);
>   if (request_body == NULL)
>   {
>     // we are seeing this
>   }
> The documentation implies that it never does, which makes me wonder.
> Is that just a stale piece of documentation or have we found a bug in
> libapreq?  Should we be handling this case in our module or figuring
> out a test case for you guys to fix in 2.10?
Clearly the function can return NULL, what documentation do you refer to ?

APREQ_DECLARE(apr_table_t *)apreq_params(apreq_handle_t *req, apr_pool_t *p)
     const apr_table_t *args, *body;
     apreq_args(req, &args);
     apreq_body(req, &body);

     if (args != NULL)
         if (body != NULL)
             return apr_table_overlay(p, args, body);
             return apr_table_copy(p, args);
         if (body != NULL)
             return apr_table_copy(p, body);
             return NULL;


Philip M. Gollucci ( c: 703.336.9354
Consultant - P6M7G8 Inc.
Senior System Admin - RideCharge, Inc.
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

View raw message