Skip to content

Release 3.3.0 - files.update fix, multipart form-data handling#430

Merged
david-ruiz-cko merged 1 commit into
masterfrom
release/3.3.0
May 8, 2026
Merged

Release 3.3.0 - files.update fix, multipart form-data handling#430
david-ruiz-cko merged 1 commit into
masterfrom
release/3.3.0

Conversation

@david-ruiz-cko
Copy link
Copy Markdown
Contributor

This release improves multipart form-data handling in HTTP requests, specifically ensuring that FormData is properly serialized and sent in API calls. The changes fix a bug where the form-data instance was previously string-coerced (resulting in an invalid request body), and add comprehensive regression tests to prevent this issue from recurring.

HTTP request handling improvements:

  • Added a formDataToBuffer utility to serialize FormData streams into a buffer, ensuring multipart bodies are transmitted correctly in HTTP requests.
  • Updated the HTTP request logic to use the new buffer serialization for FormData, preventing accidental string coercion and ensuring the correct Content-Type and body format.
  • Enhanced header generation to merge headers from FormData instances when present, ensuring the multipart boundary is set correctly.
  • Imported Node's Writable stream to support the new buffer serialization logic.

Testing and regression coverage:

@david-ruiz-cko david-ruiz-cko requested a review from a team May 8, 2026 12:10
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@david-ruiz-cko david-ruiz-cko merged commit 43b9d87 into master May 8, 2026
3 checks passed
@david-ruiz-cko david-ruiz-cko deleted the release/3.3.0 branch May 8, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants