Chromium Code Reviews| 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. |