Do not send PRIORITY_UPDATE from server. While https://httpwg.org/http-extensions/draft-ietf-httpbis-priority.html allows servers to send PRIORITY_UPDATE frames, there is currently no need for this feature. Note that clients are already ignoring incoming PRIORITY_UPDATE frames in QuicSpdySession::OnPriorityUpdateForRequestStream(). gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99. PiperOrigin-RevId: 292373919 Change-Id: I3be6d6fef3c545746812d9b6c3543dc962273603
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc index 29e0660..1e34bd7 100644 --- a/quic/core/http/quic_spdy_stream.cc +++ b/quic/core/http/quic_spdy_stream.cc
@@ -1041,7 +1041,7 @@ std::move(ack_listener)); } - if (!priority_sent_) { + if (!priority_sent_ && session()->perspective() == Perspective::IS_CLIENT) { PriorityUpdateFrame priority_update; priority_update.prioritized_element_type = REQUEST_STREAM; priority_update.prioritized_element_id = id();
diff --git a/quic/core/http/quic_spdy_stream_test.cc b/quic/core/http/quic_spdy_stream_test.cc index 8616ab7..1e9bbff 100644 --- a/quic/core/http/quic_spdy_stream_test.cc +++ b/quic/core/http/quic_spdy_stream_test.cc
@@ -1297,11 +1297,6 @@ // for headers and trailers. EXPECT_CALL(*session_, WritevData(stream_, stream_->id(), _, _, _)) .Times(4); - // PRIORITY_UPDATE frame on the control stream. - auto send_control_stream = - QuicSpdySessionPeer::GetSendControlStream(session_.get()); - EXPECT_CALL(*session_, WritevData(send_control_stream, - send_control_stream->id(), _, _, _)); } // Write the initial headers, without a FIN. @@ -1354,11 +1349,6 @@ // HEADERS frame header and payload on the request stream. EXPECT_CALL(*session_, WritevData(stream_, stream_->id(), _, _, _)) .Times(2); - // PRIORITY_UPDATE frame on the control stream. - auto send_control_stream = - QuicSpdySessionPeer::GetSendControlStream(session_.get()); - EXPECT_CALL(*session_, WritevData(send_control_stream, - send_control_stream->id(), _, _, _)); } // Write the initial headers. @@ -1403,13 +1393,6 @@ // also written on the stream in case of IETF QUIC. EXPECT_CALL(*session_, WritevData(stream_, stream_->id(), _, _, _)) .Times(AtLeast(1)); - if (UsesHttp3()) { - // PRIORITY_UPDATE frame. - auto send_control_stream = - QuicSpdySessionPeer::GetSendControlStream(session_.get()); - EXPECT_CALL(*session_, WritevData(send_control_stream, - send_control_stream->id(), _, _, _)); - } // Write the initial headers. EXPECT_CALL(*stream_, WriteHeadersMock(false));