Bug 207441

Summary: Remove setHTTPAccept call for main resources
Product: WebKit Reporter: Rob Buis <rbuis>
Component: Page LoadingAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, darin, dbates, ews-watchlist, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 213626    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Rob Buis 2020-02-09 10:51:49 PST
Remove setHTTPAccept call for main resources since all main resource loading goes
through CachedResourceLoader, which sets the Accept header as specified in:
https://fetch.spec.whatwg.org/#fetching (Step 1.3).
Comment 1 Rob Buis 2020-02-09 10:54:57 PST
Created attachment 390208 [details]
Patch
Comment 2 Darin Adler 2020-02-09 19:59:58 PST
Comment on attachment 390208 [details]
Patch

This leaves us with the ResourceRequestBase::httpAccept(), ResourceRequestBase::setHTTPAccept() and ResourceRequestBase::clearHTTPAccept() functions in ResourceRequestBase all unused. Lets remove those functions.
Comment 3 Darin Adler 2020-02-09 20:00:35 PST
Comment on attachment 390208 [details]
Patch

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

> Source/WebCore/ChangeLog:12
> +        No test since no change in behavior.

It would be worth pointing out which tests check the accept header for main resource loads, since those are the tests that prove there is no change in behavior.
Comment 4 Rob Buis 2020-02-10 00:29:17 PST
Created attachment 390235 [details]
Patch
Comment 5 WebKit Commit Bot 2020-02-10 06:01:24 PST
Comment on attachment 390235 [details]
Patch

Clearing flags on attachment: 390235

Committed r256166: <https://trac.webkit.org/changeset/256166>
Comment 6 WebKit Commit Bot 2020-02-10 06:01:26 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-02-10 06:02:15 PST
<rdar://problem/59308698>
Comment 8 Alex Christensen 2020-06-25 16:37:36 PDT
This broke our API.  See https://bugs.webkit.org/show_bug.cgi?id=213626