No final chrome.webRequest event for responses with redirect status and no location
Reported by
mmcd...@gmail.com,
May 18 2018
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Steps to reproduce the problem: 1. Load a page that returns with a response status code indicating a redirect (e.g. 301) but the location header is not set, and the response includes valid html. Basically, the page acts *exactly* like a normal page except the status code is a 301 instead of 200. Chromium will load/render this page as if it returned 200. 2. In an extension, listen to all chrome.webRequest events What is the expected behavior? The standard webRequest events should fire (onBeforeRequest, onBeforeSendHeaders, onSendHeaders, onHeadersReceived, onResponseStarted) followed by either onCompleted or onErrorOccurred (I would prefer onCompleted, but there's also a strong argument for onErrorOccurred) What went wrong? onResponseStarted is the last event fired. onCompleted and onErrorOccurred never fire. Did this work before? N/A Chrome version: 66.0.3359.139 Channel: n/a OS Version: OS X 10.13.3 Flash Version: http://fbictest.com/httpresponsecode.php?code=301&content=1 is a page that can be used to reproduce this issue. I have reproduced it in mac chrome 66 and centos chromium 61.
,
May 21 2018
mmcduff@ Thanks for the issue. Request you to provide the link/name of the extension where we can see all chrome.webRequest events, which will help in further triaging of the issue. Thanks..
,
May 21 2018
David: I can't recall, was this related to the sequencing issue you mentioned?
,
May 21 2018
,
May 21 2018
I ran into a sequencing issue way back around HTTP auth. This looks different, but I'm not surprised their aren't other sequencing issues.
,
May 21 2018
> their aren't there are That was an impressively badly typed sentence, even by my standards. :-)
,
May 21 2018
Susan, something like the following in the background page should be able to reproduce this issue along with a webserver and url that exhibits the behavior specified in the original report:
['onBeforeRequest', 'onBeforeSendHeaders', 'onSendHeaders', 'onHeadersReceived', 'onAuthRequired', 'onBeforeRedirect', 'onResponseStarted', 'onCompleted', 'onErrorOccurred'].forEach(function(e) {
chrome.webRequest[e].addListener(console.log);
});
,
May 21 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 29 2018
mmcduff@ Thanks for the update. Tested this issue on Mac OS 10.13.3 on the reported version 66.0.3359.139 and the latest Canary 69.0.3444.0 by following the below steps. 1. Launched Chrome and navigated to http://fbictest.com/httpresponsecode.php?code=301&content=1. 2. Opened Devtools -> Console and executed ['onBeforeRequest', 'onBeforeSendHeaders', 'onSendHeaders', 'onHeadersReceived', 'onAuthRequired', 'onBeforeRedirect', 'onResponseStarted', 'onCompleted', 'onErrorOccurred'].forEach(function(e) { chrome.webRequest[e].addListener(console.log); }); and can see Uncaught TypeError error. Attached is the screen shot for reference. Request you to provide a screen cast of the steps followed where the issue can be reproduced. Thanks..
,
May 29 2018
That JavaScript needs to be run background page of an extension with the webRequest permission. The error you encountered is expected if you try to run it in the JS environment of a webpage.
,
May 29 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 7 2018
Thanks for your response... @Reporter:As per your comment #10 could you please provide extension url and requesting you to provide a screen cast of the steps followed where the issue can be reproduced.
,
Jun 19 2018
This isn't a published extension, so I can't provide a URL. I'm not sure what a screencast would demonstrate that my repro instructions have not (do you want a screencast showing how to create a chromium extension?). Have you tried running an extension with the webRequest permission that includes the provided javascript?
,
Jun 19 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by krajshree@chromium.org
, May 20 2018