XHR: Consistently resolve url.