WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
143159
[WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
https://bugs.webkit.org/show_bug.cgi?id=143159
Summary
[WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
Chris Dumez
Reported
2015-03-27 15:39:25 PDT
Add support for "Cache-Control: max-stale" request header:
https://tools.ietf.org/html/rfc7234#section-5.2.1.2
Attachments
Patch
(14.52 KB, patch)
2015-03-27 16:15 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(14.61 KB, patch)
2015-03-30 09:03 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-03-27 15:39:44 PDT
<
rdar://problem/20333296
>
Chris Dumez
Comment 2
2015-03-27 16:15:08 PDT
Created
attachment 249619
[details]
Patch
Antti Koivisto
Comment 3
2015-03-28 07:41:33 PDT
We are now getting to really obscure corners of the spec. Are there any indications that anyone uses this?
Antti Koivisto
Comment 4
2015-03-28 08:09:11 PDT
Comment on
attachment 249619
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=249619&action=review
Well I suppose it is a potentially useful feature even if it is unknown. r=me but please consider factoring it differently.
> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:168 > bool hasExpired = age > lifetime; > + if (hasExpired && !std::isnan(maxStale)) { > + // Request is allowing stale responses. > + //
https://tools.ietf.org/html/rfc7234#section-5.2.1.2
. > + if ((age - lifetime) < maxStale) > + hasExpired = false; > + }
maxStale = std::isnan(maxStale) ? 0 : maxStale; bool hasExpired = age - lifetime > maxStale;
> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:181 > +static bool requestRequiresRevalidation(const WebCore::ResourceRequest& request, double& maxStale) > { > auto requestDirectives = WebCore::parseCacheControlDirectives(request.httpHeaderFields()); > + maxStale = requestDirectives.maxStale;
This is a bit strange way to factor this. We should probably combine requestRequiresRevalidation and responseHasExpired since you really need to be looking at both request and response to implement all semantics.
Chris Dumez
Comment 5
2015-03-30 09:03:21 PDT
Created
attachment 249732
[details]
Patch
WebKit Commit Bot
Comment 6
2015-03-30 10:36:27 PDT
Comment on
attachment 249732
[details]
Patch Clearing flags on attachment: 249732 Committed
r182145
: <
http://trac.webkit.org/changeset/182145
>
WebKit Commit Bot
Comment 7
2015-03-30 10:36:31 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug