diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 07:55:01 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 07:55:01 +0000 |
commit | e2a915a20cdb375e533c780691231f3a162ce8bf (patch) | |
tree | bb55324a1980fcdc1933129480164a1a5270c87e /net | |
parent | 112069372b92728cc3d348dc436a2ad761dbd452 (diff) | |
download | chromium_src-e2a915a20cdb375e533c780691231f3a162ce8bf.zip chromium_src-e2a915a20cdb375e533c780691231f3a162ce8bf.tar.gz chromium_src-e2a915a20cdb375e533c780691231f3a162ce8bf.tar.bz2 |
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
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_network_transaction.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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). } |