Skip to content

fix(context): attach HAR content for a .zip path and tolerate a disposed request context on close - #2020

Merged
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-har-zip
Oct 26, 2026
Merged

Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-har-zip

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • Path.endsWith(".zip") compares the last path element, so a recordHarPath ending in .zip embedded the content instead of attaching it; compare the file name string.
  • context.close() threw when context.request().dispose() had been called before.
  • Tests in TestBrowserContextHar and TestBrowserContextFetch.

https://claude.ai/code/session_018p7xPf3r5VjAM7V46nzFTM

…sed request context on close

Path.endsWith(".zip") compares path elements and never matched; closing a
context whose request context the user had disposed threw TargetClosedError.

Claude-Session: https://claude.ai/code/session_018p7xPf3r5VjAM7V46nzFTM
@yury-s
Yury Semikhatsky (yury-s) merged commit 4a6900e into microsoft:main Oct 26, 2026
33 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants