Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[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 headers. 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; path=/" print "Set-Cookie2: name=infgregest; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/" ...etc 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: system/options/cgi/other-headers 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" Sunanda