summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/core/utils/httputil.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb
index f1976b5e..3a267da1 100644
--- a/lib/rbot/core/utils/httputil.rb
+++ b/lib/rbot/core/utils/httputil.rb
@@ -389,6 +389,11 @@ class HttpUtil
when :post, :"net::http::post"
new_opts[:method] = :get
end
+ if resp['set-cookie']
+ debug "setting cookie #{resp['set-cookie']}"
+ new_opts[:headers] ||= Hash.new
+ new_opts[:headers]['Cookie'] = resp['set-cookie']
+ end
debug "following the redirect to #{new_loc}"
return get_response(new_loc, new_opts, &block)
else