Fix for bug in Url generation for HTTPS routes

I've added the corresponding test.

Without the proposed fix, the URL that gets generated is `https://sub.foo.com:443/foo/bar` (notice the superfluous `443`)