| Index: net/http/http_cache_transaction.cc
|
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
|
| index a69bcc0b4397632ecec8b46f39dcadf913873cc0..f4de0729f28b83f8169eee63b70a594c6f613b7a 100644
|
| --- a/net/http/http_cache_transaction.cc
|
| +++ b/net/http/http_cache_transaction.cc
|
| @@ -449,10 +449,13 @@ bool HttpCache::Transaction::GetFullRequestHeaders(
|
|
|
| void HttpCache::Transaction::DoneReading() {
|
| if (cache_.get() && entry_) {
|
| - DCHECK(reading_);
|
| DCHECK_NE(mode_, UPDATE);
|
| - if (mode_ & WRITE)
|
| + if (mode_ & WRITE) {
|
| DoneWritingToEntry(true);
|
| + } else {
|
| + cache_->DoneReadingFromEntry(entry_, this);
|
| + entry_ = NULL;
|
| + }
|
| }
|
| }
|
|
|
| @@ -1340,10 +1343,6 @@ int HttpCache::Transaction::DoTruncateCachedMetadataComplete(int result) {
|
| }
|
| }
|
|
|
| - // If this response is a redirect, then we can stop writing now. (We don't
|
| - // need to cache the response body of a redirect.)
|
| - if (response_.headers->IsRedirect(NULL))
|
| - DoneWritingToEntry(true);
|
| next_state_ = STATE_PARTIAL_HEADERS_RECEIVED;
|
| return OK;
|
| }
|
|
|