Jonathan Vanasco <[EMAIL PROTECTED]> writes:

> On May 3, 2007, at 9:19 PM, Joe Schaefer wrote:
>
>> Here's what I was alluding to on apreq-dev when you asked about it:
>
> that code makes sense...
>
> it makes me wonder more though:
>
> a)
>       what's the deal with
>               Missing input data
>               Unknown Error : 0

The "Unknown Error" string is operating system dependent. On
my linux box it would be reported as "Success", since the error
code in any case is 0.  "Missing input data" comes from the 
apreq ala APR::Request::Error::NODATA, and counts as a trivial
error (since there's nothing to parse).  FWIW, here's the 
code for apreq_module_status_is_error:

static APR_INLINE
unsigned apreq_module_status_is_error(apr_status_t s) {
    switch (s) {
    case APR_SUCCESS:
    case APR_INCOMPLETE:
    case APR_EINIT:
    case APREQ_ERROR_NODATA:
    case APREQ_ERROR_NOPARSER:
    case APREQ_ERROR_NOHEADER:
        return 0;
    default:
        return 1;
    }
}

Everything else triggers a die in $req->args or $req->body.
Perhaps we should expose that function in the perl glue?

-- 
Joe Schaefer

Reply via email to