Forum Discussion
Chris_Miller
Altostratus
Aug 09, 2010Rewrite Existing Client Cookie
Let's say a client has a cookie called "sample" with a value of "1" Can an F5 replace the value of the cookie on the client machine? I know it can insert a new cookie with the same name and different ...
hoolio
Cirrostratus
Aug 09, 2010From RFC2109:
4.3.3 Cookie Management
If a user agent receives a Set-Cookie response header whose NAME is
the same as a pre-existing cookie, and whose Domain and Path
attribute values exactly (string) match those of a pre-existing
cookie, the new cookie supersedes the old. However, if the Set-
Cookie has a value for Max-Age of zero, the (old and new) cookie is
discarded. Otherwise cookies accumulate until they expire (resources
permitting), at which time they are discarded.
So you can overwrite an existing cookie value by setting a new cookie with the same name, domain and path as the prior cookie. You can do this in HTTP_RESPONSE using HTTP::cookie insert name < name > value < value >.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects