diff options
Diffstat (limited to 'lib/chef/http/json_input.rb')
-rw-r--r-- | lib/chef/http/json_input.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/http/json_input.rb b/lib/chef/http/json_input.rb index 2fd1501b1d..eaee96d88a 100644 --- a/lib/chef/http/json_input.rb +++ b/lib/chef/http/json_input.rb @@ -27,11 +27,11 @@ class Chef attr_accessor :opts - def initialize(opts={}) + def initialize(opts = {}) @opts = opts end - def handle_request(method, url, headers={}, data=false) + def handle_request(method, url, headers = {}, data = false) if data && should_encode_as_json?(headers) headers.delete_if { |key, _value| key.downcase == "content-type" } headers["Content-Type"] = "application/json" @@ -64,7 +64,7 @@ class Chef # ruby/Net::HTTP don't enforce capitalized headers (it normalizes them # for you before sending the request), so we have to account for all # the variations we might find - requested_content_type = headers.find {|k, v| k.downcase == "content-type" } + requested_content_type = headers.find { |k, v| k.downcase == "content-type" } requested_content_type.nil? || requested_content_type.last.include?("json") end |