Bug 153708 - [GTK] http/tests/cache/disk-cache/disk-cache-last-modified.html is failing
Summary: [GTK] http/tests/cache/disk-cache/disk-cache-last-modified.html is failing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-30 08:56 PST by Michael Catanzaro
Modified: 2022-11-08 00:33 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-01-30 08:56:26 PST
http/tests/cache/disk-cache/disk-cache-last-modified.html has been failing since it was added in r188690:

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/http/tests/cache/disk-cache/disk-cache-last-modified-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/http/tests/cache/disk-cache/disk-cache-last-modified-actual.txt
@@ -10,30 +10,30 @@
 response source: Disk cache
 
 response headers: {"Last-Modified":"Thu, 01 Jan 1970 00:00:00 GMT"}
-response source: Network
+response source: Disk cache
 
 response headers: {"Last-Modified":"invalid"}
-response source: Network
+response source: Disk cache
 
 --------Testing loads through memory cache (XHR behavior)--------
 response headers: {"Last-Modified":"Thu, 01 Jan 2000 00:00:00 GMT"}
 response source: Memory cache
 
 response headers: {"Last-Modified":"Thu, 01 Jan 1970 00:00:00 GMT"}
-response source: Network
+response source: Memory cache
 
 response headers: {"Last-Modified":"invalid"}
-response source: Network
+response source: Memory cache
 
 --------Testing loads through memory cache (subresource behavior)--------
 response headers: {"Last-Modified":"Thu, 01 Jan 2000 00:00:00 GMT"}
 response source: Memory cache
 
 response headers: {"Last-Modified":"Thu, 01 Jan 1970 00:00:00 GMT"}
-response source: Network
+response source: Memory cache
 
 response headers: {"Last-Modified":"invalid"}
-response source: Network
+response source: Memory cache
 
 PASS successfullyParsed is true
Comment 1 Carlos Garcia Campos 2016-02-02 04:44:29 PST
I can't reproduce this locally.
Comment 2 Carlos Garcia Campos 2016-02-03 06:06:08 PST
This test was added to fix a workaround in CFNetwork, so the tests could be skipped in GTK+. However, I'm not so sure it's a CFNetwork bug, but a problem in servers, so we might want to behave the same way Mac port does. There's an interesting discussion about this in bug #148162. The thing is that in case of an invalid date in Last-Modified header, we are getting Epoch as date, and then caching those resources. I agree with the reasoning in bug #148162 and the decision made for the Mac port as well. It's very unlikely that are breaking some site using Epoch on purpose, and I really think we would be fixing more cases than broke, anyway. What do you think?
Comment 3 Carlos Garcia Campos 2016-02-03 09:51:24 PST
I'm confused now. If I run the test manually launching the server with Tools/Scripts/run-webkit-httpd and using WTR it gives the expected results, but if I use Tools/Scripts/run-webkit-tests the memory cache is still used.
Comment 4 Michael Catanzaro 2016-02-03 09:53:41 PST
My vote is to do what Apple does, treat epoch as invalid, and bypass both caches. A small minority of sites send these broken headers: do we display them broken for four years, or do we display them slowly? I vote for slowly. If I couldn't decide based on that alone, I would still favor following what Apple does.

But, I think both options are reasonable.
Comment 5 Vitaly Dyackhov 2022-11-07 07:44:25 PST
Pull request: https://github.com/WebKit/WebKit/pull/6207
Comment 6 EWS 2022-11-08 00:33:00 PST
Test gardening commit 256440@main (6f536b7be60e): <https://commits.webkit.org/256440@main>

Reviewed commits have been landed. Closing PR #6207 and removing active labels.