Bug 175099 - [Fetch API] Response should keep all ResourceResponse information
Summary: [Fetch API] Response should keep all ResourceResponse information
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-02 16:38 PDT by youenn fablet
Modified: 2017-08-05 15:12 PDT (History)
10 users (show)

See Also:


Attachments
Patch (20.24 KB, patch)
2017-08-02 16:45 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-elcapitan (1.22 MB, application/zip)
2017-08-02 17:32 PDT, Build Bot
no flags Details
Patch (23.25 KB, patch)
2017-08-02 17:35 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-elcapitan (1.10 MB, application/zip)
2017-08-02 18:24 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (966.28 KB, application/zip)
2017-08-02 18:59 PDT, Build Bot
no flags Details
Patch (25.00 KB, patch)
2017-08-03 11:37 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2017-08-02 16:38:56 PDT
This is useful if caching the response or reusing it from a service worker.
Comment 1 youenn fablet 2017-08-02 16:45:41 PDT
Created attachment 317030 [details]
Patch
Comment 2 Build Bot 2017-08-02 17:32:01 PDT
Comment on attachment 317030 [details]
Patch

Attachment 317030 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4242742

New failing tests:
http/tests/inspector/network/fetch-network-data.html
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.html
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker.html
Comment 3 Build Bot 2017-08-02 17:32:02 PDT
Created attachment 317041 [details]
Archive of layout-test-results from ews100 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 youenn fablet 2017-08-02 17:35:56 PDT
Created attachment 317044 [details]
Patch
Comment 5 Build Bot 2017-08-02 18:23:58 PDT
Comment on attachment 317044 [details]
Patch

Attachment 317044 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4243084

New failing tests:
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.html
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker.html
Comment 6 Build Bot 2017-08-02 18:24:00 PDT
Created attachment 317057 [details]
Archive of layout-test-results from ews101 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 Build Bot 2017-08-02 18:59:44 PDT
Comment on attachment 317044 [details]
Patch

Attachment 317044 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4243260

New failing tests:
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.html
imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker.html
Comment 8 Build Bot 2017-08-02 18:59:46 PDT
Created attachment 317063 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 9 youenn fablet 2017-08-03 11:37:31 PDT
Created attachment 317134 [details]
Patch
Comment 10 Sam Weinig 2017-08-03 16:10:49 PDT
Is the goal to (eventually) add all the flags / state defined in https://fetch.spec.whatwg.org/#concept-response to ResourceResponse?
Comment 11 youenn fablet 2017-08-03 16:19:08 PDT
(In reply to Sam Weinig from comment #10)
> Is the goal to (eventually) add all the flags / state defined in
> https://fetch.spec.whatwg.org/#concept-response to ResourceResponse?

This is roughly the direction but this is case-by-case really.
This tainting thing is a convenient way to support filtered response and internal response.
That will allow service worker to send opaque responses with all information.
Having the tainting/filtering information in ResourceResponse allows easy transfer of this information to different threads and different processes which is useful for Workers or Cache API.
Comment 12 Sam Weinig 2017-08-05 13:15:32 PDT
(In reply to youenn fablet from comment #11)
> (In reply to Sam Weinig from comment #10)
> > Is the goal to (eventually) add all the flags / state defined in
> > https://fetch.spec.whatwg.org/#concept-response to ResourceResponse?
> 
> This is roughly the direction but this is case-by-case really.
> This tainting thing is a convenient way to support filtered response and
> internal response.
> That will allow service worker to send opaque responses with all information.
> Having the tainting/filtering information in ResourceResponse allows easy
> transfer of this information to different threads and different processes
> which is useful for Workers or Cache API.

Ok. It would be nice to have a clearer picture for where the load infrastructure is going, and how it will map to the Fetch standard.
Comment 13 youenn fablet 2017-08-05 14:47:56 PDT
> Ok. It would be nice to have a clearer picture for where the load
> infrastructure is going, and how it will map to the Fetch standard.

CachedResourceRequest is the equivalent of a fetch request.
Cached resource is the equivalent of a fetch record/on-going fetch.
Fetch algorithm entry point is either CachedResourceLoader (like the refactored beacon API loading) or DocumentThreadableLoader/FetchLoader for raw resources.

Fetch algorithm is mainly implemented in CachedResourceLoader/CachedResource/ResourceLoader although part of it is in DocumentThreadableLoader also.
Comment 14 WebKit Commit Bot 2017-08-05 15:11:31 PDT
Comment on attachment 317134 [details]
Patch

Clearing flags on attachment: 317134

Committed r220320: <http://trac.webkit.org/changeset/220320>
Comment 15 WebKit Commit Bot 2017-08-05 15:11:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2017-08-05 15:12:10 PDT
<rdar://problem/33742093>