Cookie Problem
Tim Ahearn
tahearn at cjp.com
Wed Feb 6 12:50:07 PST 2002
A week or so ago I had reported a problem using the
webserver.util.setCookie verb:
> I'm using webserver.util.setCookie in a script to set two cookies. So
> there are two successive calls of the verb.
>
> Only the first cookie (the first call of webserver.util.setCookie) is
> being set. The second call has no effect.
To be more specific when using the following code, only the first cookie
gets set:
webserver.util.setCookie (pta, "journalIP", ip, ".somedomain.com",
cookieExp, "/")
webserver.util.setCookie (pta, "journalURL", pta^.url + "$" +
pta^.pathArgs, ".somedomain.com", cookieExp, "/")
But when I use the below code, both cookies are set correctly:
s = "journalIP=" + ip + "; domain=.somedomain.com; expires=" +
date.netStandardString(cookieExp) + "; path=/\r\n"
s = s + "Set-Cookie: journalURL=" + string.urlencode(pta^.url + "$" +
pta^.pathArgs) + "; domain=.somedomain.com; expires=" +
date.netStandardString(cookieExp) + "; path=/"
pta^.responseHeaders.["Set-Cookie"] = s;
Just thought someone might be interested.
--
Tim Ahearn
tahearn at cjp.com
More information about the Frontier-Users
mailing list