httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Apache 2.0 beta STATUS
Date Mon, 22 Jan 2001 06:40:18 GMT

> > In it's current form, it requires the module author to actually call
> > apr_brigade_flush.  This was a design choice on my part.  I have detailed
> > how this can be hidden from the module author, but I disagree that we
> > should.
> Can this be done for -apache- without affecting the 'pure'
> apr implementation?  Such that apache users are allowed to
> believe that it's 'just like the old apache' only better,
> while apr folks don't have the overhead when developing
> a new app?

Because apr_brigade_flush is so cheap, yes.  All we need to do is

#define APR_BRIGADE_INSERT_TAIL(b, e)                                   \
        APR_RING_INSERT_TAIL(&(b)->list, (e), apr_bucket, link)


#define APR_BRIGADE_INSERT_TAIL(b, e)                                   \
	apr_brigade_flush(b);						\
        APR_RING_INSERT_TAIL(&(b)->list, (e), apr_bucket, link)

This adds either a function call and one if statement, or a function
call one if statement and a bucket creation/insertion.  Depending on if
there is anything in the brigade's buffer or not.

We would also need to change any other macros that insert at the end of
the brigade.  From my very fast inspection, I believe that is just the
INSERT_TAIL and the CONCAT macros.

Of course, this isn't a fail-safe, people would need to use the r->bb
brigade in their handler *only* for this to work at all.  In filters, they
still use which every brigade they were always using.  If they don't use
r->bb in their handler, they will just find that they can not mix the two
API's without a lot of care.

Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message