Steve_Brown_882
Feb 03, 2012Historic F5 Account
Rewriting cookies
Hey Guys,
I am working on an irule to rewrite cookies on a site with httponly and secure flags set but getting an error on the http only flag sometimes. The rule is below...and this is v11.1
when HTTP_RESPONSE {
set cookie_names [HTTP::cookie names]
if { $cookie_names ne "" } {
foreach cookie $cookie_names {
HTTP::cookie httponly $cookie enable
HTTP::cookie secure $cookie enable
log local0. "The cookie $cookie was found and attributes modified."
}
}
The error I am seeing in the logs is here...
TCL error: /Common/cookie_rewrite - Improper version (line 4) invoked from within "HTTP::cookie httponly $cookie enable" ("foreach" body line 2) invoked from within "foreach cookie $cookie_names { HTTP::cookie httponly $cookie enable HTTP::cookie secure $cookie enable ..."
When I comment out the HTTP::cookie httponly $cookie enable line everything works fine and I succesfully rewrite the secure attr.
Any ideas?