MINOR: stream/mux: implement websocket stream flag
Define a new stream flag SF_WEBSOCKET and a new cs flag CS_FL_WEBSOCKET.
The conn-stream flag is first set by h1/h2 muxes if the request is a
valid websocket upgrade. The flag is then converted to SF_WEBSOCKET on
the stream creation.
This will be useful to properly manage websocket streams in
connect_server().
(cherry picked from commit 90ac605ef35d60323cfe4bc26cd56c2f97dc2277)
[ad: remove non present flag from context]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
diff --git a/src/stream.c b/src/stream.c
index cb2c754..b10800f 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -465,6 +465,9 @@
s->si[0].flags |= SI_FL_CLEAN_ABRT;
if (cs->conn->mux->flags & MX_FL_HTX)
s->flags |= SF_HTX;
+
+ if (cs->flags & CS_FL_WEBSOCKET)
+ s->flags |= SF_WEBSOCKET;
}
/* Set SF_HTX flag for HTTP frontends. */
if (sess->fe->mode == PR_MODE_HTTP)