Closed Bug 1266813 Opened 9 years ago Closed 9 years ago

webrequest.jsm fails on modifying both request and response headers.

Categories

(WebExtensions :: Untriaged, defect)

45 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1232849

People

(Reporter: alexmehler, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0 Build ID: 20160407164938 Steps to reproduce: Hi, i yesterday tried to implement webrequest.jsm to modify the response headers "Cache-Control" and "Expires" of images from a website. so i made a test addon and used a slightly modified code of this tutorial , https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/WebRequest.jsm its the last snippet on that site. i console.log´d everything so the code is running fine. make a new profile, enter the url of an image, load it ... Actual results: ... go to about:cache , look for the image and then you will see that its cached with the original response headers instead of the modified ones. Expected results: it should cache the images with the modified headers but it doesn´t. then as a blind test i implemented another version based on nsihttpchannel and look at the cache and it shows the modified header correctly. after that i also tested the other methods and "ressource blocking by url" is working correctly and modifying request headers doesn´t work.
Component: Untriaged → WebExtensions
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.