livedoor/Sledge — pull request #1 by ikari7789 (2014-03-24 06:55:53+00:00)
Title: Content length should be based on the byte size of the content

Content length should be based on the byte size of the content rather than the string length. When working with UTF-8 data stored in hex notation in $content, length reads the hex values as a single character rather than the full length creating a malformed HTTP response.

For example:
$content = "\x{0100}"
length $content = 1
bytes $content = 8