The upgrade is performed when an H2 preface is detected when the first request on a connection is parsed. The CS is destroyed by setting EOS flag on it. A special flag is added on the HTX message to warn the HTX analyzers the stream will be closed because of an upgrade. This way, no error and no log are emitted. When the mux h1 is released, we create a mux h2, without any CS and passing the buffer with the unparsed H2 preface.