From 3e221547889de746a6210b1549842f6875585151 Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Fri, 16 Oct 2009 18:46:27 +0000 Subject: HTTP Cache: Apply all freshness tests to Partial content entries. BUG=24057 TEST=unittest Review URL: http://codereview.chromium.org/267122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29301 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_response_headers.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/http/http_response_headers.cc') diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 4397939..9348006 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -840,9 +840,6 @@ TimeDelta HttpResponseHeaders::GetFreshnessLifetime( // there are cache-control directives or another header(s) that explicitly // allow it. // - // Since we do not support byte range requests yet, we exclude 206. See - // HttpCache::Transaction::ShouldPassThrough. - // // From RFC 2616 section 14.9.4: // // When the must-revalidate directive is present in a response received by @@ -852,7 +849,8 @@ TimeDelta HttpResponseHeaders::GetFreshnessLifetime( // time, if, based solely on the origin server's Expires or max-age value, // the cached response is stale.) // - if ((response_code_ == 200 || response_code_ == 203) && + if ((response_code_ == 200 || response_code_ == 203 || + response_code_ == 206) && !HasHeaderValue("cache-control", "must-revalidate")) { // TODO(darin): Implement a smarter heuristic. Time last_modified_value; -- cgit v1.1