Project

General

Profile

Bug #10533 ยป net.http.bug10533-2.patch

mkarnebeek (Michiel Karnebeek), 06/18/2015 08:35 AM

View differences:

lib/net/http.rb
914 914
            @socket.write(buf)
915 915
            HTTPResponse.read_new(@socket).value
916 916
          end
917
          # Server Name Indication (SNI) RFC 3546
918
          s.hostname = @address if s.respond_to? :hostname=
917 919
          if @ssl_session and
918 920
             Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
919 921
            s.session = @ssl_session if @ssl_session
920 922
          end
921
          # Server Name Indication (SNI) RFC 3546
922
          s.hostname = @address if s.respond_to? :hostname=
923 923
          Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect }
924 924
          if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
925 925
            s.post_connection_check(@address)