Allow http => https redirection, see bugs.ruby-lang.org/issues/859 to 1.8.7 for rough outline of change.