New issue
Advanced search Search tips

Issue 800136 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Resources loaded from an extension bundle do not have their Content-Type set.

Project Member Reported by cmumford@chromium.org, Jan 8 2018

Issue description

Chrome Version: M64
OS: All

What steps will reproduce the problem?
(1) Modify the ExtensionProtocolsTest.ComponentResourceRequest test to read the content-type as follows:

TEST_F(ExtensionProtocolsTest, ComponentResourceRequest) {
  ...

  // First test it with the extension enabled.
  {
    ...
    std::string mime_type;
    request->GetResponseHeaderByName(net::HttpRequestHeaders::kContentType,
                                     &mime_type);
    EXPECT_EQ("image/png", mime_type);
  }

(2) Run the test

What is the expected result?

  mime_type should be "image/png"

What happens instead?

  mime_type is an empty string.

Note: This is *not* the cause of any known problem, but is probably an oversight that should be fixed.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 9 2018

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

commit 9f87e39793ff9228f4d0f0731e3131a85afb707e
Author: Chris Mumford <cmumford@chromium.org>
Date: Tue Jan 09 01:17:46 2018

Extensions: Setting Content-Type when loading from bundle.

Settinig the mime type when loading a file from a resource bundle
(*.pak).

Bug:  800136 
Change-Id: I1f7c00eb505a2643e982f551027f90594181924f
Reviewed-on: https://chromium-review.googlesource.com/830654
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527846}
[modify] https://crrev.com/9f87e39793ff9228f4d0f0731e3131a85afb707e/chrome/browser/extensions/chrome_url_request_util.cc
[modify] https://crrev.com/9f87e39793ff9228f4d0f0731e3131a85afb707e/chrome/browser/extensions/extension_protocols_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment