Skip to content

Commit

Permalink
fix: ignore extraInfo events if the response is served from cache (pu…
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN authored Apr 6, 2023
1 parent ef0bab4 commit e7265c9
Show file tree
Hide file tree
Showing 2 changed files with 413 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/puppeteer-core/src/common/NetworkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,13 @@ export class NetworkManager extends EventEmitter {
);
}

// Chromium sends wrong extraInfo events for responses served from cache.
// See https://github.com/puppeteer/puppeteer/issues/9965 and
// https://crbug.com/1340398.
if (responseReceived.response.fromDiskCache) {
extraInfo = null;
}

const response = new HTTPResponse(
this.#client,
request,
Expand Down
Loading

0 comments on commit e7265c9

Please sign in to comment.