Switched json.length to Buffer.byteLength(json,'utf8')

This fixes a problem for sanitizing when there is multi-byte unicode content in the data. json.length will count "letters", rather than bytes, so Content-Length was able to be lower than the actual number of bytes transmitted.