Forum Discussion
lbong_53781
Nimbostratus
Oct 01, 2009HTTP::COOKIE not working as expected
I am running LTM 10.0.1
I have the following iRule and run into some issues when there are multiple cookie variable in the header. The Rule seems to only look at the last "Cooki...
hoolio
Cirrostratus
Oct 02, 2009Can you add logging to the test rule and post the results when it fails? In a quick test, this functionality seemed to work okay:
when HTTP_REQUEST {
Insert some test headers
HTTP::header insert header1 value1
HTTP::header insert header2 value2
Test the header exists command for both headers
if {[HTTP::header exists header1]}{
log local0. "header1 exists"
} else {
log local0. "header1 does not exist"
}
if {[HTTP::header exists header2]}{
log local0. "header2 exists"
} else {
log local0. "header2 does not exist"
}
Loop through each header by name and log the name and value
foreach header [HTTP::header names] {
log local0. "$header: [HTTP::header values $header]"
}
}
: header1 exists
: header2 exists
: User-Agent: {curl/7.16.3 (i686-pc-cygwin) libcurl/7.16.3 OpenSSL/0.9.8k zlib/1.2.3 libssh2/0.15-CVS}
: Host: piggybank
: Accept: */*
: header1: value1
: header2: value2
Aaron
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