MEDIUM: http: Ignore http-pretend-keepalive option on frontend
This option is backends specific, so there is no reason to support it on
frontends. So now, it is ignored if it is set on a frontend and a warning is
emitted during the startup. The change is quite trivial, but the commit is
tagged as MEDIUM because it is a small breakage with previous versions and
configurations using this options could emit a warning now.
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 7c6684b..a589f50 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -2116,7 +2116,7 @@
option http-ignore-probes (*) X X X -
option http-keep-alive (*) X X X X
option http-no-delay (*) X X X X
-option http-pretend-keepalive (*) X X X X
+option http-pretend-keepalive (*) X - X X
option http-server-close (*) X X X X
option http-tunnel (*) X X X X
option http-use-proxy-header (*) X X X -
@@ -5898,7 +5898,7 @@
no option http-pretend-keepalive
Define whether haproxy will announce keepalive to the server or not
May be used in sections : defaults | frontend | listen | backend
- yes | yes | yes | yes
+ yes | no | yes | yes
Arguments : none
When running with "option http-server-close" or "option forceclose", haproxy
@@ -5925,11 +5925,12 @@
less work to do. So if haproxy is the bottleneck on the whole architecture,
enabling this option might save a few CPU cycles.
- This option may be set both in a frontend and in a backend. It is enabled if
- at least one of the frontend or backend holding a connection has it enabled.
- This option may be combined with "option httpclose", which will cause
- keepalive to be announced to the server and close to be announced to the
- client. This practice is discouraged though.
+ This option may be set in backend and listen sections. Using it in a frontend
+ section will be ignored and a warning will be reported during startup. It is
+ a backend related option, so there is no real reason to set it on a
+ frontend. This option may be combined with "option httpclose", which will
+ cause keepalive to be announced to the server and close to be announced to
+ the client. This practice is discouraged though.
If this option has been enabled in a "defaults" section, it can be disabled
in a specific instance by prepending the "no" keyword before it.