JavaScriptCore:
2009-06-03 Antti Koivisto <Antti Koivisto>
Reviewed by Dave Kilzer.
https://bugs.webkit.org/show_bug.cgi?id=13128
Safari not obeying cache header
Export JSC::parseDate()
WebCore:
2009-06-03 Antti Koivisto <Antti Koivisto>
Reviewed by Dave Kilzer.
https://bugs.webkit.org/show_bug.cgi?id=13128
Safari not obeying cache header
Implement RFC 2616 cache expiration calculations in WebKit instead of
relying on the networking layer.
- ForwardingHeaders/runtime/DateMath.h: Added.
- WebCore.base.exp:
- loader/Cache.cpp:
(WebCore::Cache::revalidationSucceeded):
- loader/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::isExpired):
(WebCore::CachedResource::currentAge):
(WebCore::CachedResource::freshnessLifetime):
(WebCore::CachedResource::setResponse):
(WebCore::CachedResource::updateResponseAfterRevalidation):
(WebCore::CachedResource::mustRevalidate):
- loader/CachedResource.h:
- platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
(WebCore::ResourceResponseBase::cacheControlContainsNoCache):
(WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
(WebCore::ResourceResponseBase::cacheControlMaxAge):
(WebCore::parseDateValueInHeader):
(WebCore::ResourceResponseBase::date):
(WebCore::ResourceResponseBase::age):
(WebCore::ResourceResponseBase::expires):
(WebCore::ResourceResponseBase::lastModified):
(WebCore::ResourceResponseBase::isAttachment):
(WebCore::ResourceResponseBase::compare):
- platform/network/ResourceResponseBase.h:
- platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
- platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
LayoutTests:
2009-06-03 Antti Koivisto <Antti Koivisto>
Reviewed by Dave Kilzer.
https://bugs.webkit.org/show_bug.cgi?id=13128
Safari not obeying cache header
Test subresource caching and expiration.
- http/tests/cache: Added.
- http/tests/cache/resources: Added.
- http/tests/cache/resources/cache-simulator.cgi: Added.
- http/tests/cache/resources/subresource-test.js: Added.
(frame1.onload):
(frame2.onload):
(loadTestFrame.scr.onload):
(nextTest):
(testComplete):
(runTests):
- http/tests/cache/resources/test-frame.html: Added.
- http/tests/cache/subresource-expiration-expected.txt: Added.
- http/tests/cache/subresource-expiration.html: Added.