airbrake/airbrake — pull request #81 by brainopia (2012-04-09 14:21:07+00:00)
Title: Fix encoding issue

You have to use `String#bytesize` method to get correct length in bytes. Rack and Rails already uses this method to set Content-Length when needed, but airbrake uses `String#length`.

There is an easy case to see the problem, given rails application replace text in public/500.html with symbols outside standard ASCII. Then trigger exception in your rails application and you'll get truncated 500 page because `String#length` reports number of symbols instead of bytes.