When possible, automatically set 'content-length' header