Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B990D1FF for ; Wed, 22 May 2013 11:31:58 +0000 (UTC) Received: (qmail 79251 invoked by uid 500); 22 May 2013 11:31:57 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 79135 invoked by uid 500); 22 May 2013 11:31:57 -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 79109 invoked by uid 99); 22 May 2013 11:31:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 11:31:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of minfrin@sharp.fm designates 174.143.229.200 as permitted sender) Received: from [174.143.229.200] (HELO chandler.sharp.fm) (174.143.229.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 11:31:51 +0000 Received: from chandler.sharp.fm (localhost [127.0.0.1]) by chandler.sharp.fm (Postfix) with ESMTP id 79C2393804D for ; Wed, 22 May 2013 06:31:30 -0500 (CDT) Received: from [10.100.35.112] (83-244-153-144.cust-83.exponential-e.net [83.244.153.144]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: minfrin@sharp.fm) by chandler.sharp.fm (Postfix) with ESMTP id 573B1338CAA for ; Wed, 22 May 2013 06:31:28 -0500 (CDT) From: Graham Leggett Content-Type: multipart/alternative; boundary="Apple-Mail=_0D020BAA-8567-41AE-8E11-119710002918" Message-Id: <915A3145-3C8B-450E-9286-CF64054F0B7D@sharp.fm> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r1484852 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c Date: Wed, 22 May 2013 13:31:27 +0200 References: To: dev@httpd.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1503) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_0D020BAA-8567-41AE-8E11-119710002918 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 22 May 2013, at 1:06 PM, Yann Ylavic wrote: > On 05/14/2013 08:58 PM, minfrin@apache.org wrote: > > Author: minfrin=20 > > Date: Tue May 21 16:10:02 2013=20 > > New Revision: 1484852=20 > > > > URL: http://svn.apache.org/r1484852=20 > > Log:=20 > > core: Remove apr_brigade_flatten(), buffering and duplicated code=20 > > from the HTTP_IN filter, parse chunks in a single pass with zero = copy.=20 > > Reduce memory usage by 48 bytes per request.=20 > > > > Modified:=20 > > httpd/httpd/trunk/CHANGES=20 > > httpd/httpd/trunk/modules/http/http_filters.c=20 >=20 > Shouldn't the BODY_CHUNK_END state only accept [CR]LF ? > Currently anything but a LF is ignored. Yep, as is pointed out in this comment: /* handle a chunk part, or a chunk extension */ /* * In theory, we are supposed to expect CRLF only, but our * test suite sends LF only. Tolerate a missing CR. */ if (c =3D=3D ';' || c =3D=3D CR) { ctx->state =3D BODY_CHUNK_EXT; } Our test suite uses LF instead of CRLF as a chunk terminator in many = cases, and we don't know what code in the wild depends on this = behaviour. This isn't something we're going to fix easily. Regards, Graham -- --Apple-Mail=_0D020BAA-8567-41AE-8E11-119710002918 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 ylavic.dev@gmail.com> = wrote:
On 05/14/2013 08:58 = PM, minfrin@apache.org = wrote:
> Author: minfrin
> = Date: Tue May 21 16:10:02 2013
> New Revision: 1484852
= >
> URL: http://svn.apache.org/r1484852 =
> Log:
> core: Remove apr_brigade_flatten(), buffering and = duplicated code
> from the HTTP_IN filter, parse chunks in a = single pass with zero copy.
> Reduce memory usage by 48 bytes per = request.
>
> Modified:
> httpd/httpd/trunk/CHANGES
> = httpd/httpd/trunk/modules/http/http_filters.c
=
Shouldn't the = BODY_CHUNK_END state only accept [CR]LF ?
Currently anything = but a LF is = ignored.

Yep,= as is pointed out in this comment:

  =       /* handle a chunk part, or a chunk extension = */
        /*
    =      * In theory, we are supposed to expect CRLF only, = but our
         * test suite sends = LF only. Tolerate a missing CR.
        =  */
        if (c =3D=3D ';' || c =3D=3D= CR) {
            ctx->state = =3D BODY_CHUNK_EXT;
        = }

Our test suite uses LF instead of CRLF as a = chunk terminator in many cases, and we don't know what code in the wild = depends on this behaviour. This isn't something we're going to fix = easily.

Regards,
Graham
--

= --Apple-Mail=_0D020BAA-8567-41AE-8E11-119710002918--