httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Koziarski" <mich...@koziarski.com>
Subject Re: Questions about apreq_params
Date Mon, 15 Dec 2008 22:37:05 GMT
On Mon, Dec 15, 2008 at 11:28 PM, Philip M. Gollucci
<pgollucci@p6m7g8.com> wrote:
> Okay that documentation is both correct an incorrect.
>
> Its a stop gab.  When you give no body and no args, you'll get a NULL, but
> in reality you should never need to do this.  I'll take suggestions on how
> to word that correctly.

I'll have a think and get back to you.

> In the meantime, I'm not convinced you are using the API quite correctly.
>
> Can you have a look at the code in module/t/c-modules/*
> in particular,
>
>        o mod_apreq_request_test.c - basic case
>        o mod_apreq_upload_test.c - file uploads
>
> At miniumm, you should be checking the RV code of apreq_args == APR_SUCCESS.
> I'm betting its not that for you and if you decode the number to a string
> you'll find your problem.

My expectation was that I could safely call apreq_params and have that
return the the table of all the parameters in the request.  But
looking at how that function is implemented (discarding the RV codes)
it's not really all that useful.  I believe the test script I was
using was malformed so that's probably what's going on.

So should apreq_params be deprecated given the lack of RV checking?
It seems that it's not possible to use it safely? I can easily
implement that same 'overlay or copy' logic (with error checking)
myself, but this function will probably still trip up the next unlucky
traveller.  Any ideas on a best fix for the library, rather than just
my own module?

-- 
Cheers

Koz

Mime
View raw message