Quote:
Originally Posted by phsythax
Cookie: CAD=1359454%231197828980%230%230%23%230; T3E=%3D%3DwN0czN6ITM3AzM4cT....... (cute)
What is this CAD-thing? Does it have anything to do with the expire date of the cookie? How do i generate this?
|
Umm… that’s part of the cookie. Cookies come as attribute-value pairs, where you have something like this initially sent by the server:
Code:
Set-Cookie: foo=bar
And the client (i.e., browser) must respond with this:
in every subsequent request.
As for expiry and sessions, you can (on the server side) do things like this:
Code:
Set-Cookie: foo=bar; expires=date; path=/; domain=baz.org; secure
Date is in RFC-822 format (“
Wdy, DD-Mon-YYYY HH:MM:SS GMT”), path is the path for which the cookie response is requested, and domain is the domain for which the cookie is desired. Secure means that the cookie should be transmitted back only through secure (i.e., https) communication.
You should read the relevant standards before trying to come up with a compliant client.