[Zope] Set and Detect Cookies in same call?

Jim Kutter zope-list@ebizq.net
Mon, 21 Oct 2002 13:17:48 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_003C_01C27904.407F7480
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have searched high and low for an answer, and haven't found one yet:

Is it possible to set a cookie, then detect if it got set properly =
immediately after? Or do I have to set it in one call, then detect it in =
another?

It seems that setCookie puts the "cookie" variable into the request =
object regardless if cookies are enabled, so a later in the same call, =
calling cookies.has_key always returns true. Is this what's happening?

Thanks

-jim
------=_NextPart_000_003C_01C27904.407F7480
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have searched high and low for an =
answer, and=20
haven't found one yet:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is it possible to set a cookie, then =
detect if it=20
got set properly immediately after? Or do I have to set it in one call, =
then=20
detect it in another?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It seems that setCookie puts the =
"cookie" variable=20
into the request object regardless if cookies are enabled, so a =
later&nbsp;in=20
the same call, calling&nbsp;cookies.has_key always returns true. Is this =
what's=20
happening?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-jim</FONT></DIV></BODY></HTML>

------=_NextPart_000_003C_01C27904.407F7480--