projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
403fdee
)
MINOR: cfgparse-listen: "http-reuse" requires TCP or HTTP mode
author
Aurelien DARRAGON
<adarragon@haproxy.com>
Tue, 19 Sep 2023 16:41:58 +0000
(18:41 +0200)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:30 +0000
(15:34 +0200)
Prevent the use of the "http-reuse" keyword in proxy section when neither
the TCP nor the HTTP mode is set.
src/cfgparse-listen.c
patch
|
blob
|
history
diff --git
a/src/cfgparse-listen.c
b/src/cfgparse-listen.c
index
0bd1939
..
e5aafa0
100644
(file)
--- a/
src/cfgparse-listen.c
+++ b/
src/cfgparse-listen.c
@@
-2365,6
+2365,12
@@
stats_error_parsing:
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
err_code |= ERR_WARN;
+ if (curproxy->mode != PR_MODE_TCP && curproxy->mode != PR_MODE_HTTP) {
+ ha_alert("parsing [%s:%d] : '%s' requires TCP or HTTP mode.\n", file, linenum, args[0]);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ goto out;
+ }
+
if (strcmp(args[1], "never") == 0) {
/* enable a graceful server shutdown on an HTTP 404 response */
curproxy->options &= ~PR_O_REUSE_MASK;