set content length correctly for unicode
Merge pull request #593 from dimagi/content-length

set content length correctly for unicode