New issue
Advanced search Search tips

Issue 873971 link

Starred by 3 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Redirecting a request behaves differently using onBeforeRequest listener than onHeadersReceived

Reported by benjamin...@gmail.com, Aug 14

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
1. Create an extension
2. Add an onBeforeRequest listener
3. Redirect every request to the request url

What is the expected behavior?
This should cause an infinite loop but does redirect the request only once.

What went wrong?
The request gets redirected only once. I can still surf the page. If I use the onHeadersReceived listener the redirection to the request url causes an infinit loop which causes the browser to throw an error. I expected this behaviour to be the same for the onBeforeRequest listener.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 68.0.3440.106  Channel: stable
OS Version: OS X 10.13.6
Flash Version:

 
Apparently the attached reproducer got lost...
reproducerRedirect.zip
2.8 KB Download
Labels: Needs-Triage-M68
Cc: susan.boorgula@chromium.org
Components: Platform>Extensions
Labels: Needs-Feedback Triaged-ET
benjaminfellner@ Thanks for the issue.

Tested this issue on Mac OS 10.13.3 and Windows 10 on the reported version 68.0.3440.106 by following the below steps.

1. launched Chrome and added the given extension in chrome://extensions.
2. Clicked on background.html and can observe many requests in Devtools -> Console in Windows, but on Mac OS can observe only two requests.
Attached are the screen shots of Windows and Mac behaviors.

Request you to check and confirm if this is the issue seen on Mac?

Thanks..
873971_Mac.png
145 KB View Download
873971-Windows.png
304 KB View Download
Thanks for the quick reply.
In my opinion the behaviour is the same for windows and mac.

It seems that there are more extension active on windows and therefore more requests. The requests on windows are also only redirected once (and not infinitely like for the onHeadersReceived listener). The log is sometimes summarized and sometimes there is another request in between and therefore its not easy to see that the request happens two times.
I highlighted some of those requests.
873971-Windows_highlighted.png
413 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 17

Labels: -Needs-Feedback
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