summaryrefslogtreecommitdiffstats
path: root/net/http/http_response_headers.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 18:46:27 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 18:46:27 +0000
commit3e221547889de746a6210b1549842f6875585151 (patch)
treeef565336f2e0a4b3e999d494531b198b25afdc03 /net/http/http_response_headers.cc
parentb69277df648bcfce684dfe18e2f13073897fb195 (diff)
downloadchromium_src-3e221547889de746a6210b1549842f6875585151.zip
chromium_src-3e221547889de746a6210b1549842f6875585151.tar.gz
chromium_src-3e221547889de746a6210b1549842f6875585151.tar.bz2
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
Diffstat (limited to 'net/http/http_response_headers.cc')
-rw-r--r--net/http/http_response_headers.cc6
1 files changed, 2 insertions, 4 deletions
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;