Forum Discussion
Kiran_Kumar
Nimbostratus
Sep 03, 2013iRule to send http status 400 code when pool is offline for a web service call
Hi Friends,
Could anyone help me with an iRule to send a http 400 status when all the pool members in a pool are offline.
Typically I would use a go-away iRule with a redirect url. but my case i...
marco_octavian_
Nimbostratus
Sep 04, 2013Scratch that first irule. It was untested and has flaws. I agree with Jie about the no-cache. Give this one a try.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 400 content "
Bad Request page
400 - The request could not be understood by the server due to malformed syntax.
" Cache-Control No-Cache Pragma No-Cache"
}
}
hoolio
Cirrostratus
Sep 05, 2013Nice solution Marco. You could replace the ""s with {} around the content to avoid having to escape any meta-characters in the fuller HTML that an admin might use: HTTP::respond 400 content {...} header1 value1 headerN valueN
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