MINOR: mux-h2: add trace on extended connect usage
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 18 Oct 2021 08:05:16 +0000 (10:05 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 3 Nov 2021 10:42:02 +0000 (11:42 +0100)
Add a state trace to report that a protocol upgrade is converted using
the rfc8441 Extended connect method. This is useful in regards with the
recent changes to improve http/2 websockets.

src/mux_h2.c

index 8a7b235..0418b58 100644 (file)
@@ -5319,6 +5319,7 @@ static size_t h2s_bck_make_req_headers(struct h2s *h2s, struct htx *htx)
                                do {
                                        if (isteqi(iststop(connection_ist, ','),
                                                   ist("upgrade"))) {
+                                               TRACE_STATE("convert upgrade to extended connect method", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
                                                h2s->flags |= (H2_SF_BODY_TUNNEL|H2_SF_EXT_CONNECT_SENT);
                                                sl->info.req.meth = HTTP_METH_CONNECT;
                                                meth = ist("CONNECT");