You make a very good point. I'll add a check for the port and only fall over to https if the port is 443 or not provided.