https://bugs.webkit.org/show_bug.cgi?id=83925
<rdar://problem/
11231790>
Reviewed by Antti Koivisto.
Added subtests to http/tests/cache/subresource-expiration-2.html.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives): Honor first max-age
instead of the last. New behavior matches both Firefox and IE.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114165
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-13 Alexey Proskuryakov <ap@apple.com>
+
+ REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached
+ https://bugs.webkit.org/show_bug.cgi?id=83925
+ <rdar://problem/11231790>
+
+ Reviewed by Antti Koivisto.
+
+ * http/tests/cache/subresource-expiration-2-expected.txt:
+ * http/tests/cache/subresource-expiration-2.html:
+ Added tests for multiple max-age directives.
+
2012-04-13 Rob Flack <flackr@chromium.org>
Chromium: Should enable -webkit-image-set
Age: 100; Cache-control: max-age=10; (result=Uncached expected=Uncached) PASS
Age: 1; Cache-control: max-age=10; (result=Cached expected=Cached) PASS
Cache-control: max-age=10; Pragma: no-cache; (result=Uncached expected=Uncached) PASS
+Cache-control: max-age=0, private, must-revalidate, max-age=60; (result=Uncached expected=Uncached) PASS
+Cache-control: max-age=60, private, must-revalidate, max-age=0; (result=Cached expected=Cached) PASS
Expires: [now-10s]; Cache-control: max-age=10; (result=Cached expected=Cached) PASS
Expires: [now+10s]; Cache-control: max-age=0; (result=Uncached expected=Uncached) PASS
Last-modified: [now-3600s]; [delay=1.5s] (result=Cached expected=Cached) PASS
},
{
testHeaders: {
+ 'Cache-control': 'max-age=0, private, must-revalidate, max-age=60',
+ },
+ expectedResult: 'Uncached',
+ },
+ {
+ testHeaders: {
+ 'Cache-control': 'max-age=60, private, must-revalidate, max-age=0',
+ },
+ expectedResult: 'Cached',
+ },
+ {
+ testHeaders: {
'Expires': '[now-10s]',
'Cache-control': 'max-age=10'
},
+2012-04-13 Alexey Proskuryakov <ap@apple.com>
+
+ REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached
+ https://bugs.webkit.org/show_bug.cgi?id=83925
+ <rdar://problem/11231790>
+
+ Reviewed by Antti Koivisto.
+
+ Added subtests to http/tests/cache/subresource-expiration-2.html.
+
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::parseCacheControlDirectives): Honor first max-age
+ instead of the last. New behavior matches both Firefox and IE.
+
2012-04-13 James Robinson <jamesr@chromium.org>
[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
else if (equalIgnoringCase(directives[i].first, mustRevalidateDirective))
m_cacheControlContainsMustRevalidate = true;
else if (equalIgnoringCase(directives[i].first, maxAgeDirective)) {
+ if (!isnan(m_cacheControlMaxAge)) {
+ // First max-age directive wins if there are multiple ones.
+ continue;
+ }
bool ok;
double maxAge = directives[i].second.toDouble(&ok);
if (ok)