This patch changes the tryRapi function so that if the http request succeeded, we don't try https too.