capotej/finatra — pull request #3 by franklinhu (2012-07-05 23:13:06+00:00)
Title: Fix synchronization/correctness issues

Using a singleton `FinatraResponse` object has a variety of issues:
* Doesn't work for multithreaded applications
* Using a single `resp` allows data to persist across requests if those fields aren't overridden such as:
1. first request hits endpoint rendered with a JSON body
2. second request hits endpoint without a body, but will inherit the previous request's body
* This is fixed by not using an singleton and instantiating a new `FinatraResponse` for each request