How do I use mod_perl2 and Apache Bucket Brigades?

0

Issue

I’m writing an application to do proxying and rewriting of webpages on the fly and am pretty settled on using mod_perl2 – there is an existing implementation using mod_perl (v1) that I’m working from. In mod_perl2, there’s this idea of APR::Brigades and APR::Buckets which, from my vague understanding, are an efficient way to do the sort of filtering & rewriting that I want. I can’t, however, find anything but the Perldoc pages for these modules, so I’m really quite unsure how to utilize them.

Can anyone explain mod_perl2 Bucket Brigades to me, point me to a tutorial, or even show me some open-source app that uses mod_perl2 that I could learn from?

Solution

Buckets and Brigades are native concept to the Apache Portable Runtime. You’ll find ample examples of the native API, with a HTTP-specific slant, in the source code for Apache HTTP Server modules like mod_proxy, mod_deflate, and mod_substitute.

See the filter info here:
http://www.apachetutor.org/dev/#filter

Then take a peek at the previously mentioned Apache HTTP Server modules.

There seems to be a simple perl-specific filter here:

http://perl.apache.org/docs/2.0/user/handlers/filters.html#Bucket_Brigade_based_Output_Filters

Answered By – covener

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More