Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-43745: Add support for IdleCloseTerminationPolicy #639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions images/router/haproxy/conf/haproxy-config.template
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,10 @@ frontend public
{{- 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.
{{- if isTrue (env "ROUTER_IDLE_CLOSE_ON_RESPONSE") }}
option idle-close-on-response
{{- end }}

tcp-request inspect-delay {{ firstMatch $timeSpecPattern (env "ROUTER_INSPECT_DELAY") "5s" }}
tcp-request content accept if HTTP

Expand Down Expand Up @@ -346,7 +345,9 @@ frontend fe_sni
{{- "" }} no-alpn
mode http

{{- if isTrue (env "ROUTER_IDLE_CLOSE_ON_RESPONSE") }}
option idle-close-on-response
{{- end }}

{{- range $idx, $captureHeader := .CaptureHTTPRequestHeaders }}
capture request header {{ $captureHeader.Name }} len {{ $captureHeader.MaxLength }}
Expand Down Expand Up @@ -459,7 +460,9 @@ frontend fe_no_sni
{{- "" }} no-alpn
mode http

{{- if isTrue (env "ROUTER_IDLE_CLOSE_ON_RESPONSE") }}
option idle-close-on-response
{{- end }}

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