Fix handling of URLs containing :// in the path

fixes #2421