Project

General

Profile

Backport #229 ยป cgi_cookie.patch

NoKarma (Arthur Schreiber), 07/07/2008 07:37 AM

View differences:

lib/cgi.rb (Arbeitskopie)
super(@value)
end
attr_accessor("name", "value", "path", "domain", "expires")
attr_reader("secure")
attr_accessor("name", "path", "domain", "expires")
attr_reader("secure", "value")
# Set whether the Cookie is a secure cookie or not.
#
......
@secure = val if val == true or val == false
@secure
end
def value=(val)
@value.replace(Array(val))
end
# Convert the Cookie to its string representation.
def to_s
buf = ""
buf += @name + '='
if @value.kind_of?(String)
buf += CGI::escape(@value)
else
buf += @value.collect{|v| CGI::escape(v) }.join("&")
end
buf += @value.map { |v| CGI::escape(v) }.join("&")
if @domain
buf += '; domain=' + @domain
    (1-1/1)