A good test of the middleware system would be to implement gzip compression as middleware (transforming the body and headers on the way in/out).