Fixes #173. Handle mixed-case header lookups better
git-svn-id: file:///home/svn/framework3/trunk@5271 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
481bc3fbd5
commit
af9407e7b0
|
@ -58,12 +58,17 @@ class Packet::Header < Hash
|
|||
#
|
||||
def [](key)
|
||||
begin
|
||||
if ((rv = self.fetch(key)) == nil)
|
||||
rv = self.dcase_hash[key.downcase]
|
||||
end
|
||||
rv = self.fetch(key)
|
||||
rescue IndexError
|
||||
rv = nil
|
||||
end
|
||||
if (rv == nil)
|
||||
begin
|
||||
rv = self.dcase_hash[key.downcase]
|
||||
rescue IndexError
|
||||
rv = nil
|
||||
end
|
||||
end
|
||||
|
||||
return rv
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue