class Async::HTTP::Headers

def self.[] value

def self.[] value
	value.downcase.tr('-', '_').to_sym
end

def == other

def == other
	@hash == other.to_hash
end

def [] key

def [] key
	@hash[key]
end

def []= key, value

def []= key, value
	@hash[symbolize(key)] = value
end

def delete(key)

def delete(key)
	@hash.delete(key)
end

def each

def each
	return to_enum unless block_given?
	
	@hash.each do |key, value|
		yield stringify(key), value
	end
end

def freeze

def freeze
	return unless frozen?
	
	@hash.freeze
	
	super
end

def initialize

def initialize
	@hash = {}
end

def inspect

def inspect
	@hash.inspect
end

def stringify(key)

def stringify(key)
	key.to_s.tr('_', '-')
end

def symbolize(value)

def symbolize(value)
	Headers[value]
end

def to_hash

def to_hash
	@hash
end

def to_http_hash

def to_http_hash
	Hash[@hash.map{|key, value| ["HTTP_#{key.to_s.upcase}", value]}]
end