diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 19:48:29 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 19:48:29 +0000 |
commit | ab80bac7428906fccfafbc4d620538ded23a2a83 (patch) | |
tree | 1d600ea2a46e92dffc3e4e3670057aa3c582016e /net/http/http_cache_transaction.h | |
parent | 93d3f0b6a87b6b474439e7368aec64b30b0e9295 (diff) | |
download | chromium_src-ab80bac7428906fccfafbc4d620538ded23a2a83.zip chromium_src-ab80bac7428906fccfafbc4d620538ded23a2a83.tar.gz chromium_src-ab80bac7428906fccfafbc4d620538ded23a2a83.tar.bz2 |
Revert 62171 - Http cache: make sure that we revalidate a cached entry
when the requested byte range looks wrong.
We postpone the decision about what to do with a cached
entry until we receive confirmation from the server, so
we cannot skip asking the server about it!.
This CL also makes it so that if the server returns 304
(so that our cached copy is curent), we don't destroy the
entry, and we return 416 (bad range request) to the caller.
BUG=58047
TEST=net_unittests
Review URL: http://codereview.chromium.org/3611013
TBR=rvargas@google.com
Review URL: http://codereview.chromium.org/3644005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache_transaction.h')
-rw-r--r-- | net/http/http_cache_transaction.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h index 4d3673c..2883282 100644 --- a/net/http/http_cache_transaction.h +++ b/net/http/http_cache_transaction.h @@ -267,15 +267,12 @@ class HttpCache::Transaction : public HttpTransaction { // Makes sure that a 206 response is expected. Returns true on success. // On success, |partial_content| will be set to true if we are processing a // partial entry. - bool ValidatePartialResponse(bool* partial_content); + bool ValidatePartialResponse(const HttpResponseHeaders* headers, + bool* partial_content); // Handles a response validation error by bypassing the cache. void IgnoreRangeRequest(); - // Changes the response code of a range request to be 416 (Requested range not - // satisfiable). - void FailRangeRequest(); - // Reads data from the network. int ReadFromNetwork(IOBuffer* data, int data_len); |