DenverRB_326662
May 18, 2018Nimbostratus
irule - HTTP_RESPONSE - Default vs Not Default
I'm trying to wrap my head around the difference in this syntax.
In a quick summary it does not appear that the code I have nested inside "default {}" brackets processes properly. I have it setup in another environment exact same way without "default {}" and it works just fine.
when HTTP_RESPONSE {
STREAM::disable
switch statement to look at what Service Pool for ReWriting SSL
switch -glob [LB::server pool] {
"PoolLoadBalance1" {
pool pool_443
}
"PoolLoadBalance2" {
pool pool_4445
}
"/PoolLoadBalance3" {
HTTP::cookie remove "TestCookie1"
HTTP::header insert Set-Cookie "TestCookie1=deleted;secure;expires=Thu, 01 Jan 1970 00:00:00 GMT"
}
default {
if { ([HTTP::header value Content-Type] contains "text") } {
STREAM::expression {@http://abc.com@https://www.abc.com@@src="http://@src="https://@@123.net@www.abc.com@}
STREAM::enable
}
}
}
Working Environment
when HTTP_RESPONSE {
STREAM::disable
switch statement to look at what Service Pool for ReWriting SSL
switch -glob [LB::server pool] {
"PoolLoadBalance1" {
pool pool_443
}
"PoolLoadBalance2" {
pool pool_4445
}
"/PoolLoadBalance3" {
HTTP::cookie remove "TestCookie1"
HTTP::header insert Set-Cookie "TestCookie1=deleted;secure;expires=Thu, 01 Jan 1970 00:00:00 GMT"
}
if { ([HTTP::header value Content-Type] contains "text") } {
STREAM::expression {@http://abc.com@https://www.abc.com@@src="http://@src="https://@@123.net@www.abc.com@}
STREAM::enable
}
}
}
Code
What is the priority with syntax behind default and why would traffic not appear to be hitting the rewrites under the STREAM Expressions.