Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2767853003: Remove stale-while-revalidate from blink (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index e0928aa3b1395f83982f34bd2bb884245e8ec408..d94093a296bd570b116ee3a9e24615b998b62859 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -700,14 +700,11 @@ CacheControlHeader parseCacheControlDirectives(
CacheControlHeader cacheControlHeader;
cacheControlHeader.parsed = true;
cacheControlHeader.maxAge = std::numeric_limits<double>::quiet_NaN();
- cacheControlHeader.staleWhileRevalidate =
- std::numeric_limits<double>::quiet_NaN();
static const char noCacheDirective[] = "no-cache";
static const char noStoreDirective[] = "no-store";
static const char mustRevalidateDirective[] = "must-revalidate";
static const char maxAgeDirective[] = "max-age";
- static const char staleWhileRevalidateDirective[] = "stale-while-revalidate";
if (!cacheControlValue.isEmpty()) {
Vector<std::pair<String, String>> directives;
@@ -734,17 +731,6 @@ CacheControlHeader parseCacheControlDirectives(
double maxAge = directives[i].second.toDouble(&ok);
if (ok)
cacheControlHeader.maxAge = maxAge;
- } else if (equalIgnoringCase(directives[i].first,
- staleWhileRevalidateDirective)) {
- if (!std::isnan(cacheControlHeader.staleWhileRevalidate)) {
- // First stale-while-revalidate directive wins if there are multiple
- // ones.
- continue;
- }
- bool ok;
- double staleWhileRevalidate = directives[i].second.toDouble(&ok);
- if (ok)
- cacheControlHeader.staleWhileRevalidate = staleWhileRevalidate;
}
}
}
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698