Add APIs to allow sessions to read stream types from pending stream.

Pending stream will now allow receiving stream frame with zero offset.

gfe-relnote: version 99 only. Only used in test.
PiperOrigin-RevId: 247277571
Change-Id: Ib7986a27ce0106efd3102b50bfe82f0eac4b9fe3
diff --git a/quic/core/quic_stream.cc b/quic/core/quic_stream.cc
index f9b19b1..bad8a660 100644
--- a/quic/core/quic_stream.cc
+++ b/quic/core/quic_stream.cc
@@ -58,8 +58,8 @@
       sequencer_(this) {}
 
 void PendingStream::OnDataAvailable() {
-  QUIC_BUG << "OnDataAvailable should not be called.";
-  CloseConnectionWithDetails(QUIC_INTERNAL_ERROR, "Unexpected data available");
+  // It will be called when pending stream receives its first byte. But this
+  // call should simply be ignored so that data remains in sequencer.
 }
 
 void PendingStream::OnFinRead() {
@@ -92,7 +92,6 @@
 
 void PendingStream::OnStreamFrame(const QuicStreamFrame& frame) {
   DCHECK_EQ(frame.stream_id, id_);
-  DCHECK_NE(0u, frame.offset);
 
   bool is_stream_too_long =
       (frame.offset > kMaxStreamLength) ||