Merging in upstream fixes for parse_urls