On 03/21/2009 04:20 PM, Torsten Foertsch wrote:
> Hi,
>
> the http_in filter (ap_http_filter) uses an "eos_sent" flag in its
> context. This flag is set each time an eos bucket is sent except for
> one case:
>
> /* If we have no more bytes remaining on a C-L request,
> * save the callter a roundtrip to discover EOS.
> */
> if (ctx->state == BODY_LENGTH && ctx->remaining == 0) {
> e = apr_bucket_eos_create(f->c->bucket_alloc);
> APR_BRIGADE_INSERT_TAIL(b, e);
> }
>
> Is that a typo? If not, why is it omitted here?
>
> Shouldn't that piece read:
>
> /* If we have no more bytes remaining on a C-L request,
> * save the callter a roundtrip to discover EOS.
> */
> if (ctx->state == BODY_LENGTH && ctx->remaining == 0) {
> e = apr_bucket_eos_create(f->c->bucket_alloc);
> APR_BRIGADE_INSERT_TAIL(b, e);
> ctx->eos_sent = 1;
> }
I guess that you are correct, but IMHO it doesn't really matter as
if there was an eos on the brigade the filter shouldn't be really
called again.
Regards
RĂ¼diger