Fixes #144 Use cookie jar to prevent infinite redirections loop
This commit is contained in:
@@ -180,8 +180,11 @@ class Browser
|
||||
end
|
||||
|
||||
# Disable SSL-Certificate checks
|
||||
params = params.merge(ssl_verifypeer: false)
|
||||
params = params.merge(ssl_verifyhost: 0)
|
||||
params.merge!(ssl_verifypeer: false)
|
||||
params.merge!(ssl_verifyhost: 0)
|
||||
|
||||
params.merge!(cookie_jar: CACHE_DIR + '/cookie-jar')
|
||||
params.merge!(cookie_file: CACHE_DIR + '/cookie-jar')
|
||||
|
||||
params
|
||||
end
|
||||
|
||||
@@ -47,6 +47,20 @@ module Typhoeus
|
||||
end
|
||||
end
|
||||
|
||||
module Ethon
|
||||
class Easy
|
||||
module Options
|
||||
def cookie_jar=(value)
|
||||
Curl.set_option(:cookiejar, value_for(value, :string), handle)
|
||||
end
|
||||
|
||||
def cookie_file=(value)
|
||||
Curl.set_option(:cookiefile, value_for(value, :string), handle)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Override for puts to enable logging
|
||||
def puts(o = '')
|
||||
# remove color for logging
|
||||
|
||||
Reference in New Issue
Block a user