Do not check config() when sending HTTP/3 SETTINGS frame. gfe-relnote: v99 only, not protected. PiperOrigin-RevId: 264421961 Change-Id: I4986c1debe34a712a2d2380b576c23573761c6f5
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc index b3ea094..27d3785 100644 --- a/quic/core/http/end_to_end_test.cc +++ b/quic/core/http/end_to_end_test.cc
@@ -343,11 +343,12 @@ return GetServerSession()->connection(); } - QuicSession* GetServerSession() { + QuicSpdySession* GetServerSession() { QuicDispatcher* dispatcher = QuicServerPeer::GetDispatcher(server_thread_->server()); EXPECT_EQ(1u, dispatcher->session_map().size()); - return dispatcher->session_map().begin()->second.get(); + return static_cast<QuicSpdySession*>( + dispatcher->session_map().begin()->second.get()); } bool Initialize() { @@ -613,6 +614,14 @@ } EXPECT_EQ(expected_num_client_hellos, client_->client()->GetNumSentClientHellos()); + if (VersionUsesQpack(GetClientConnection()->transport_version())) { + EXPECT_TRUE(QuicSpdySessionPeer::GetSendControlStream(GetClientSession())); + EXPECT_TRUE( + QuicSpdySessionPeer::GetReceiveControlStream(GetClientSession())); + EXPECT_TRUE(QuicSpdySessionPeer::GetSendControlStream(GetServerSession())); + EXPECT_TRUE( + QuicSpdySessionPeer::GetReceiveControlStream(GetServerSession())); + } } TEST_P(EndToEndTestWithTls, SimpleRequestResponse) {
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc index 7fbccad..3992c22 100644 --- a/quic/core/http/quic_spdy_session.cc +++ b/quic/core/http/quic_spdy_session.cc
@@ -596,6 +596,10 @@ void QuicSpdySession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { QuicSession::OnCryptoHandshakeEvent(event); + if (VersionUsesQpack(transport_version()) && event == HANDSHAKE_CONFIRMED) { + SendMaxHeaderListSize(max_inbound_header_list_size_); + return; + } if (event == HANDSHAKE_CONFIRMED && config()->SupportMaxHeaderListSize()) { SendMaxHeaderListSize(max_inbound_header_list_size_); }
diff --git a/quic/test_tools/crypto_test_utils.cc b/quic/test_tools/crypto_test_utils.cc index bfbc3d7..e3e649e 100644 --- a/quic/test_tools/crypto_test_utils.cc +++ b/quic/test_tools/crypto_test_utils.cc
@@ -722,7 +722,11 @@ QuicConnectionPeer::SetCurrentPacket( dest_conn, source_conn->encrypted_packets_[index]->AsStringPiece()); for (const auto& stream_frame : framer.stream_frames()) { - dest_stream->OnStreamFrame(*stream_frame); + // Ignore stream frames that are sent on other streams in the crypto + // event. + if (stream_frame->stream_id == dest_stream->id()) { + dest_stream->OnStreamFrame(*stream_frame); + } } for (const auto& crypto_frame : framer.crypto_frames()) { dest_stream->OnCryptoFrame(*crypto_frame);