diff options
author | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-20 17:41:04 +0000 |
---|---|---|
committer | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-20 17:41:04 +0000 |
commit | 31485d6477c7c375e7f69300f8dddceea205b58d (patch) | |
tree | bc4ede2155d456e198580aaff2e12bb1f781d1ee | |
parent | d8cee5d9f621266afabc7a7bd30a26f715b7c932 (diff) | |
download | chromium_src-31485d6477c7c375e7f69300f8dddceea205b58d.zip chromium_src-31485d6477c7c375e7f69300f8dddceea205b58d.tar.gz chromium_src-31485d6477c7c375e7f69300f8dddceea205b58d.tar.bz2 |
SPDY - Handle incomplete headers during server push.
Small fix to check for headers before accessing them.
Original review URL:
https://chromiumcodereview.appspot.com/10832170/
R=scarybeasts@gmail.com, rch@chromium.org
BUG=135485
TEST=network unit tests and accessing https://jetty.intalio.com:10111/spdy/
crashes the browser on Linux
Review URL: https://chromiumcodereview.appspot.com/10829349
git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@152353 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/http/http_network_transaction.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 51b5a6e..9627129 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -920,8 +920,11 @@ int HttpNetworkTransaction::DoReadBodyComplete(int result) { // 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(); + if (headers) + keep_alive = headers->IsKeepAlive(); + } } // Clean up connection if we are done. |