Ensure content length is parsed as an int.