Ruediger Pluem wrote:
> +    /* try to read a header's worth of data */
> +    while (!ctx->done) {
> +        if (APR_BRIGADE_EMPTY(ctx->bb)) {
> +            ret = ap_get_brigade(f->next, ctx->bb, ctx->mode, block,
> +                                 ctx->need - ctx->rcvd);
> +            if (ret != APR_SUCCESS) {
> +                return ret;
> +            }
> +        }
> +        if (APR_BRIGADE_EMPTY(ctx->bb)) {
What about the case of an non blocking read where the upstream filter
returns an empty brigade
and APR_SUCCESS. This is equal to returning EAGAIN.

> +            return APR_EOF;
> +        }

Coming back to this one after correcting the setaside stuff... Is this
what you have in mind or should we actually return APR_EAGAIN?

return block == APR_NONBLOCK_READ ? APR_SUCCESS : APR_EOF;

-- 
Daniel Ruggeri

Reply via email to