summaryrefslogtreecommitdiffstats
path: root/net/http/partial_data.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-12 20:48:02 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-12 20:48:02 +0000
commita5c9d98da16e6d88450b5a407996227c02a4cf79 (patch)
tree20770639d8500af2a560333ea235c90196ecec5f /net/http/partial_data.h
parent67e0fc29356f68f5eda80e6f65dcc08b45927256 (diff)
downloadchromium_src-a5c9d98da16e6d88450b5a407996227c02a4cf79.zip
chromium_src-a5c9d98da16e6d88450b5a407996227c02a4cf79.tar.gz
chromium_src-a5c9d98da16e6d88450b5a407996227c02a4cf79.tar.bz2
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/3722001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/partial_data.h')
-rw-r--r--net/http/partial_data.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/partial_data.h b/net/http/partial_data.h
index 22e0c8b..45bef31 100644
--- a/net/http/partial_data.h
+++ b/net/http/partial_data.h
@@ -84,7 +84,9 @@ class PartialData {
bool ResponseHeadersOK(const HttpResponseHeaders* headers);
// Fixes the response headers to include the right content length and range.
- void FixResponseHeaders(HttpResponseHeaders* headers);
+ // |success| is the result of the whole request so if it's false, we'll change
+ // the result code to be 416.
+ void FixResponseHeaders(HttpResponseHeaders* headers, bool success);
// Fixes the content length that we want to store in the cache.
void FixContentLength(HttpResponseHeaders* headers);