lib/patron/request.rb in patron-0.4.2 vs lib/patron/request.rb in patron-0.4.3
- old
+ new
@@ -38,11 +38,11 @@
@timeout = 0
@connect_timeout = 0
@max_redirects = -1
end
- attr_accessor :url, :username, :password, :file_name, :proxy, :auth_type
+ attr_accessor :url, :username, :password, :file_name, :proxy, :auth_type, :insecure
attr_reader :action, :timeout, :connect_timeout, :max_redirects, :headers
attr_reader :auth_type
# Set the type of authentication to use for this request.
#
@@ -86,18 +86,18 @@
@action = new_action
end
def timeout=(new_timeout)
- if new_timeout.to_i < 1
+ if new_timeout && new_timeout.to_i < 1
raise ArgumentError, "Timeout must be a positive integer greater than 0"
end
@timeout = new_timeout.to_i
end
def connect_timeout=(new_timeout)
- if new_timeout.to_i < 1
+ if new_timeout && new_timeout.to_i < 1
raise ArgumentError, "Timeout must be a positive integer greater than 0"
end
@connect_timeout = new_timeout.to_i
end