Skip to content

fix(har): store binary content with a textual mime type as base64 - #43498

Closed
Alok Pandey (alok-108) wants to merge 1 commit into
microsoft:mainfrom
alok-108:fix-43493
Closed

Alok Pandey (alok-108) wants to merge 1 commit into
microsoft:mainfrom
alok-108:fix-43493

Conversation

@alok-108

Copy link
Copy Markdown
Contributor

Summary

  • recordHar with content: 'embed' chose text or base64 only from the mime type, so a binary body served as application/javascript was stored as lossy text and replayed with different bytes.
  • Only store the body as text if it survives the roundtrip through a string unchanged, otherwise use base64.

Fixes #43493

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.

[Bug]: recordHar embed stores binary body as lossy text when Content-Type is textual

2 participants