lib/http/protocol/headers.rb in http-protocol-0.6.1 vs lib/http/protocol/headers.rb in http-protocol-0.6.2
- old
+ new
@@ -194,22 +194,24 @@
else
@fields == other.fields
end
end
+ # Used for merging objects into a sequential list of headers. Normalizes header keys and values.
class Merged
def initialize(*all)
@all = all
end
def << headers
@all << headers
end
+ # @yield [String, String] header key (lower case) and value (as string).
def each(&block)
@all.each do |headers|
headers.each do |key, value|
- yield key, value.to_s
+ yield key.downcase, value.to_s
end
end
end
end
end