httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: httpd-2.0/server protocol.c
Date Fri, 06 Jul 2001 13:59:13 GMT
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



Mime
View raw message