[REBOL] Re: Cookies again!
From: SunandaDH:aol at: 20-Oct-2003 12:40
> Do you know how to set multiple cookies in Rebol.. to read and set multiple
> cookies.. such as:
These are mainly Cookie-2 specification cookies. You set them by printing a
set-cookie2 header for each before the blank line that separates HTML from
You are missing the name= part of your cookies -- I think that's mandatory.
So something like:
print "Set-Cookie2: name=infgleiglo; expires=Sun, 19-Oct-2003 13:14:34 GMT;
print "Set-Cookie2: name=infgregest; expires=Sun, 19-Oct-2003 13:14:34 GMT;
print "Content-type: text/html^/" ;; has a new line at the end
Subsequent 'print will be your HTML or whatever the user-agent is expecting,
To read them back in a CGI program, they will be in:
I *think* the two types of cookie are held separately as strings. So:
type-1-cookies: select system/options/cgi/other-headers "HTTP_COOKIE"
type-2-cookies: select system/options/cgi/other-headers "HTTP_COOKIE2"