Forum Discussion
cookie not getting set using HTTP::cookie
I have a rule that is setting a cookie in an HTTP_REQUEST event before handing the request to the server. This is working on my development unit but the cookie fails to set on my production unit.
There are a couple of differences between development and production. Development is a BigIP 1500 running 9.4.7. Production is a BigIP 1600 9.4.8.
Here is what my rule is doing:
when HTTP_REQUEST {
if { not ( [HTTP::cookie language] equals $user_selected_language ) } {
HTTP::cookie language $user_selected_language
HTTP::cookie update_language 1
}
}
Again, this is working on 9.4.7 but fails to set the cookie "language" on 9.4.8. I have added logging lines to my rule and have verified that the $user_selected_language has some value in every case (so I left that part of the rule out). I tried checking for the existence of the cookie and doing an HTTP::cookie insert name "language" value "$user_selected_language" if the cookie didn't exists. That didn't do anything. If it is any help, the cookie doesn't exist.
I read through the 9.4.8 release notes and found something about a trailing semicolon getting inserted by the HTTP::cookie insert command. I didn't think that was happening in my case but I tried the workaround detailed in the release notes but that didn't help.
Any ideas? Any ideas of what to try next?
Richard
- richard_77048NimbostratusWell, doing a little more reading and it looks like the semicolon insertion was an issue since 9.4.1. I guess that isn't likely to be the source of my problem since things work on 9.4.7.
- The_BhattmanNimbostratusHi Richard,
- richard_77048NimbostratusWell, it does help in that I don't feel like I am going insane now that I know that someone else has seen this.
- The_BhattmanNimbostratusHi Richard,
- John_Alam_45640Historic F5 Account
- richard_77048NimbostratusBhattman,
- John_Alam_45640Historic F5 AccountYes, changing the event makes a difference, although i am not sure which version this behavior starts with. It is in 10.x for sure.
- richard_77048NimbostratusAh, I didn't kow about command result caching. Definitely good to know. I will give that a try and see if the behavior is in v9.4.x.
- hoolioCirrostratusBypassing caching of HTTP:: commands with different priorities has worked in all iRule versions. I think you'll need to change it from priority 500 to something over 500 as the implicit priority is 500 and you can't have two events of the same priority.
- richard_77048NimbostratusThanks for all the good tips. I now have a better idea of what is happening here.
Recent Discussions
Related Content
* 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