Index: net/tools/quic/quic_simple_server_session.cc |
diff --git a/net/tools/quic/quic_simple_server_session.cc b/net/tools/quic/quic_simple_server_session.cc |
index 8a31699e1636ac9feced4f125116e33e28501b66..946ac8a5b90eceba46179937f81bc108c12d678a 100644 |
--- a/net/tools/quic/quic_simple_server_session.cc |
+++ b/net/tools/quic/quic_simple_server_session.cc |
@@ -65,6 +65,10 @@ void QuicSimpleServerSession::PromisePushResources( |
const std::list<QuicInMemoryCache::ServerPushInfo>& resources, |
QuicStreamId original_stream_id, |
const SpdyHeaderBlock& original_request_headers) { |
+ if (!server_push_enabled()) { |
+ return; |
+ } |
+ |
for (QuicInMemoryCache::ServerPushInfo resource : resources) { |
SpdyHeaderBlock headers = SynthesizePushRequestHeaders( |
request_url, resource, original_request_headers); |