MINOR: server: activate automatically check reuse for rhttp@ protocol
Without check-reuse-pool, it is impossible to perform check on server using @rhttp protocol. This is due to the inherent nature of the protocol which does not implement an active connect method. Thus, ensure that check-reuse-pool is always set when a reverse HTTP server is declared. This reduces server configuration and should prevent any omission. Note that it is still require to add "check" server keyword so activate server checks.
This commit is contained in:
parent
ace9f5db10
commit
28116e307a
@ -18215,9 +18215,8 @@ check-reuse-pool
|
||||
any specific check connect option is defined, either on the server line or
|
||||
via a custom tcp-check connect rule.
|
||||
|
||||
If checks are activated for a reverse HTTP server, this option is mandatory
|
||||
for checks to succeed, as by definition these servers do not have the ability
|
||||
to initiate connection.
|
||||
This option is automatically enabled for servers acting as passive reverse
|
||||
HTTP gateway, as for those servers connect is only supported through reuse.
|
||||
|
||||
check-send-proxy
|
||||
May be used in the following contexts: tcp, http
|
||||
|
@ -2852,7 +2852,8 @@ void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl
|
||||
srv->check.sni = src->check.sni;
|
||||
srv->check.alpn_str = src->check.alpn_str;
|
||||
srv->check.alpn_len = src->check.alpn_len;
|
||||
srv->check.reuse_pool = src->check.reuse_pool;
|
||||
if (!(srv->flags & SRV_F_RHTTP))
|
||||
srv->check.reuse_pool = src->check.reuse_pool;
|
||||
/* Note: 'flags' field has potentially been already initialized. */
|
||||
srv->flags |= src->flags;
|
||||
srv->do_check = src->do_check;
|
||||
@ -3505,6 +3506,8 @@ static int _srv_parse_init(struct server **srv, char **args, int *cur_arg,
|
||||
}
|
||||
else {
|
||||
newsrv->flags |= SRV_F_RHTTP;
|
||||
/* Automatically activate check-reuse-pool for rhttp@ servers. */
|
||||
newsrv->check.reuse_pool = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user