CASC-180: Fix the issue with casting to http url connections and provide...

... a default instance for the http url factory.