summaryrefslogtreecommitdiffstats
path: root/net/http/http_response_headers.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 01:13:36 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 01:13:36 +0000
commitdbd39fbe246f0234c3d583ac52c3d9351acc9393 (patch)
tree7f8e89e1a1b8a8fb8c6cfd2a569cc00c4d272ca7 /net/http/http_response_headers.h
parent5cfae741680e577a27ad993fb7508c8c156ce331 (diff)
downloadchromium_src-dbd39fbe246f0234c3d583ac52c3d9351acc9393.zip
chromium_src-dbd39fbe246f0234c3d583ac52c3d9351acc9393.tar.gz
chromium_src-dbd39fbe246f0234c3d583ac52c3d9351acc9393.tar.bz2
Http cache: Avoid resuming (and keeping) truncated entries
if the server doesn't provide a strong validator. We require: - A strong etag or a strong last modified date. - The total Content length. - Lack of an explicit rejection of ranges (Accept-ranges: none) This aligns better with the conditions used by Firefox. BUG=30220, b/2329250 TEST=unittests Review URL: http://codereview.chromium.org/517043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_response_headers.h')
-rw-r--r--net/http/http_response_headers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index c071389..f6656e3 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -211,6 +211,10 @@ class HttpResponseHeaders
// Determines if this response indicates a keep-alive connection.
bool IsKeepAlive() const;
+ // Returns true if this response has a strong etag or last-modified header.
+ // See section 13.3.3 of RFC 2616.
+ bool HasStrongValidators() const;
+
// Extracts the value of the Content-Length header or returns -1 if there is
// no such header in the response.
int64 GetContentLength() const;