New issue
Advanced search Search tips

Issue 759388 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: Network.requestWillBeSent and Network.requestIntercepted report different urls

Project Member Reported by lushnikov@chromium.org, Aug 27 2017

Issue description

Chrome: M62

Sometimes either of the events report encoded URL, whereas the other one doesn't:
1. Network.requestWillBeSent encodes URL, whereas Network.requestIntercepted doesn't.
2. Network.requestWillBeSent does not encode URL, whereas Network.requestIntercepted does.

Observed with puppeteer: https://github.com/GoogleChrome/puppeteer/issues/558

I'll post reduced reproes shortly.

 
Components: Platform>DevTools>Platform
Reduced test cases are in puppeteer tests: https://github.com/GoogleChrome/puppeteer/blob/e921a1cc21193902a84016d633a9e10d82555bbd/test/test.js#L941-L962
Owner: caseq@chromium.org
The following user scenario:

1. Consider request interception is enabled with protocol's setRequestInterceptionEnabled call

2. Consider a page that issues a request to the URL with query string:

   <img src='http://foo.com/img.png?hello|world'></img>

3. The protocol will issue two events, each dispatching the request's URL
  - RequestWillBeSent
    - URL: http://foo.com/img.png?hello|world
  - requestIntercepted
    - URL: http://foo.com/img.png?hello%7Cworld

Notice that requestIntercepted dispatched encoded URL.

The reason is the difference in GURL and KURL.
GURL canonicalizes the URL, whereas KURL don't. In this specific example, the '|' symbol is canonicalized as a part of query string.


Status: WontFix (was: Assigned)

Sign in to add a comment