New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix synchronization/correctness issues #3

merged 1 commit into from Jul 9, 2012


2 participants

franklinhu commented Jul 5, 2012

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

capotej added a commit that referenced this pull request Jul 9, 2012

Merge pull request #3 from franklinhu/response_fix
Fix synchronization/correctness issues

@capotej capotej merged commit 04440d4 into twitter:master Jul 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment