class Async::HTTP::Headers
def merge(hash, key, value)
def merge(hash, key, value) if policy = MERGE_POLICY[key] if current_value = hash[key] current_value << value else hash[key] = policy.new(value) end else raise ArgumentError, "Header #{key} can only be set once!" if hash.include?(key) # We can't merge these, we only expose the last one set. hash[key] = value end end