curl: slight refactor.