Forum Discussion
HTTP::close timing out
My goal is to close the connection once sending the 200 response. I have created this iRule, however for some reasons its not working. app is observing timeouts once this rule applied to the virtual. Any inputs are appreciated!
when HTTP_REQUEST { if { [string tolower [HTTP::path]] equals "Healtch-Check-URL" } { if { [active_members [LB::server pool]] >= 1 } { HTTP::respond 200 content { OK } HTTP::close }
else {
HTTP::respond 500 content {
NOT_OK
}
HTTP::close
}
}
elseif { [active_members POOL_NAME] == 0 } {
if { [HTTP::header exists x-gtm-dc-failure] } {
return
}
HTTP::header insert x-gtm-dc-failure true
}
}
- Simon_Blakely
Employee
Once the HTTP::respond is executed, you cannot further modify the response (as HTTP::close attempts to do).
Modify your HTTP::respond to set the
Connection: close
i.e
orHTTP::respond 200 content { OK} "Connection" "close"
HTTP::respond 500 content {NOT_OK} "Connection" "close"
Recent Discussions
Related Content
* 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