Forum Discussion
Feb 09, 2011
logging each cookie name failing in logs
Hello all, The below code is throwing an error in the logs: when HTTP_REQUEST { set cookies [HTTP::cookie names] foreach cookie $::cookies { log local0. "Cookie: $...
Feb 16, 2011
Aaron, do you know why this example is deleting the cookie in the HTTP_REQUEST function?
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__cookie.html
Example:
Rename a cookie by inserting a new cookie name with the same value as the original. Then remove the old cookie.
when HTTP_REQUEST {
Check if old cookie exists in request
if { [HTTP::cookie exists "old-cookie-name"] } {
Insert a new cookie with the new name and old cookie's value
HTTP::cookie insert name "new-cookie-name" value [HTTP::cookie value "old-cookie-name"]
Remove the old cookie
HTTP::cookie remove "old-cookie-name"
}
}
Let me know your thoughts.
Thanks.
Regards,
TRX
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