Forum Discussion
ciscoguy69_1623
Nimbostratus
Dec 04, 2013Contains vs starts_with behavior
In 11.x code, when the following is used, the LTM responds with a 504.
when HTTP_RESPONSE {
if {[HTTP::status] contains "5"} {
HTTP::redirect "/client-error.html"
}
}
If contains is replaced...
What_Lies_Bene1
Cirrostratus
Dec 06, 2013I doubt 'contains' is valid with this command; 'contains 5' could be a 500 or a 205 and isn't really specific enough considering the HTTP status code structure. The requirement to perform some action based on a status code (such as in your case) shouldn't be so loosely defined. 'starts_with' will work as at least you are defining a type of error, if not a specific one. Make sense?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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