class HTTP::Cookie
def set_cookie_value
missing, RuntimeError is raised. It is always the best to set an
information like a path or domain (when `for_domain` is set) is
Returns a string for use in the Set-Cookie header. If necessary
def set_cookie_value string = cookie_value if @for_domain if @domain string << "; Domain=#{@domain}" else raise "for_domain is specified but domain is unknown" end end if @path if !@origin || (@origin + './').path != @path string << "; Path=#{@path}" end else raise "path is unknown" end if @max_age string << "; Max-Age=#{@max_age}" elsif @expires string << "; Expires=#{@expires.httpdate}" end if @httponly string << "; HttpOnly" end if @secure string << "; Secure" end string end