httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: svn commit: r480135 - /httpd/httpd/trunk/modules/http/http_filters.c
Date Tue, 28 Nov 2006 18:05:09 GMT
On Tue, Nov 28, 2006 at 05:36:55PM -0000, Jim Jagielski wrote:
> Author: jim
> Date: Tue Nov 28 09:36:45 2006
> New Revision: 480135
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=480135
> Log:
> Apply patch for PR 41056 (19954) to fix chunk
> filter. Now flushes work better.

This looks wrong to me.  When reading the CRLF in state == BODY_CHUNK 
with block == _NONBLOCK, the initial ap_get_brigade() may return EAGAIN, 
and then the code will fall into the generic error handling branch:

                /* Detect chunksize error (such as overflow) */
                if (rv != APR_SUCCESS || ctx->remaining < 0) {

The API use is weird too.  This code presumes that the next filter 
indicates read-would-block only by returning SUCCESS with an empty 
brigade.  Yet it signals the same thing to the downstream filter only by 
failing with EAGAIN!

joe

Mime
View raw message