New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 829595 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

request interception does not support intercepting on both request and response

Project Member Reported by caseq@chromium.org, Apr 5 2018

Issue description

As per original reporter:

I found if I set InterceptionStage to be both HEADER_RECEIVED and REQUEST, and load a page(a simple url without any redirect), OnRequestIntercepted can only get notified when about to send request, it will not get notified when headers is received.

I think it is because after the request is first intercepted in REQUEST phrase, after we ContinueInterceptRequest, in DevtoolsURLInterceptorRequestJob::ProcessInterceptionResponse[3], you set waiting_for_user_response_ to be NOT_WAITING in any case, and when it is not redirect and it is not ack for response, you just reset the sub_request_ to be a new SubRequest, these are true if the InterceptionStage is just REQUEST or RESPONSE, but it is not true for both, for the case where InterceptionStage is BOTH, and if it is not redirect, also it is not ack for response, an InterceptedRequest should be reset to sub_request_ since we need to intercept it in RESPONSE phase too.

[3] https://chromium.googlesource.com/chromium/src/+blame/ceddc5e2891bf27e49394e7fca0895c3ae2efd02/content/browser/devtools/devtools_url_interceptor_request_job.cc#1040

 
 

Comment 1 by caseq@chromium.org, Apr 5 2018

Note the new URLLoader-based interception works as intended.

Comment 3 by caseq@chromium.org, Apr 6 2018

Status: Fixed (was: Started)

Sign in to add a comment