set content-type only if body length > 0