Forum Discussion
Christopher_131
Nimbostratus
May 20, 2010cookie insertion - http::cookie vs http::header
I have this iRule:
when HTTP_RESPONSE {
HTTP::cookie domainticket domain.net
HTTP::cookie insert name "domainticket" value "testytest"
HTTP::header insert set-cookie domainticket2=testytest2
}
I'm trying to give the browser client a cookie that I can subsequently test for the existence of and retrieve the cookie's value from. the problem is that I will never get a cookie given back to me unless i use the ::header command. I see both cookies being sent (using HttpFox), but my browser only ever returns domainticket2 and the value I set.
Every iRule example I see which deals with cookie insertion only ever uses HTTP::cookie to insert and test existence of cookies. I get nothing when I use this alone. If I comment out the HTTP::header line, a cookie never gets accepted by the browser that I can see in a "show cookies" window, and it fails any iRule existence test I use.
What gives? What am I doing wrong here that requires me to use a HTTP::header command instead of just an HTTP::cookie insert command? I've verified that my browser will accept cookies from anywhere. thanks for any insight, --Christopher
edit: paragraph separation disappeared when submitted in Opera.. edited it back in Firefox.. hopefully
- naladar_65658
Altostratus
Hmm... I tested your iRule out on my little test VIP and my Firefox client shows it received the cookie named domainticket with a value of "testytest" and it was valid until the end of the session. I commented out the HTTP::header line by the way. What version of TMOS are you on and how are you trying to perform your cookie validation/existence?
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