diff --git a/lib/haste.rb b/lib/haste.rb index 36940d0..7245774 100644 --- a/lib/haste.rb +++ b/lib/haste.rb @@ -25,12 +25,10 @@ module Haste # Upload the and output the URL we get back def start uri = URI.parse server + http = Net::HTTP.new uri.host, uri.port if uri.scheme =~ /^https/ - http = Net::HTTP.new uri.host, uri.port http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE - else - http = Net::HTTP.new uri.host, uri.port end response = http.post '/documents', @input if response.is_a?(Net::HTTPOK)