Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 43373 invoked from network); 6 Feb 2007 16:35:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2007 16:35:24 -0000 Received: (qmail 17246 invoked by uid 500); 6 Feb 2007 16:35:27 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 17192 invoked by uid 500); 6 Feb 2007 16:35:26 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 17181 invoked by uid 99); 6 Feb 2007 16:35:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Feb 2007 08:35:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 06 Feb 2007 08:35:19 -0800 Received: (qmail 43285 invoked by uid 2161); 6 Feb 2007 16:34:58 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 99C9D1721C for ; Tue, 6 Feb 2007 17:33:48 +0100 (CET) Message-ID: <45C8AE34.4040301@apache.org> Date: Tue, 06 Feb 2007 17:35:00 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: de, en, de-de, en-gb, cy, zu, xh MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r503863 - /httpd/httpd/trunk/CHANGES References: <20070205204602.0A0651A981A@eris.apache.org> <20070206131015.GA2881@redhat.com> In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 02/06/2007 04:49 PM, Jim Jagielski wrote: > > On Feb 6, 2007, at 8:10 AM, Joe Orton wrote: > >> On Mon, Feb 05, 2007 at 08:46:01PM -0000, rpluem@apache.org wrote: >> >>> Author: rpluem >>> Date: Mon Feb 5 12:46:01 2007 >>> New Revision: 503863 >>> >>> URL: http://svn.apache.org/viewvc?view=rev&rev=503863 >>> Log: >>> * Add missing Changelog entry for PR41056 / PR 19954. This was fixed >>> in r480135. >> >> >> It looks like the regression is still present in this code, an EAGAIN >> from the ap_get_brigade() to read the post-chunk CRLF is not handled and >> will be treated as an error, line 295 of http_filters.c >> >> (AFAIK the test suite does not exercise the code paths for a NONBLOCKing >> read of a chunked request body, testing this reliably requires a client >> which drip-feeds bytes to trigger the EAGAIN on the server side on every >> possible read call) >> > > Joe, can you see if the below fixes it: > > Index: http_filters.c > =================================================================== > --- http_filters.c (revision 504180) > +++ http_filters.c (working copy) > @@ -299,7 +299,8 @@ > rv = APR_SUCCESS; > } > - if (rv == APR_SUCCESS) { > + if (rv == APR_SUCCESS || > + (ctx->state == BODY_CHUNK && > (APR_STATUS_IS_EAGAIN(rv))) ) { > /* Read the real chunk line. */ > rv = ap_get_brigade(f->next, bb, AP_MODE_GETLINE, > block, 0); > Wouldn't that do the wrong thing? Suppose we miss the the CRLF in line 295 because it is not available on the wire, but available later during our call to ap_get_brigade in line 304. In this case we would read an empty line where we expect to read the chunk size and we would bail out in line 319 with an error. Joe could you please refresh my mind what was wrong in returning an APR_EAGAIN? We actually do this explicity in line 311. If this is wrong I guess this needs to be fixed there as well. Regards RĂ¼diger