2011/04/20 - List of keep-alive / close options with associated behaviours.
PK="http-pretend-keepalive", HC="httpclose", SC="http-server-close",
-FC = "forceclose".
0 = option not set
1 = option is set
are not the normal ones and provide a behaviour compatible with another normal
form. Those are considered alternate forms and are marked "(alt)".
-FC SC HC PK Behaviour
- 0 0 0 X tunnel mode
- 0 0 1 0 passive close, only set headers then tunnel
- 0 0 1 1 forced close with keep-alive announce (alt)
- 0 1 0 0 server close
- 0 1 0 1 server close with keep-alive announce
- 0 1 1 0 forced close (alt)
- 0 1 1 1 forced close with keep-alive announce (alt)
- 1 * * 0 forced close
- 1 * * 1 forced close with keep-alive announce
+SC HC PK Behaviour
+ 0 0 X tunnel mode
+ 0 1 0 passive close, only set headers then tunnel
+ 0 1 1 forced close with keep-alive announce (alt)
+ 1 0 0 server close
+ 1 0 1 server close with keep-alive announce
+ 1 1 0 forced close (alt)
+ 1 1 1 forced close with keep-alive announce (alt)
At this point this results in 4 distinct effective modes for a request being
processed :
both will result in a forced close with keep-alive announces for requests
passing through both.
-It is also worth noting that "option httpclose" alone has become useless since
-1.4, because "option forceclose" does the right thing, while the former only
-pretends to do the right thing. Both options might get merged in the future.
-
};
static const char *common_options[] = {
- "httpclose", "forceclose", "http-server-close", "http-keep-alive",
+ "httpclose", "http-server-close", "http-keep-alive",
"http-tunnel", "redispatch", "httplog", "tcplog", "tcpka", "httpchk",
"ssl-hello-chk", "smtpchk", "pgsql-check", "redis-check",
"mysql-check", "ldap-check", "spop-check", "tcp-check",
* was this one (useful for cancelling options set in defaults
* sections).
*/
- if (strcmp(args[1], "httpclose") == 0 || strcmp(args[1], "forceclose") == 0) {
- if (strcmp(args[1], "forceclose") == 0) {
- if (!already_warned(WARN_FORCECLOSE_DEPRECATED))
- ha_warning("parsing [%s:%d]: keyword '%s' is deprecated in favor of 'httpclose', and will not be supported by future versions.\n",
- file, linenum, args[1]);
- err_code |= ERR_WARN;
- }
+ if (strcmp(args[1], "forceclose") == 0) {
+ ha_alert("parsing [%s:%d]: option '%s' is not supported any more since HAProxy 2.0, please just remove it, or use 'option httpclose' if absolutely needed.\n",
+ file, linenum, args[1]);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ goto out;
+ }
+ else if (strcmp(args[1], "httpclose") == 0) {
if (alertif_too_many_args_idx(0, 1, file, linenum, args, &err_code))
goto out;
if (kwm == KWM_STD) {