httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Tue, 17 Oct 2000 20:22:20 GMT
rbb@covalent.net writes:

> >   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
> >   
> 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.

Here is the problem I encountered:

  we enter http_filter() in body mode with the following data saved in ctx->b

   +-------------------+---------------------+
   | body of request 1 | header of request 2 |
   +-------------------+---------------------+

  the input brigade is allocated from the request pool

  we concatenate this data into the request pool brigade, but then
  figure out where the body ends and do ap_brigade_split() to put the
  request 2 stuff in a different brigade

  ap_brigade_split() allocates the new brigade from the same pool as
  the first brigade...

> Does that make any sense at all?

yes, I think your solution will be fine...  we'll let http_filter()
use the same brigade always...  it will move buckets into the caller's
brigade as necessary

I'll commit this shortly...
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message