Leo
Apr 14, 2013Nimbostratus
adding headers to HTTP::respond content
Hello all,
I'm using an iRule to respond a 503 page when my pool members are down. The iRule works fine, but the developers asked to add the "retry-after" header to the response.
The iRule looks like this:
when HTTP_REQUEST {
if { [active_members IIS-pool-new] < 1 } {
if { [HTTP::uri] eq "/503.jpg" } {
HTTP::respond 200 content [ifile get 503]
} else {
log local0.alert "***no pool members available in pool: iis-pool-new! redirected to 503 page***"
HTTP::respond 503 content "[html code - the forum doesn't display it correctly...]"
}
}
}
I've googled and found the following command:
HTTP::respond 503 Retry-After 10800
But how do I integrate that into my iRule? won't the first respond just end the iRule?