| 20/38 |
© 2004 by Philippe "BooK" Bruhat.
|
HTTP::Proxy's buffering system is what makes the HTTP::Proxy::BodyFilter::tags filter possible.
Each body filter is passed a reference to an empty string where it can store data that will be prepended to the next chunk of data
You can keep stuff in memory for later use (for example that annoying half-tag)
After the last chunk is received, the proxy passes a reference to
"" to the filters, so as to empty all the buffers. The reference
to the buffer is then undef, so the filters know it's the last time
they are called for this message.