Include encoder stream bytes in written header size.
Include the total size of dynamic table insertion instructions (including
duplications) sent on the encoder stream triggered by encoding a header list in
the return value of QuicSpdyStream::WriteHeadersImpl().
gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99.
PiperOrigin-RevId: 268203243
Change-Id: I5aacf67592862747670192a598c0aa877cb0c658
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc
index 223442c..e702e85 100644
--- a/quic/core/http/quic_spdy_stream.cc
+++ b/quic/core/http/quic_spdy_stream.cc
@@ -1010,8 +1010,10 @@
}
// Encode header list.
+ QuicByteCount encoder_stream_sent_byte_count;
std::string encoded_headers =
- spdy_session_->qpack_encoder()->EncodeHeaderList(id(), header_block);
+ spdy_session_->qpack_encoder()->EncodeHeaderList(
+ id(), header_block, &encoder_stream_sent_byte_count);
// Write HEADERS frame.
std::unique_ptr<char[]> headers_frame_header;
@@ -1034,7 +1036,7 @@
<< encoded_headers.length();
WriteOrBufferData(encoded_headers, fin, nullptr);
- return encoded_headers.size();
+ return encoded_headers.size() + encoder_stream_sent_byte_count;
}
void QuicSpdyStream::PopulatePriorityFrame(PriorityFrame* frame) {