New issue
Advanced search Search tips

Issue 746144 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 598073



Sign in to add a comment

Add mime sniffing to network service

Project Member Reported by jam@chromium.org, Jul 19 2017

Issue description

We need mime sniffing in the network service. content/browser/loader/mime_sniffing_resource_handler.cc is the inspiration.
 

Comment 1 by jam@chromium.org, Jul 19 2017

Description: Show this description
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/287591bd8b0165fcabb427ff595d141a9ae89b4b

commit 287591bd8b0165fcabb427ff595d141a9ae89b4b
Author: John Abd-El-Malek <jam@chromium.org>
Date: Thu Jul 20 22:28:30 2017

Add mime sniffing to the network service.

This doesn't handle all the cases (e.g. plugins, downloads) but these don't work
yet with the network service. However it does fix 900 new wpt tests that 
started failing after r487304 since these generated *worker.html files weren't
being served with a mime type which was causing their load to fail.

BUG= 746144 , 729849 

Change-Id: I232c9af1dca32f1c641736c8ccd61978096559ef
Reviewed-on: https://chromium-review.googlesource.com/577507
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488445}
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/browser/loader/mime_sniffing_resource_handler.cc
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/browser/loader/mime_sniffing_resource_handler.h
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/browser/loader/navigation_url_loader_network_service.cc
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/child/resource_dispatcher.cc
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/common/BUILD.gn
[add] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/common/loader_util.cc
[add] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/common/loader_util.h
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/network/DEPS
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/network/url_loader_impl.cc
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/network/url_loader_impl.h
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/network/url_loader_unittest.cc
[modify] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/public/common/url_loader_factory.mojom
[add] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/test/data/content-sniffer-test4.html
[add] https://crrev.com/287591bd8b0165fcabb427ff595d141a9ae89b4b/content/test/data/content-sniffer-test4.html.mock-http-headers

Comment 3 by jam@chromium.org, Jul 21 2017

Owner: jam@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01db9e6de868980ffa29bca92f644c43e1c9b154

commit 01db9e6de868980ffa29bca92f644c43e1c9b154
Author: John Abd-El-Malek <jam@chromium.org>
Date: Fri Jul 21 22:33:15 2017

Add UMA for how often the first read sniffs the final mime type.

This is to figure out whether we need to buffer data in the network service's URLLoaderImpl.

BUG= 746144 

Change-Id: I10a0b5923b8d9fefdceee98bbc07671e53ab4f8d
Reviewed-on: https://chromium-review.googlesource.com/581742
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488776}
[modify] https://crrev.com/01db9e6de868980ffa29bca92f644c43e1c9b154/content/browser/loader/mime_sniffing_resource_handler.cc
[modify] https://crrev.com/01db9e6de868980ffa29bca92f644c43e1c9b154/content/browser/loader/mime_sniffing_resource_handler.h
[modify] https://crrev.com/01db9e6de868980ffa29bca92f644c43e1c9b154/tools/metrics/histograms/histograms.xml

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d44c753cbd42942191e3dce2e66afadd951f1735

commit d44c753cbd42942191e3dce2e66afadd951f1735
Author: John Abd-El-Malek <jam@chromium.org>
Date: Tue Jul 25 01:34:54 2017

Revert "Add UMA for how often the first read sniffs the final mime type."

This reverts commit 01db9e6de868980ffa29bca92f644c43e1c9b154.

Reason for revert: got the data I was curious about.

Original change's description:
> Add UMA for how often the first read sniffs the final mime type.
> 
> This is to figure out whether we need to buffer data in the network service's URLLoaderImpl.
> 
> BUG= 746144 
> 
> Change-Id: I10a0b5923b8d9fefdceee98bbc07671e53ab4f8d
> Reviewed-on: https://chromium-review.googlesource.com/581742
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Ilya Sherman <isherman@chromium.org>
> Reviewed-by: Matt Menke <mmenke@chromium.org>
> Reviewed-by: Steven Holte <holte@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#488776}

TBR=isherman@chromium.org,jam@chromium.org,asvitkine@chromium.org,mmenke@chromium.org,holte@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  746144 
Change-Id: I4b388fbf13e69dd9f8d937234920315011588801
Reviewed-on: https://chromium-review.googlesource.com/583519
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489179}
[modify] https://crrev.com/d44c753cbd42942191e3dce2e66afadd951f1735/content/browser/loader/mime_sniffing_resource_handler.cc
[modify] https://crrev.com/d44c753cbd42942191e3dce2e66afadd951f1735/content/browser/loader/mime_sniffing_resource_handler.h
[modify] https://crrev.com/d44c753cbd42942191e3dce2e66afadd951f1735/tools/metrics/histograms/histograms.xml

Comment 7 by jam@chromium.org, Jul 26 2017

Status: Fixed (was: Started)

Comment 8 by laforge@google.com, Nov 7 2017

Components: Internals>Network>Service

Comment 9 by laforge@google.com, Nov 7 2017

Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Sign in to add a comment