httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_core.c http_protocol.c
Date Tue, 14 Nov 2000 04:06:52 GMT
On Mon, 13 Nov 2000, Bill Stoddard wrote:

> > >        }
> > >
> > >        if (pass_the_brigade) {
> > >   -        /* Insert ctx->buf into the correct spotin the brigade */
> > >   +        /* Insert ctx->buf into the correct spot in the brigade */
> > >            if (insert_first) {
> > >   -            e = ap_bucket_create_pool(ctx->buf, ctx->cnt, p);
> > >   +            e = ap_bucket_create_heap(ctx->buf, ctx->cnt, 1, NULL);
> >
> > You can't do this.  This buffer was allocated out of a pool.  If you use a
> > heap bucket for this, then when the pool goes away so does the data, even
> > if it wasn't sent to the network yet.
> 
> Nope, will not happen. Arg 3 tells ap_bucket_create_heap to malloc the storage and copy
buf into it.

Then why are you bothering to palloc the data?  Just malloc and copy it
once.  Then, you can do a one copy instead of two.

> > >   +        /* The coalesce filter is useful to coalesce content from the ap_r*
> > >   +         * routines. Removing this filter should not break the server.
> > >   +         */
> > >   +        ap_add_output_filter("COALESCE", NULL, r, r->connection);
> > >   +
> >
> > If this filter is really useful, then it should go in regardless of
> > whether we are doing chunking or not.  If it isn't useful, then it should
> > be removed and the underlying problems should be solved.
> >
> 
> Heh, heh, this advice from you? :-)

Personally, I want to see this filter removed completely, but if it is
going to go into the server, it should be a universal thing.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message