module Rack::Utils

def add_cookie_to_header(header, key, value)

def add_cookie_to_header(header, key, value)
  warn("add_cookie_to_header is deprecated and will be removed in Rack 3.1", uplevel: 1)
  case header
  when nil, ''
    return set_cookie_header(key, value)
  when String
    [header, set_cookie_header(key, value)]
  when Array
    header + [set_cookie_header(key, value)]
  else
    raise ArgumentError, "Unrecognized cookie header value. Expected String, Array, or nil, got #{header.inspect}"
  end
end