MINOR: mux-pt: Don't perform implicit HTTP upgrade if not supported by mux

For now this tests is useless, but if the PT muliplexer is flagged to
explicitly not support the upgrades to HTTP, an error is returned.
This commit is contained in:
Christopher Faulet 2021-03-08 15:32:28 +01:00
parent 143e9e5888
commit 7a9e362b90
1 changed files with 2 additions and 0 deletions

View File

@ -2174,6 +2174,8 @@ int stream_set_backend(struct stream *s, struct proxy *be)
if (s->si[0].wait_event.events)
conn->mux->unsubscribe(cs, s->si[0].wait_event.events,
&s->si[0].wait_event);
if (conn->mux->flags & MX_FL_NO_UPG)
return 0;
if (conn_upgrade_mux_fe(conn, cs, &s->req.buf, ist(""), PROTO_MODE_HTTP) == -1)
return 0;