Handling "puts" stmts. from external libraries w/Apache+FCGI


Rails 1.1.6
Apache 2

I recently ran into an issue where an external library generated a
“puts” statement which caused the connection to one of my FCGI processes
to break because Apache flipped out about the malformed header (the
argument to the puts statement). The browser never was updated as a

Is there a generic way for me to “catch” puts statements that are
introduced by other libraries before they cause such a connection
breakage as Apache attempts to stream them back as part of the HTML
response? Some way to validate response.body perhaps?

Would this issue also exist if I were a good boy and using Mongrel like
I should be?