From e2a915a20cdb375e533c780691231f3a162ce8bf Mon Sep 17 00:00:00 2001 From: "mbelshe@chromium.org" Date: Thu, 19 Aug 2010 07:55:01 +0000 Subject: A WebKit layout test failed with the HttpNetworkTransaction refactoring. The problem is that upload progress continues after the socket has been returned to the pool, but because we had zeroed out the stream, we could no longer report a value. (We'd go from 100% done, to 0 progress because GetUploadProgress() would return 0) BUG=none TEST=none TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/3189011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56650 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_network_transaction.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 74c2833..a79a9a4 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -833,7 +833,12 @@ int HttpNetworkTransaction::DoReadBodyComplete(int result) { if (done) { LogTransactionMetrics(); stream_->Close(!keep_alive); - stream_.reset(); + // Note: we don't reset the stream here. We've closed it, but we still + // need it around so that callers can call methods such as + // GetUploadProgress() and have them be meaningful. + // TODO(mbelshe): This means we closed the stream here, and we close it + // again in ~HttpNetworkTransaction. Clean that up. + // The next Read call will return 0 (EOF). } -- cgit v1.1