Fix Request Interception (#565)

It turned out that either Network.requestIntercepted or
Network.requestWillBeSent occasionally report encoded URL.

This patch starts decoding URL's when generating request hash.

Fixes #558.
This commit is contained in:
Andrey Lushnikov
2017-08-27 12:41:09 -07:00
committed by GitHub
parent ea4f8d78fc
commit e921a1cc21
3 changed files with 31 additions and 1 deletions

View File

@@ -340,7 +340,8 @@ helper.tracePublicAPI(Response);
*/
function generateRequestHash(request) {
const hash = {
url: request.url,
// Decoding is necessary to normalize URLs. @see crbug.com/759388
url: decodeURI(request.url),
method: request.method,
postData: request.postData,
headers: {},