Commit bcce25bc authored by jan.koester's avatar jan.koester
Browse files

test

parent 1d69f32e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -87,7 +87,16 @@ static constexpr size_t H2_CLIENT_PREFACE_LEN = 24;
// ============================================================================

void libhttppp::Http3QuicSocket::sendControlStreams() {
    if ( getSelectedAlpn() != "h3" && getSelectedAlpn() != "h3-29")
    // Empty means this side hasn't recorded a selected ALPN at all -- the
    // client role currently never learns it back from the server's
    // EncryptedExtensions (processEncryptedExtensions() in libnetplus's
    // quic.cpp only parses quic_transport_parameters/early_data, not the
    // ALPN extension), so an Http3QuicSocket client's getSelectedAlpn() is
    // always "" even after a successful h3 handshake. Only bail out on an
    // ALPN we positively know isn't HTTP/3 -- don't treat "unknown" the
    // same as "negotiated something else".
    const std::string &alpn = getSelectedAlpn();
    if (!alpn.empty() && alpn != "h3" && alpn != "h3-29")
        return;

    if (_ctrlStreamsSent) return;