fix: destroy invalid form-data bodies by AysajanE · Pull Request #1904 · node-fetch/node-fetch · GitHub
Skip to content

fix: destroy invalid form-data bodies - #1904

Open
AysajanE wants to merge 1 commit into
node-fetch:mainfrom
AysajanE:northset/M-114
Open

AysajanE wants to merge 1 commit into
node-fetch:mainfrom
AysajanE:northset/M-114

Conversation

@AysajanE

Copy link
Copy Markdown

Summary

Reject missing or unsupported form-data content types with the expected TypeError and destroy the associated body without changing supported parsing.

Change

  • src/body.js
  • test/form-data-invalid-content-type.js

Checks

  • npm test -- test/form-data-invalid-content-type.js — passed in a network-isolated container.

Fixes #1509


AI assistance was used; I reviewed and own this change.

Verification

Northset proof-of-pass receipt M-114
Contributor self-run; not maintainer verification.

Signed-off-by: Aysajan Eziz <aeziz@northset.ai>
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.

abort and correct the error message when body.formData() fails

1 participant