add content length if missing