use byteLength when calculating content-length
Merge pull request #46 from karlbohlmark/json-response-length

use byteLength when calculating content-length