content length fix

String length is the number of unicode characters, which doesn`t match content length in bytes. This mismatch caused content-length related errors while posting characters above ASCII.