Do not wait for settings when only RFC 9297 is supported

Back with cl/365819131, support was added to buffer incoming streams when WebTransport is in use because our WebTransport code rejects requests when it hasn't received the right settings. Later, cl/399795495 added support for draft-ietf-masque-h3-datagram-04 while still supporting draft-ietf-masque-h3-datagram-00. Because those had wire format differences, we needed to also wait for settings before using MASQUE to ensure negotiation of a draft version had completed. Now that draft-ietf-masque-h3-datagram has been published as RFC 9297, our new MASQUE code only supports that version of draft-ietf-masque-h3-datagram so we don't need to wait for settings in that case.

This CL doesn't require flag protection because datagram support is never enabled on production servers today.

This Cl also makes it possible to default-enable RFC 9297 at a future date since it'll no longer cause performance issues.

PiperOrigin-RevId: 516619954
diff --git a/quiche/quic/core/http/quic_spdy_session.h b/quiche/quic/core/http/quic_spdy_session.h
index 97451e5..9f4782b 100644
--- a/quiche/quic/core/http/quic_spdy_session.h
+++ b/quiche/quic/core/http/quic_spdy_session.h
@@ -408,10 +408,15 @@
   WebTransportHttp3* GetWebTransportSession(WebTransportSessionId id);
 
   // If true, no data on bidirectional streams will be processed by the server
-  // until the SETTINGS are received.  Only works for HTTP/3.
+  // until the SETTINGS are received.  Only works for HTTP/3. This is currently
+  // required either (1) for WebTransport because WebTransport needs settings to
+  // correctly parse requests or (2) when multiple versions of HTTP Datagrams
+  // are supported to ensure we know which one is used. The HTTP Datagram check
+  // will be removed once we drop support for draft04.
   bool ShouldBufferRequestsUntilSettings() {
     return version().UsesHttp3() && perspective() == Perspective::IS_SERVER &&
-           LocalHttpDatagramSupport() != HttpDatagramSupport::kNone;
+           (ShouldNegotiateWebTransport() ||
+            LocalHttpDatagramSupport() == HttpDatagramSupport::kRfcAndDraft04);
   }
 
   // Returns if the incoming bidirectional streams should process data.  This is