Closed Bug 1376060 Opened 7 years ago Closed 5 years ago

webRequest.onHeadersReceived modified content type ignored on 304 Not Modified

Categories

(WebExtensions :: Request Handling, defect, P3)

54 Branch
defect

Tracking

(firefox57 wontfix)

RESOLVED DUPLICATE of bug 1376932
Tracking Status
firefox57 --- wontfix

People

(Reporter: Will, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170608105825 Steps to reproduce: 1) Extract attached minimal testing webext. 2) > web-ext run --browser-console --start-url https://ftp.mozilla.org/favicon.ico --firefox nightly 3) Ctrl-Shift-E 4) F5 5) Navigate to https://ftp.mozilla.org/pub/data/PerformanceAndFootprints.html 6) F5 Actual results: 2) Binary data appears as plain text when the browser opens. 4) The tab's network monitor confirms the 304 Not Modified response code. 4) The image appears. 5) HTML document appears as plain text. 6) The tab's network monitor confirms the 304 Not Modified response code. 6) HTML document loads as webpage. Encountered in release channel 54.0 (64-bit) and confirmed in nightly 56.0a1 (2017-06-22) (64-bit), both on Windows 8.1 x64. Expected results: 2) Binary data appears as plain text when the browser opens. 4) The tab's network monitor confirms the 304 Not Modified response code. 4) Binary data continues to appear as plain text. 5) HTML document appears as plain text. 6) The tab's network monitor confirms the 304 Not Modified response code. 6) HTML document continues to appear as plain text. The same/equivalent steps run in Chrome 59 result in the image consistently appearing (as if the webext is never able to override the content type). For HTML pages, Chrome consistently displays them as plain text (as if the webext is always able to override the content type). It's not clear how Chrome should be behaving, but at least in the case of Firefox MDN says "Modification of the 'Content-Type' header is supported from version 51". Potentially related to bug 1376045 since F5 refresh and 304 Not Modified responses are involved in both cases.
Priority: -- → P3
Product: Toolkit → WebExtensions
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: