mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 15:34:35 +00:00
MEDIUM: htx: Allow the option http-use-htx to be used on TCP proxies too
This will be mandatory to allow upgrades from TCP to HTTP in HTX. Of course, raw buffers will still be used by default on TCP proxies, this option sets or not. But if you want to handle mux upgrades from a TCP proxy, you must enable the HTX on it and on all its backends. There is only a small change in the lua code. Because TCP proxies can be HTX aware, to exclude TCP services only for HTTP proxies, we must also check the mode (TCP/HTTP) now.
This commit is contained in:
parent
c0016d8119
commit
eb7098035c
@ -7714,7 +7714,7 @@ static enum act_parse_ret action_register_service_tcp(const char **args, int *cu
|
||||
{
|
||||
struct hlua_function *fcn = rule->kw->private;
|
||||
|
||||
if (px->options2 & PR_O2_USE_HTX) {
|
||||
if (px->mode == PR_MODE_HTTP && (px->options2 & PR_O2_USE_HTX)) {
|
||||
memprintf(err, "Lua services cannot be used when the HTX internal representation is enabled");
|
||||
return ACT_RET_PRS_ERR;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ const struct cfg_opt cfg_opts2[] =
|
||||
{ "http-use-proxy-header", PR_O2_USE_PXHDR, PR_CAP_FE, 0, PR_MODE_HTTP },
|
||||
{ "http-pretend-keepalive", PR_O2_FAKE_KA, PR_CAP_BE, 0, PR_MODE_HTTP },
|
||||
{ "http-no-delay", PR_O2_NODELAY, PR_CAP_FE|PR_CAP_BE, 0, PR_MODE_HTTP },
|
||||
{ "http-use-htx", PR_O2_USE_HTX, PR_CAP_FE|PR_CAP_BE, 0, PR_MODE_HTTP },
|
||||
{ "http-use-htx", PR_O2_USE_HTX, PR_CAP_FE|PR_CAP_BE, 0, 0 },
|
||||
{ NULL, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user