mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-08 02:01:33 +00:00
MINOR: checks: Support HTTP/2 version (without '.0') for http-check send rules
The version is partially parsed to set the flag HTX_SL_F_VER_11 on the HTX message. But exactly 8 chars is expected. So if "HTTP/2" is specified, the flag is not set. Thus, the version parsing has been updated to handle "HTTP/2" and "HTTP/2.0" the same way.
This commit is contained in:
parent
e50b7dc2e0
commit
8bf8fda49b
@ -1916,8 +1916,8 @@ static enum tcpcheck_eval_ret tcpcheck_eval_send(struct check *check, struct tcp
|
|||||||
uri = (isttest(send->http.uri) ? send->http.uri : ist("/")); // TODO: handle uri_fmt
|
uri = (isttest(send->http.uri) ? send->http.uri : ist("/")); // TODO: handle uri_fmt
|
||||||
vsn = (isttest(send->http.vsn) ? send->http.vsn : ist("HTTP/1.0"));
|
vsn = (isttest(send->http.vsn) ? send->http.vsn : ist("HTTP/1.0"));
|
||||||
|
|
||||||
if (istlen(vsn) == 8 &&
|
if ((istlen(vsn) == 6 && *(vsn.ptr+5) == '2') ||
|
||||||
(*(vsn.ptr+5) > '1' || (*(vsn.ptr+5) == '1' && *(vsn.ptr+7) >= '1')))
|
(istlen(vsn) == 8 && (*(vsn.ptr+5) > '1' || (*(vsn.ptr+5) == '1' && *(vsn.ptr+7) >= '1'))))
|
||||||
slflags |= HTX_SL_F_VER_11;
|
slflags |= HTX_SL_F_VER_11;
|
||||||
slflags |= (HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN);
|
slflags |= (HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN);
|
||||||
if (!isttest(send->http.body))
|
if (!isttest(send->http.body))
|
||||||
|
Loading…
Reference in New Issue
Block a user