Skip to content

Commit

Permalink
fix decode preference, cleanup pass_cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed May 23, 2011
1 parent b223b47 commit ddfb713
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/em-http/http_client_options.rb
Expand Up @@ -9,7 +9,6 @@ def initialize(uri, options, method)
@keepalive = options[:keepalive] || false # default to single request per connection
@redirects = options[:redirects] ||= 0 # default number of redirects to follow
@followed = options[:followed] ||= 0 # keep track of number of followed requests
@decoding = options[:decoding] || true # auto-decode compressed response

@method = method.to_s.upcase
@headers = options[:head] || {}
Expand All @@ -20,8 +19,8 @@ def initialize(uri, options, method)
@file = options[:file]
@body = options[:body]

@pass_cookies = options[:pass_cookies]
@pass_cookies = true if @pass_cookies.nil?
@pass_cookies = options.fetch(:pass_cookies, true) # pass cookies between redirects
@decoding = options.fetch(:decoding, true) # auto-decode compressed response

set_uri(uri)
end
Expand Down

0 comments on commit ddfb713

Please sign in to comment.