getsentry/raven-python — pull request #411 by reorx (2014-01-08 09:51:45+00:00)
Title: Add body size limitation for tornado mixin

Recently I am working on a project that use tornado to handle file uploading, raven failed to send the report for exceptions happened during the uploading process, the traceback shows that when raven trying to encode the collected data:

```python
# base.py line 570
return base64.b64encode(zlib.compress(json.dumps(data).encode('utf8')))
```

encode utf8 failed and raised a `UnicodeEncodeError`.

I think it would be better if we set a limitation for the body size when getting request data, or just don't get the body if there's file in request, to avoid encoding problems caused by binary data.