Forum Discussion
Andy_McGrath
Oct 24, 2018Cumulonimbus
I think this is because you have a new line as the first line of the
HTTP::respond
content which is then seen just as text by Safari and Chrome. I have tried to replicate it using Chrome but not able to
Try the following and let us know if it is any better:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
log local0. "Client [IP::client_addr] requested Host: [HTTP::host] with URI: [HTTP::uri] accessed [virtual] but no active nodes available..."
switch [HTTP::uri] {
"/Logo.png" {
HTTP::respond 200 content [ifile get "Logo.png"] "Content-Type" "image/png" "Cache-Control" "no-cache, must-revalidate"
}
default {
HTTP::respond 503 content {
Error 503 Service Unavailable
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
}
}
}
}
}