I cud write a filters without any difficult, when doing something on request. If I need to write something for response, then there are some more additional tasks I need to do. Being a lazy fundoo, I just stopped with reading, have not implemented it anywhere. Luckily I got an opportunity to implement in our own product itself.
please have a look at http://www.orionserver.com/tutorials/filters/3.html for a response filter. A structured way of explaining the concept.