You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <cl...@yahoo.com> on 2001/07/06 15:59:13 UTC

Re: cvs commit: httpd-2.0/server protocol.c

On 6 Jul 2001 stoddard@apache.org wrote:

>   +            if (APR_BUCKET_IS_EOS(e)) {
>   +                eos = 1;
>   +            }
>   +            else if (APR_BUCKET_IS_FLUSH(e)) {
>   +                if (partial_send_okay) {
>   +                    split = b;
>   +                    more = apr_brigade_split(b, e);
>   +                    /* Remove the flush bucket from brigade 'more' */
>   +                    APR_BUCKET_REMOVE(e);
>   +                    flush = 1;
>   +                    break;
>                    }

Instead of removing the flush bucket from more, shouldn't you keep it as
the last bucket of b?  So in other words, just do this:

    else if (APR_BUCKET_IS_FLUSH(e)) {
        if (partial_send_okay) {
            split = b;
            more = apr_brigade_split(b, APR_BUCKET_NEXT(e));
            flush = 1;
            break;
        }
        ...


>   +            if (flush) {
>   +                rv = ap_fflush(f->next, split);
>   +            }
>   +            else {
>   +                rv = ap_pass_brigade(f->next, split);
>   +            }

That way these two cases can be the same (assuming you add a few lines to
insert a flush bucket in the other case where you set flush = 1 besides
the one I just commented on).  I guess it doesn't matter all that much,
you get the correct result either way (namely, a flush bucket at the end
of the brigade you're sending down).  It's just that right now in one case
you already had a flush bucket and you're destroying it and creating a new
one.  <shrug>


The patch in general looks good to me.  =-)

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: cvs commit: httpd-2.0/server protocol.c

Posted by Bill Stoddard <bi...@wstoddard.com>.
That will work. Thanks for the suggestion.

Bill

----- Original Message ----- 
From: "Cliff Woolley" <cl...@yahoo.com>
To: <ne...@apache.org>
Sent: Friday, July 06, 2001 9:59 AM
Subject: Re: cvs commit: httpd-2.0/server protocol.c


> On 6 Jul 2001 stoddard@apache.org wrote:
> 
> >   +            if (APR_BUCKET_IS_EOS(e)) {
> >   +                eos = 1;
> >   +            }
> >   +            else if (APR_BUCKET_IS_FLUSH(e)) {
> >   +                if (partial_send_okay) {
> >   +                    split = b;
> >   +                    more = apr_brigade_split(b, e);
> >   +                    /* Remove the flush bucket from brigade 'more' */
> >   +                    APR_BUCKET_REMOVE(e);
> >   +                    flush = 1;
> >   +                    break;
> >                    }
> 
> Instead of removing the flush bucket from more, shouldn't you keep it as
> the last bucket of b?  So in other words, just do this:
> 
>     else if (APR_BUCKET_IS_FLUSH(e)) {
>         if (partial_send_okay) {
>             split = b;
>             more = apr_brigade_split(b, APR_BUCKET_NEXT(e));
>             flush = 1;
>             break;
>         }
>         ...
> 
> 
> >   +            if (flush) {
> >   +                rv = ap_fflush(f->next, split);
> >   +            }
> >   +            else {
> >   +                rv = ap_pass_brigade(f->next, split);
> >   +            }
> 
> That way these two cases can be the same (assuming you add a few lines to
> insert a flush bucket in the other case where you set flush = 1 besides
> the one I just commented on).  I guess it doesn't matter all that much,
> you get the correct result either way (namely, a flush bucket at the end
> of the brigade you're sending down).  It's just that right now in one case
> you already had a flush bucket and you're destroying it and creating a new
> one.  <shrug>
> 
> 
> The patch in general looks good to me.  =-)
> 
> --Cliff
> 
> 
> --------------------------------------------------------------
>    Cliff Woolley
>    cliffwoolley@yahoo.com
>    Charlottesville, VA
> 
>