<HTTP_REQUEST> Operation not supported (line 17) invoked from within "HTTP::header replace ...
hey,
whenever we activate the the irule below, with a delay of 10 to 30 minutes a tcl error is constantly raised and displayed in the logfile.
logline:
TCL error: Rulename - Operation not supported (line 17) invoked from within "HTTP::header replace $static::gtc_header "new""
iRule:
when RULE_INIT {
log local0. "Running RULE_INIT of iRule 'global_tracking_cookie'"
set static::gtc_cookie "_global"
set static::gtc_cookie_timeout 31536000
set static::gtc_header "X-Global-Session"
log local0. "iRule 'global_tracking_cookie' initialized: cookie($static::gtc_cookie), cookie_timeout($static::gtc_cookie_timeout)"
}
when HTTP_REQUEST {
if { not [HTTP::cookie exists $static::gtc_cookie] } {
set main_domain_pos 2
if { [string tolower [HTTP::host]] ends_with ".co.uk" } {
incr main_domain_pos 1
}
if { [string tolower [HTTP::host]] contains "foo" } {
incr main_domain_pos 1
}
set main_domain [domain [HTTP::host] $main_domain_pos]
set new_session_value "[string range [AES::key 128] 15 end][string range [AES::key 128] 15 end]"
HTTP::header replace $static::gtc_header "new"
HTTP::cookie insert name $static::gtc_cookie value $new_session_value
unset main_domain_pos
}
}
when HTTP_RESPONSE {
if { [info exists new_session_value] } {
HTTP::cookie insert name $static::gtc_cookie value $new_session_value domain $main_domain
HTTP::cookie expires $static::gtc_cookie $static::gtc_cookie_timeout
unset main_domain new_session_value
}
}
anyone any ideas what is happening here?
greets,
jochen