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_);
   }