use .byteLength() when determining content-length