Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Issue 2323623002: Do not sniff mime type for fetch() requests (Closed)

Created:
4 years, 3 months ago by yhirano
Modified:
4 years, 3 months ago
CC:
chromium-reviews, jam, Randy Smith (Not in Mondays), blink-reviews, darin-cc_chromium.org, loading-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not sniff mime type for fetch() requests 1. The mime sniffer buffers some body data. This is a very confusing behavior for streaming usecases. 2. The fetch spec uses the MIME type with parameters which WebURLResponse::mimeType doesn't provide. We need to parse Content-Type header in any case and mime sniffing may introduce inconsistency here. 3. We don't see any benefit of mime sniffing for fetch() initiated requests. From the above reasons we don't want the mime sniffer to run for fetch() initiated requests. BUG=2016 Committed: https://crrev.com/623498505e8ba7742b7aa5ba56b4f3933695b66c Cr-Commit-Position: refs/heads/master@{#419994}

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix #

Total comments: 4

Patch Set 3 : fix #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -19 lines) Patch
M content/browser/loader/mime_sniffing_resource_handler.h View 1 2 3 chunks +5 lines, -1 line 0 comments Download
M content/browser/loader/mime_sniffing_resource_handler.cc View 1 2 4 chunks +8 lines, -2 lines 0 comments Download
M content/browser/loader/mime_sniffing_resource_handler_unittest.cc View 1 2 6 chunks +67 lines, -9 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html View 1 1 chunk +12 lines, -0 lines 3 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/chromium/resources/mime-sniffing.php View 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 39 (21 generated)
yhirano
4 years, 3 months ago (2016-09-08 05:29:09 UTC) #6
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/2323623002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2323623002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1719 content/browser/loader/resource_dispatcher_host_impl.cc:1719: // fetch() ignores mime sniffing. place above the ...
4 years, 3 months ago (2016-09-08 06:04:32 UTC) #10
yhirano
https://codereview.chromium.org/2323623002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2323623002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1719 content/browser/loader/resource_dispatcher_host_impl.cc:1719: // fetch() ignores mime sniffing. On 2016/09/08 06:04:31, tyoshino ...
4 years, 3 months ago (2016-09-08 06:08:40 UTC) #13
yhirano
4 years, 3 months ago (2016-09-08 06:09:54 UTC) #15
yhirano
+mmenke@
4 years, 3 months ago (2016-09-08 06:10:11 UTC) #16
mmenke
https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1719 content/browser/loader/resource_dispatcher_host_impl.cc:1719: if (fetch_request_context_type != REQUEST_CONTEXT_TYPE_FETCH) { Can we put this ...
4 years, 3 months ago (2016-09-08 14:19:19 UTC) #19
yhirano
https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1719 content/browser/loader/resource_dispatcher_host_impl.cc:1719: if (fetch_request_context_type != REQUEST_CONTEXT_TYPE_FETCH) { On 2016/09/08 14:19:18, mmenke ...
4 years, 3 months ago (2016-09-14 13:22:18 UTC) #24
mmenke
Two questions (And sorry I didn't get to this yesterday, was out) https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc ...
4 years, 3 months ago (2016-09-15 15:08:39 UTC) #25
yhirano
https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/2323623002/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1719 content/browser/loader/resource_dispatcher_host_impl.cc:1719: if (fetch_request_context_type != REQUEST_CONTEXT_TYPE_FETCH) { On 2016/09/15 15:08:39, mmenke ...
4 years, 3 months ago (2016-09-20 12:12:31 UTC) #26
mmenke
https://codereview.chromium.org/2323623002/diff/40001/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html File third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html (right): https://codereview.chromium.org/2323623002/diff/40001/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html#newcode12 third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html:12: </script> On 2016/09/20 12:12:31, yhirano (slow) wrote: > On ...
4 years, 3 months ago (2016-09-20 15:00:57 UTC) #27
Charlie Harrison
On 2016/09/20 15:00:57, mmenke wrote: > https://codereview.chromium.org/2323623002/diff/40001/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html > File third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html > (right): > > https://codereview.chromium.org/2323623002/diff/40001/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/mime-sniffing.html#newcode12 ...
4 years, 3 months ago (2016-09-20 15:05:00 UTC) #28
mmenke
On 2016/09/20 15:05:00, Charlie Harrison wrote: > On 2016/09/20 15:00:57, mmenke wrote: > > > ...
4 years, 3 months ago (2016-09-20 15:08:02 UTC) #29
Charlie Harrison
On 2016/09/20 15:08:02, mmenke wrote: > On 2016/09/20 15:05:00, Charlie Harrison wrote: > > On ...
4 years, 3 months ago (2016-09-20 15:20:47 UTC) #30
mmenke
On 2016/09/20 15:08:02, mmenke wrote: > On 2016/09/20 15:05:00, Charlie Harrison wrote: > > On ...
4 years, 3 months ago (2016-09-20 16:49:52 UTC) #31
yhirano
Thank you! tyoshino@ reviewed the layout test so I think it's OK.
4 years, 3 months ago (2016-09-21 05:47:36 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2323623002/40001
4 years, 3 months ago (2016-09-21 05:47:55 UTC) #35
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-21 07:17:21 UTC) #37
commit-bot: I haz the power
4 years, 3 months ago (2016-09-21 07:20:38 UTC) #39
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/623498505e8ba7742b7aa5ba56b4f3933695b66c
Cr-Commit-Position: refs/heads/master@{#419994}

Powered by Google App Engine
This is Rietveld 408576698