Youssef_Ghorba1
Jan 23, 2020Altostratus
Disable "Connection: close" effect in server response
Hello,
I have a faulty application that mistakenly sending "Connection: close" on specific HTTP 1.1 requests.
LTM, upon receiving the "Connection: close" response from the server tears down the server side TCP session (sends FIN packet, etc)
In order to disable this behaviour, I came up with this iRule that removes the Connection header for identified requests :
when HTTP_REQUEST {
# any condition to identify the request. HEAD here is for testing
if { [HTTP::method] eq "HEAD" } {
set hack_response_headers 1
} else {
set hack_response_headers 0
}
}
when HTTP_RESPONSE {
if { $hack_response_headers == 1 }{
HTTP::header remove "Connection"
}
}
This iRule does what's intended and the client does no more receives the "Connection: close". Nevertheless, LTM still tears down the server side TCP session anyway, as if LTM handles the "Connection: close" before any iRule processing.
In there any way to completely disable the "Connection: close" effect on LTM when received on server side response ?
Youssef