httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1484852 - in /httpd/httpd/trunk: CHANGES modules/http/http_filters.c
Date Wed, 22 May 2013 11:48:44 GMT
I am not saying that the filter should not tolerate LF only as sperator,
but that after the chunk (ie. in the BODY_CHUNK_END state) it should only
accept CRLF (or LF only) and nothing else.

Regards,
Yann.


On Wed, May 22, 2013 at 1:31 PM, Graham Leggett <minfrin@sharp.fm> wrote:

> On 22 May 2013, at 1:06 PM, Yann Ylavic <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 == ';' || c == CR) {
>             ctx->state = 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
> --
>
>

Mime
View raw message