Yozzer
Dec 18, 2014Nimbostratus
Cookies
Hi
Im having an issue with Cookies not being accepted at the server unless they are within the same Cookie header:
Cookie: blah=blah; blahs=blahs;
If there are two Cookie headers then...
you could use HTTP::header values instead of value.
e.g.
configuration
[root@ve11a:Active:In Sync] config tmsh list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 12
}
[root@ve11a:Active:In Sync] config tmsh list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
[root@ve11a:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
set cktmp ""
foreach ck [HTTP::header values Cookie] {
if { $cktmp eq "" } {
append cktmp $ck
} else {
append cktmp "; $ck"
}
}
HTTP::header remove Cookie
HTTP::header insert Cookie $cktmp
}
}
test
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.24.1(57552) <-> 172.28.24.10(80)
1419065561.2516 (0.0015) C>S
---------------------------------------------------------------
GET / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.24.10
Accept: */*
cookie: blah=blah
cookie: blahs=blahs
---------------------------------------------------------------
New TCP connection 2: 200.200.200.14(57552) <-> 200.200.200.101(80)
1419065561.2534 (0.0016) C>S
---------------------------------------------------------------
GET / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.24.10
Accept: */*
Cookie: blah=blah; blahs=blahs
---------------------------------------------------------------