correct content-length for request bodies