Bug 144386 - Main resource loaded via 304 response becomes empty if reloaded by user
Summary: Main resource loaded via 304 response becomes empty if reloaded by user
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-29 05:11 PDT by Antti Koivisto
Modified: 2015-04-29 19:52 PDT (History)
2 users (show)

See Also:


Attachments
patch (5.77 KB, patch)
2015-04-29 08:48 PDT, Antti Koivisto
darin: 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-04-29 05:11:41 PDT
Main resource loaded via 304 response becomes empty if reloaded by user.
Comment 1 Antti Koivisto 2015-04-29 05:12:13 PDT
<rdar://problem/18480199>
Comment 2 Antti Koivisto 2015-04-29 08:48:33 PDT
Created attachment 251953 [details]
patch
Comment 3 Darin Adler 2015-04-29 09:08:37 PDT
Comment on attachment 251953 [details]
patch

I’ve wondered about this kind of thing for years. Part of the general “what do we want to keep when we reload and what needs to start fresh” topic for requests in general. Also related is the scheme for making reloads bypass cache appropriately.

Is this needed anywhere else? Does it only affect main resources? Is there some way to tie it more closely to other ways we have to change the request in a reloading situation?
Comment 4 Antti Koivisto 2015-04-29 09:20:21 PDT
> Is this needed anywhere else? Does it only affect main resources? Is there
> some way to tie it more closely to other ways we have to change the request
> in a reloading situation?

Main document loading is a rare case where we have a long-lived ResourceRequest not owned by a CachedResource. The refactoring that moved us from entirely special main resource loading to CachedResources based loading (using CachedRawResource) is basically incomplete so we end up with weird special handling.
Comment 5 Antti Koivisto 2015-04-29 10:11:29 PDT
https://trac.webkit.org/r183555
Comment 6 Alexey Proskuryakov 2015-04-29 12:17:34 PDT
http/tests/cache/main-resource-304-reload.html fails on Windows:

https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fcache%2Fmain-resource-304-reload.html
Comment 7 Antti Koivisto 2015-04-29 13:30:17 PDT
Marked it failing on Windows in http://trac.webkit.org/changeset/183573 (like most of the cache test).