Forum Discussion
Techchic_108423
Nimbostratus
Dec 02, 2008TCL error in logging
Hi,
We have an irule that seems to be bringing up and error but I'm not really sure what it is. Wondering if anyone had any ideas. The error being repeatedly generated is;
:header replace Cache-Control no-cache "
Dec 2 08:10:36 tmm tmm[928]: 01220001:3: TCL error: Rule AllowCacheSyst - Operation not supported (line 16) invoked from within "HTTP::header replace Cache-Control no-cache "
Dec 2 08:10:36 tmm tmm[928]: 01220001:3: TCL error: Rule AllowCacheSyst - Operation not supported (line 16) invoked from within "HTTP::header replace Cache-Control no-cache "
Dec 2 08:10:37 tmm tmm[928]: 01220001:3: TCL error: Rule AllowCacheSyst - Operation not supported (line 16) invoked from within "HTTP::header replace Cache-Control no-cache "
The rule that is currenlty being used is;
when HTTP_RESPONSE {
set headerCT [HTTP::header Content-Type]
set CacheC [HTTP::header Cache-Control]
if {$headerCT eq "image/gif" or $headerCT eq "image/jpeg"} {
if {$CacheC eq "private"} { this is a chart
do nothing
} else {
HTTP::header replace Cache-Control private,max-age=14400,must-revalidate
}
} elseif {$headerCT eq "text/css" or $headerCT eq "application/x-javascript" or $headerCT eq "application/x-shockwave-flash" } {
HTTP::header replace Cache-Control private,max-age=14400,must-revalidate
} elseif {$headerCT eq "text/xml"} {
HTTP::header replace Cache-Control no-cache
} elseif {$headerCT eq "image/png"} {
HTTP::header replace Cache-Control no-cache
} elseif {$headerCT contains "text/html"} {
HTTP::header replace Cache-Control no-cache
HTTP::header replace Pragma no-cache
HTTP::header insert { "X-Cache-Hit" "Yes" }
}
if { [HTTP::status] contains "302"} {
HTTP::header replace Cache-Control no-cache
HTTP::header replace Pragma no-cache
}
foreach cookie [HTTP::cookie names]
{
set value [HTTP::cookie value $cookie];
if { "" != $value }
{
set testvalue [string tolower $value]
set valuelen [string length $value]
log local0. "Cookie found: $cookie = $value";
switch -glob $testvalue {
"*;secure*" -
"*; secure*" { }
default { set value "$value; Secure"; }
}
switch -glob $testvalue {
"*;httponly*" -
"*; httponly*" { }
default { set value "$value; HttpOnly"; }
}
if { [string length $value] > $valuelen} {
log local0. "Replacing cookie $cookie with $value"
HTTP::cookie value $cookie "${value}"
}
}
}
}
I'm just a bit confused as I would have thought the error would repeat on the other lines where the same line of code is but it seems to just be line 16
} elseif {$headerCT contains "text/html"} {
HTTP::header replace Cache-Control no-cache
Anby help would be much appreciated!
Thanks!
Claire
- hoolio
Cirrostratus
Hi Claire,
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