ensure content length set