Forum Discussion
Aaron_Tebo_7015
Nimbostratus
Sep 03, 2009ProxyPass rule give error
I am using this rule from devcentral. http://devcentral.f5.com/wiki/default.aspx/iRules/ProxyPass.html
On some of my redirects I get the following error on execution:
TCL error: ProxyPasstestf5.harrisi.net HTTP_RESPONSE - Illegal argument. Cant execute in the current context. line 60 invoked from within HTTP::header $header foreach body line 2 invoked from within foreach header {Location Content-Location URI} { set protocol [substr [HTTP::header $header] 0 $host_serverside] if {$protocol ne ...
How can I troubleshoot to figureout why I am getting this error?
Thanks,
Aaron
- hoolio
Cirrostratus
Hi Aaron, - Aaron_Tebo_7015
Nimbostratus
Yes I have a 404 catch rule in addition to the proxypass rule. I am running 9.4.3. - hoolio
Cirrostratus
Can you post that iRule? I'd guess it's a conflict between the two rules when one is trying to remove a header from an LTM generated response. - Aaron_Tebo_7015
Nimbostratus
Here is the 404 rule:[HTTP::status] Error
was not found on this server.$HTTP_URI
- hoolio
Cirrostratus
That sounds about right. You could add a check in the ProxyPass iRule to exit the HTTP_RESPONSE event immediately if the status is a 404. Something like this should work at the top of the ProxyPass HTTP_RESPONSE event:when HTTP_RESPONSE { Exit this event in this rule if the server response is a 404 as we send a custom response for 404s from another rule if {[HTTP::status] == 404}{ return } }
- Aaron_Tebo_7015
Nimbostratus
I will give that a try. I will let you know how it goes.
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