localshred/protobuf — pull request #150 by liveh2o (2014-02-11 03:46:02+00:00)
Title: Introduce the concept of a middleware stack

In order to make PB more extensible, this introduces the concept of a middleware stack. Building off of #147, the middleware stack is invoked from the server and terminates at the dispatcher.

Add an env object used to pass stuff to/from the middleware:

- Use it in the dispatcher store the response and return it instead
- Use it in the server module to access stats, set the request, and
process the response

// @localshred @abrandoned @brianstien @devin-c