Merge: Popcorn: use_before, use_after
authorJean Privat <jean@pryen.org>
Thu, 26 May 2016 15:43:35 +0000 (11:43 -0400)
committerJean Privat <jean@pryen.org>
Thu, 26 May 2016 15:43:35 +0000 (11:43 -0400)
This PR introduce two changes in the popcorn request-response cycle:
* Introduce placeholders `use_before` and `use_after` to force handler execution before or after each request. This makes the life of developer easier when using a lot of routers/routers.
* Break response cycle if a between (between as between before and after) handler gives a response then call after_handler. This encourage the use of middleware into `use_before` and `use_after` and avoid requests sent twice. Bonus the api makes more sense like this.

Pull-Request: #2125
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge