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

Unified Diff: net/http/http_network_transaction.cc

Issue 10836084: SPDY - Handle incomplete headers during server push. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/spdy/spdy_http_stream.h » ('j') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 149736)
+++ net/http/http_network_transaction.cc (working copy)
@@ -260,7 +260,8 @@
bool keep_alive = false;
// Even if the server says the connection is keep-alive, we have to be
// able to find the end of each response in order to reuse the connection.
- if (GetResponseHeaders()->IsKeepAlive() &&
+ HttpResponseHeaders* headers = GetResponseHeaders();
+ if (headers && headers->IsKeepAlive() &&
Ryan Hamilton 2012/08/03 19:52:14 Is this change related to the SPDY server push bug
ramant (doing other things) 2012/08/03 20:50:40 Deleted this change.
stream_->CanFindEndOfResponse()) {
// If the response body hasn't been completely read, we need to drain
// it first.
@@ -920,8 +921,11 @@
// TODO(mbelshe): The keepalive property is really a property of
// the stream. No need to compute it here just to pass back
// to the stream's Close function.
- if (stream_->CanFindEndOfResponse())
- keep_alive = GetResponseHeaders()->IsKeepAlive();
+ if (stream_->CanFindEndOfResponse()) {
+ HttpResponseHeaders* headers = GetResponseHeaders();
Ryan Hamilton 2012/08/03 19:52:14 (Ditto)
ramant (doing other things) 2012/08/03 20:50:40 SpdyNetworkTransactionSpdy3Test..ServerPushWithNoS
Ryan Hamilton 2012/08/03 21:10:01 Does that test cause a crash with your new code, o
+ if (headers)
+ keep_alive = headers->IsKeepAlive();
+ }
}
// Clean up connection if we are done.
« no previous file with comments | « no previous file | net/spdy/spdy_http_stream.h » ('j') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698