module Rack::Utils
def set_cookie_header!(headers, key, value)
If the headers already contains a +set-cookie+ key, it will be converted
+value+ using set_cookie_header.
Append a cookie in the specified headers with the given cookie +key+ and
set_cookie_header!(headers, key, value) -> header value
:call-seq:
def set_cookie_header!(headers, key, value) if header = headers[SET_COOKIE] if header.is_a?(Array) header << set_cookie_header(key, value) else headers[SET_COOKIE] = [header, set_cookie_header(key, value)] end else headers[SET_COOKIE] = set_cookie_header(key, value) end end