throw exception when no content length