Skip to content

fix(event-handler): preserve binary Web Response bodies - #5700

Merged
dreamorosi merged 2 commits into
mainfrom
fix/5698-binary-web-response
Sep 13, 2026
Merged

dreamorosi merged 2 commits into
mainfrom
fix/5698-binary-web-response

Conversation

@svozza

@svozza svozza commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Returning a Web Response with PDF, ZIP, or octet-stream bytes could silently corrupt the body by decoding it as UTF-8. These content types now use base64 serialization, preserving the original bytes across REST API, HTTP API, and ALB responses.

Changes

  • Recognize application/pdf, application/zip, and application/octet-stream as binary content types, including mixed-case values and parameters.
  • Add byte-preservation regressions across all three integrations and controls for text, JSON, and XML responses.
  • Document automatic encoding for Web responses and the explicit flag for other binary content types.
  • Validate workspace test types, staged-file linting, and the unit suite with 100% coverage.

Issue number: closes #5698


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi
dreamorosi merged commit e093a3d into main Sep 13, 2026
41 checks passed
@dreamorosi
dreamorosi deleted the fix/5698-binary-web-response branch September 13, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M PR between 30-99 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Binary Web Response bodies are corrupted for non-media content types

2 participants