Skip to content

Commit

Permalink
Merge pull request #580 from openshift-cherrypick-robot/cherry-pick-5…
Browse files Browse the repository at this point in the history
…73-to-release-4.14

[release-4.14] OCPBUGS-32437: Introduce 'idle-close-on-response' option for frontends
  • Loading branch information
openshift-merge-bot[bot] committed Apr 19, 2024
2 parents b3af193 + 6cb03e5 commit 3f83325
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions images/router/haproxy/conf/haproxy-config.template
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ frontend public
bind :{{ env "ROUTER_SERVICE_HTTP_PORT" "80" }}{{ if isTrue (env "ROUTER_USE_PROXY_PROTOCOL") }} accept-proxy{{ end }}
{{- end }}
mode http

# Workaround for a known issue encountered with certain HTTP clients,
# particularly the Apache HTTP client (prior to version 5),
# where closed idle connections are erroneously reused.
# Bug reference: https://issues.redhat.com/browse/OCPBUGS-32044.
option idle-close-on-response
tcp-request inspect-delay {{ firstMatch $timeSpecPattern (env "ROUTER_INSPECT_DELAY") "5s" }}
tcp-request content accept if HTTP

Expand Down Expand Up @@ -332,6 +338,8 @@ frontend fe_sni
{{- end }}
mode http

option idle-close-on-response

{{- range $idx, $captureHeader := .CaptureHTTPRequestHeaders }}
capture request header {{ $captureHeader.Name }} len {{ $captureHeader.MaxLength }}
{{- end }}
Expand Down Expand Up @@ -442,6 +450,8 @@ frontend fe_no_sni
{{- end }}
mode http

option idle-close-on-response

{{- range $idx, $captureHeader := .CaptureHTTPRequestHeaders }}
capture request header {{ $captureHeader.Name }} len {{ $captureHeader.MaxLength }}
{{- end }}
Expand Down

0 comments on commit 3f83325

Please sign in to comment.