Bug 145348 - Permanent redirects should have long implicit cache lifetime
Summary: Permanent redirects should have long implicit cache lifetime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-23 10:59 PDT by Antti Koivisto
Modified: 2015-05-23 20:16 PDT (History)
3 users (show)

See Also:


Attachments
patch (6.98 KB, patch)
2015-05-23 11:37 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-mavericks (592.00 KB, application/zip)
2015-05-23 12:26 PDT, Build Bot
no flags Details
patch (5.25 KB, patch)
2015-05-23 15:50 PDT, Antti Koivisto
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.