Class: Rack::Utils::HeaderHash

Inherits:
Object
  • Object
show all
Defined in:
lib/rack-oauth.rb

Overview

For some reason, getting the location our of a HeaderHash doesn’t always work!

sometimes you can see the header key/value in the HeaderHash, but you can’t get it out!

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rack-oauth.rb', line 9

def [] key
  if not has_key?(key)
    hash = to_hash
    hash.keys.each do |hash_key|
      if hash_key.downcase == key.downcase
        return hash[hash_key]
      end
    end
  end
  super
end