Fixes #144 Use cookie jar to prevent infinite redirections loop

This commit is contained in:
erwanlr
2013-04-09 00:25:47 +02:00
parent 3565b25719
commit 333c52ac45
3 changed files with 29 additions and 4 deletions

View File

@@ -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