Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 500 error on overly-large API request body
Paster doesn't mind unicode responses, but gunicorn wants byte strings only: Error handling request Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 131, in handle_request resp.write(item) File "/usr/lib/python2.7/dist-packages/gunicorn/http/wsgi.py", line 283, in write assert isinstance(arg, binary_type), "%r is not a byte." % arg AssertionError: u'{' is not a byte. See https://gist.github.com/JordanMilne/4a7d1b5eb317e607479b for repro
- Loading branch information