utilities for URL resolution and parsing