Chromium Code Reviews| Index: content/browser/loader/resource_dispatcher_host_impl.cc |
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
| index 21183c34ab6026001aeeccdfca30332555a1e1f1..602168363cdb5d39846e192ec5958791f4933152 100644 |
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc |
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
| @@ -1715,12 +1715,17 @@ ResourceDispatcherHostImpl::AddStandardHandlers( |
| plugin_service = PluginService::GetInstance(); |
| #endif |
| - // Insert a buffered event handler to sniff the mime type. |
| - // Note: all ResourceHandler following the MimeSniffingResourceHandler should |
| - // expect OnWillRead to be called *before* OnResponseStarted as part of the |
| - // mime sniffing process. |
| - handler.reset(new MimeSniffingResourceHandler( |
| - std::move(handler), this, plugin_service, intercepting_handler, request)); |
| + if (fetch_request_context_type != REQUEST_CONTEXT_TYPE_FETCH) { |
| + // fetch() ignores mime sniffing. |
|
tyoshino (SeeGerritForStatus)
2016/09/08 06:04:31
place above the if
yhirano
2016/09/08 06:08:39
Done.
|
| + // |
| + // Insert a buffered event handler to sniff the mime type. |
| + // Note: all ResourceHandler following the MimeSniffingResourceHandler |
| + // should expect OnWillRead to be called *before* OnResponseStarted as |
| + // part of the mime sniffing process. |
| + handler.reset(new MimeSniffingResourceHandler( |
| + std::move(handler), this, plugin_service, intercepting_handler, |
| + request)); |
| + } |
| // Add the pre mime sniffing throttles. |
| handler.reset(new ThrottlingResourceHandler( |