Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: net/quic/chromium/quic_http_stream.cc

Issue 2804723003: QUIC - fix crash bug in client handling of Server Push. (Closed)
Patch Set: review feedback + pull Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/chromium/quic_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_http_stream.cc
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index 3b031b93f7ce6d1d9a74d68f82965c9f39d87734..4debbec04ae9181168f55064813d1167476bc7ee 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -274,7 +274,6 @@ int QuicHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
// A request with a body is ineligible for push, so reset the
// promised stream and request a new stream.
if (found_promise_) {
- found_promise_ = false;
std::string url(request_info_->url.spec());
QuicClientPromisedInfo* promised =
session_->push_promise_index()->GetPromised(url);
@@ -301,10 +300,13 @@ int QuicHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
int rv;
- if (found_promise_) {
+ if (!found_promise_) {
+ next_state_ = STATE_SET_REQUEST_PRIORITY;
+ } else if (!request_body_stream_) {
next_state_ = STATE_HANDLE_PROMISE;
} else {
- next_state_ = STATE_SET_REQUEST_PRIORITY;
+ found_promise_ = false;
+ next_state_ = STATE_REQUEST_STREAM;
}
rv = DoLoop(OK);
« no previous file with comments | « no previous file | net/quic/chromium/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698