mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user