Bug 145348

Summary: Permanent redirects should have long implicit cache lifetime
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, rniwa
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-mavericks
none
patch sam: review+

Description Antti Koivisto 2015-05-23 10:59:56 PDT
301 Permanent Redirect that doesn't specify explicit lifetime should have long implicit lifetime. This matches other browsers. (see HttpResponseHeaders::GetFreshnessLifetime() in http://src.chromium.org/viewvc/chrome/trunk/src/net/http/http_response_headers.cc for example)
Comment 1 Antti Koivisto 2015-05-23 11:00:30 PDT
rdar://problem/20680519
Comment 2 Antti Koivisto 2015-05-23 11:37:23 PDT
Created attachment 253648 [details]
patch
Comment 3 Build Bot 2015-05-23 12:26:35 PDT
Comment on attachment 253648 [details]
patch

Attachment 253648 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5067876985733120

New failing tests:
http/tests/cache/cache-redirections.html
Comment 4 Build Bot 2015-05-23 12:26:38 PDT
Created attachment 253649 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 5 Antti Koivisto 2015-05-23 15:50:46 PDT
Created attachment 253652 [details]
patch
Comment 6 Sam Weinig 2015-05-23 17:33:47 PDT
Comment on attachment 253652 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=253652&action=review

> Source/WebCore/ChangeLog:10
> +        301 Moved Permanently response that doesn't specify explicit lifetime should have long implicit lifetime.
> +        This matches other browsers.

Is this something that should be spac'd at some point? Should it be added to https://wiki.whatwg.org/wiki/HTTP?

> Source/WebCore/platform/network/CacheValidation.cpp:128
> +        return hours(365 * 24);

Too bad std::chrono doesn't have std::chromo::years.
Comment 7 Antti Koivisto 2015-05-23 20:16:00 PDT
http://trac.webkit.org/changeset/184837
Comment 8 Antti Koivisto 2015-05-23 20:16:54 PDT
> Is this something that should be spac'd at some point? Should it be added to
> https://wiki.whatwg.org/wiki/HTTP?

Maybe!

> Too bad std::chrono doesn't have std::chromo::years.

I suppose it would be hard to define exactly.