From 0489fa98abb1d2c45fa92b87000e0514cad51442 Mon Sep 17 00:00:00 2001 From: Chetan Sarva Date: Tue, 26 Aug 2014 15:55:46 -0400 Subject: [PATCH] workaround for cURL related crashes on some systems --- lib/httpi/adapter/curb.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/httpi/adapter/curb.rb b/lib/httpi/adapter/curb.rb index eab749c..d3fb253 100644 --- a/lib/httpi/adapter/curb.rb +++ b/lib/httpi/adapter/curb.rb @@ -75,6 +75,10 @@ def basic_setup @client.connect_timeout = @request.open_timeout if @request.open_timeout @client.headers = @request.headers.to_hash @client.verbose = false + # cURL workaround + # see: http://stackoverflow.com/a/10755612/102920 + # https://github.com/typhoeus/typhoeus/issues/260 + @client.set(:NOSIGNAL, true) end def setup_http_auth @@ -105,7 +109,7 @@ def setup_ssl_auth @client.ssl_verify_peer = ssl.verify_mode == :peer end - + @client.ssl_version = case ssl.ssl_version when :TLSv1 then 1 when :SSLv2 then 2