Forum Discussion
leon_107471
Nimbostratus
Jan 12, 2008HTTP_RESPONSE codes
Hi
Can someone help me translate the below irule to the correct irule syntax?
Thanks in advance
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "1, 3, 4 ,5" } {
LB::down
}
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "2" } {
LB::up
}
}
- hoolio
Cirrostratus
That should work to mark a pool member as down if the response code isn't a 200. However, there are many instances where a web server could legitimately reply with a non-200 response. Take a look at the HTTP 1.1 RFC's section on response codes for examples:when HTTP_RESPONSE { if {[HTTP::status] starts_with {5}}{ LB::down } }
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