Edge ignores modification of content-type header in webRequest.onHeadersReceived()

Fixed Issue #12186573


Perkins G.
May 31, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Edge seems to ignore changes to the content-type header in webRequest.onHeadersReceived(). I have attached a simple extension that demonstrates the problem. The extension uses webRequest.onHeadersReceived() to change the Content-Type header to “text/html” when it is received as "image/cpi".

Steps to reproduce:

  1. Open the attached “HeaderModTest.zip” file and load the extension from the “Header Mod Test - Edge” folder.

  2. Open the following link: http://cartesianinc.com/Demo/CPCStreams/Gilman2.cpi

Expected behavior:

Edge should navigate to the link and display the link’s binary content as gibberish in the current tab. This is what happens in Chrome, Opera and Firefox. It is also consistent with the documentation which states that if you modify the headers, "The browser will behave as if the server had sent the modified headers.". Header Mod Test changes the Content-Type to "text/html", so the browser should behave as if the server sent html.

Actual behavior:

Edge offers to download the file.


This is NOT a duplicate of Issue #8796739. In that case, changing any header caused Edge to download the url. This issue is that changing the content-type header in an incoming response does not affect Edge’s handling of the data. This issue is NOT fixed in Build 15016


1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

  • Hello,

    Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 16199 and is available in our latest Insider Preview build.

    Best Wishes,
    The MS Edge Team

  • Microsoft Edge Team

    Changed Status to “Fixed”

You need to sign in to your Microsoft account to add a comment.

Sign in