Cookies again!
[1/3] from: reboler:bol at: 20-Oct-2003 11:35
Hi Folks!,
Do you know how to set multiple cookies in Rebol.. to read and set multiple
cookies.. such as:
Set-Cookie: infgleiglo=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: infgregest=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: infgcodest=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: infgsexo=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: infgnome=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: infgdatnas=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: habilitacookies=ok; path=/
Set-Cookie: infgemail=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Set-Cookie: TEMPMOVID=; expires=Sun, 19-Oct-2003 13:14:34 GMT;
domain=.oglobo.com.br; path=/
Set-Cookie: infgmailparceiros=; expires=Sun, 19-Oct-2003 13:14:34 GMT;
path=/
Set-Cookie: infgmailglobo=; expires=Sun, 19-Oct-2003 13:14:34 GMT; path=/
Thanks in advance,
Best Regards,
--DJ
[2/3] from: SunandaDH:aol at: 20-Oct-2003 12:40
DJ:
> 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
[3/3] from: reboler:bol at: 11-Nov-2003 23:27
Hi Folks!
Sorry to bother you again. But how can I read the
Net-log: ["low level read of " 2048 "bytes"] ?
Net-log: ["low level read of " 2048 "bytes"]
does anybody know what it is? Any people from RT?
I saw with trace all that it is reading a cookie (low level of reading), at
least search for one.. do you know how can I read this?
Because in the end I can get the cookie from http_header.. as you can see..
Net-log: ["Opening" "ssl" "for" "https"]
Net-log: {GET
/entry/default.asp?pagfim=http%3A%2F%2Fwww%2Esite%2Ecom%2Ebr%2Fonline%2Fpais
%2Fdefault%2Easp HTTP/1.0
Accept: */*
Connection: close
User-Agent: Mozilla 4.0
Host: somesite.site.com
}
Net-log: "HTTP/1.1 200 OK"
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
ASPSESSIONIDQSCAABDR=KFJPEKADCKFAIMFMMFBNADFJ; path=/
Any tips?
Thanks in advance
Best Regards,
--DJ