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_protocol.c
Date Tue, 17 Oct 2000 18:05:09 GMT

>   ap_get_client_block():
>     "fix" the pool for the brigade used by ap_get_client_block() to
>     save its state; this allows pipelined requests to work
>   
>   Revision  Changes    Path
>   1.185     +9 -4      apache-2.0/src/main/http_protocol.c
>   
>   Index: http_protocol.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
>   retrieving revision 1.184
>   retrieving revision 1.185
>   diff -u -r1.184 -r1.185
>   --- http_protocol.c	2000/10/17 17:26:46	1.184
>   +++ http_protocol.c	2000/10/17 17:53:09	1.185
>   @@ -2477,7 +2474,15 @@
>        ap_bucket_brigade *bb = conf->bb;
>    
>        if (!bb) {
>   -        conf->bb = bb = ap_brigade_create(r->pool);
>   +        /* XXX Yes, the pool for this brigade looks funky.  Right now it is
>   +         * allocated from the connection pool instead of the request pool 
>   +         * because HTTP_IN will sometimes split one of these brigades, with
>   +         * the second part of the brigade holding data belonging to another 
>   +         * request.  Since AP_BRIGADE_SPLIT() uses the same pool as the 
>   +         * original brigade, we need to use a pool that won't be cleaned up 
>   +         * until any subsequent requests on this connection are done.
>   +         */
>   +        conf->bb = bb = ap_brigade_create(r->connection->pool);
>        }
>    
>        do {

I'm confused.  The brigade that is passed down is just used to get
information back up to this level.  The brigade that is holding data for
multiple requests and will be split is allocated from the conn_rec is
core_input_filter. <checking the code.....>

Okay, the problem is when we do the AP_BRIGADE_CONCAT in http_filter, we
end up tossing the brigade that has the correct lifetime in favor of the
one with the wrong lifetime.  Hmmmmm......  I think that is the
problem.  We shouldn't be doing a CONCAT in http_filter.  http_filter
should do a read from the original brigade and then move the buckets from
the original brigade to the new one.

Does that make any sense at all?

Ryan

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


Mime
View raw message