Forum Discussion
DeVon_Jarvis
Mar 09, 2009Nimbostratus
HTTP::is_redirect error?
I have built this iRule to simulate the "Redirect_Rewrite modify" option.
when HTTP_REQUEST {
Save the host
set host [string tolower [HTTP::host]]
}
when HTTP_RESPONSE {
if {[HTTP::is_redirect] and [HTTP::header exists "location"]} {
set location [string tolower [HTTP::header "location"]]
if { ($location starts_with "http://") and ($location contains $host)} {
set newloc "https://[substr [HTTP::header Location] 7]"
HTTP::header replace Location $newloc
}
}
}
Works good in test, but when I put it in production, I am getting this error occasionally.
Mar 9 12:49:21 tmm tmm[1729]: 01220001:3: TCL error: redirect_to_https_matching - Illegal argument. Can't execute in the current context. (line 1) invoked from within "HTTP::is_redirect"
Any idea what is going on?
- DeVon_JarvisNimbostratusBTW: I am on 9.4.6
- DeVon_JarvisNimbostratusI added priority to my iRule, causing it to run first, and the errors seem to have disappeared. Wonder what was happening in the other iRules that was breaking this? Any ideas?
- hooleylistCirrostratusWhat is the other iRule doing? Is it redirecting the client in HTTP_RESPONSE?
- sam_111661NimbostratusI have a problem with 9.4.6 and came across this thread, I have noticed this after upgrading to 9.4.6.
- hooleylistCirrostratusHi smallIP,
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