Forum Discussion
Deb_Allen_18
May 31, 2006Historic F5 Account
Extracting a specific Set-Cookie header in HTTP_RESPONSE
(This is a followup to this post: Click here)
How can I extract the value of a specific Set-Cookie header?
I'm trying to use a cookie for universal persistence, but I could not find a way to f...
apara_5691
Nimbostratus
Aug 10, 2011A little bit late but, this code works for me 😉
when HTTP_RESPONSE {
First of all, we check if a Set-cookie header exists
if { [HTTP::header count "Set-cookie" ] > 0 } {
set all_set_cookies [HTTP::header "Set-cookie"
foreach one_set_cookie $all_set_cookies {
Whe are looking for a cookie named "myCookie"
if { $one_set_cookie contains "myCookie" } {
Whatever you want to do with "myCookie" ;)
}
}
}
}Regards!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
