Forum Discussion
Deb_Allen_18
Sep 07, 2006Historic F5 Account
Error on HTTP::header insert
I'm wondering if anyone can shed some light on this error:tmm[1045]: 01220001:3: TCL error: Rule frontend_http - Operation not supported (line 1) invoked from within "HTTP::header insert BIG-IP-PROTOCOL http"
rule frontend_http {
when HTTP_REQUEST {
foreach header {BIG-IP-PROTOCOL BIG-IP-PORT BIG-IP-SERVER-NAME} {
set log 0
while { [HTTP::header exists $header] } {
HTTP::header remove $header
set log 1
}
if { $log == 1 } {
log local0. "Client-inserted header removed: $header ClientIP: [IP::remote_addr]"
}
unset log
}
HTTP::header insert BIG-IP-PROTOCOL http
}
}
Customer is running 9.2.3.Similar issue seen here on 9.1...
http://devcentral.f5.com/Default.aspx?tabid=28&view=topic&forumid=5&postid=3513Click here
thanks!
/deb
- Deb_Allen_18Historic F5 AccountTurns out another iRule was running ahead of this one, sometimes resulting in a redirect which causes the (later, unintended) header insertion attempt to fail (see link above).
when HTTP_REQUEST { if { condition }{ HTTP::respond 302 Location https://host.company.com[HTTP::uri] Connection Close event disable all } ... }
- Al_Carandang_11
Nimbostratus
Just wondering how the LTM behaves when it encounters an errorlike this. If the code had a 'return' instead of an 'event disable', would it send an 'HTTP 302 code' then a RST packet back to the client browser? Or would it just send a RST packet only? - Deb_Allen_18Historic F5 AccountHi Al -
- Al_Carandang_11
Nimbostratus
Let me rephrase the question... - Stefan_Klotz
Cumulonimbus
Although this Thread is already very old, I want to share my experiences anyway. - hoolio
Cirrostratus
Hi Stefan, - Colin_Walker_12Historic F5 AccountKeep in mind that while cool and a fun trick, using the catch statements like shown in Aaron's CodeShare example add overhead. It's an outstanding tool to use where you need to, but I wouldn't recommend using it as a standard practice unless you're sure you'll be encountering these situations often.
- Stefan_Klotz
Cumulonimbus
Hello again, - hoolio
Cirrostratus
Hi Stefan, - Stefan_Klotz
Cumulonimbus
Hi Aaron,
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