diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-12 19:02:09 +1300 | 
|---|---|---|
| committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-12 19:02:09 +1300 | 
| commit | 67d43c6357079b638802f4c88b074500bdce8ab2 (patch) | |
| tree | 06f53fae68b35505c26e7f15cf527f922cc14fb5 /lib/rack/utils.rb | |
| parent | 346182b0f3b1e8665bd82ac528add8253df8b27a (diff) | |
| download | rack-spec-response-headers-hash.tar.gz | |
Don't use #transform_keys yet.spec-response-headers-hash
Diffstat (limited to 'lib/rack/utils.rb')
| -rw-r--r-- | lib/rack/utils.rb | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb index 0023dd2a..5e1a3521 100644 --- a/lib/rack/utils.rb +++ b/lib/rack/utils.rb @@ -420,9 +420,16 @@ module Rack        end        def self.normalize(headers) -        headers.transform_keys do |key| -          key.downcase +        # headers.transform_keys do |key| +        #   key.downcase +        # end +         +        # Use transform_keys after dropping Ruby 2.4 support +        hash = {} +        headers.each do |key, value| +          hash[key.downcase] = value          end +        hash        end      end | 
