Might want a couple more test cases to verify more complex URLs, i.e. with querystring and possibly fragment.