You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ruediger Pluem <rp...@apache.org> on 2021/10/21 11:57:07 UTC
Re: svn commit: r1894423 - /apr/apr/trunk/buckets/apr_brigade.c
On 10/21/21 12:23 AM, minfrin@apache.org wrote:
> Author: minfrin
> Date: Wed Oct 20 22:23:10 2021
> New Revision: 1894423
>
> URL: http://svn.apache.org/viewvc?rev=1894423&view=rev
> Log:
> apr_brigade_split_boundary: Rather than shaving one byte from
> a bucket, ignore the byte instead on the next go-round.
>
> Modified:
> apr/apr/trunk/buckets/apr_brigade.c
>
> Modified: apr/apr/trunk/buckets/apr_brigade.c
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/buckets/apr_brigade.c?rev=1894423&r1=1894422&r2=1894423&view=diff
> ==============================================================================
> --- apr/apr/trunk/buckets/apr_brigade.c (original)
> +++ apr/apr/trunk/buckets/apr_brigade.c Wed Oct 20 22:23:10 2021
> @@ -644,11 +647,7 @@ skip:
> *
> * Bump one byte off, and loop round to search again.
> */
> - apr_bucket_split(e, 1);
> - APR_BUCKET_REMOVE(e);
> - APR_BRIGADE_INSERT_TAIL(bbOut, e);
> -
> - outbytes++;
> + ignore++;
Don't we need to reset ignore to 0 after each
APR_BUCKET_REMOVE(e);
APR_BRIGADE_INSERT_TAIL(bbOut, e);
in the code above as we start with a new bucket then again and should use the what we read from it from the beginning?
Regards
Rüdiger
Re: svn commit: r1894423 - /apr/apr/trunk/buckets/apr_brigade.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 21 Oct 2021, at 12:57, Ruediger Pluem <rp...@apache.org> wrote:
>> *
>> * Bump one byte off, and loop round to search again.
>> */
>> - apr_bucket_split(e, 1);
>> - APR_BUCKET_REMOVE(e);
>> - APR_BRIGADE_INSERT_TAIL(bbOut, e);
>> -
>> - outbytes++;
>> + ignore++;
>
> Don't we need to reset ignore to 0 after each
>
> APR_BUCKET_REMOVE(e);
> APR_BRIGADE_INSERT_TAIL(bbOut, e);
>
> in the code above as we start with a new bucket then again and should use the what we read from it from the beginning?
Talked myself out of needing this, but we do yes.
Regards,
Graham
—