You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing file uploads using multipart/form-data with openapi-fetch, the Content-Length header is being set to approximately double the actual size of the payload compared to plain fetch. This inflated Content-Length is consistently observed because openapi-fetch internally leverages new Request for constructing its requests, which appears to be the root cause of the incorrect header calculation for FormData bodies.
Uh oh!
There was an error while loading. Please reload this page.
openapi-fetch version
0.14.0
Description
When performing file uploads using multipart/form-data with openapi-fetch, the Content-Length header is being set to approximately double the actual size of the payload compared to plain fetch. This inflated Content-Length is consistently observed because openapi-fetch internally leverages new Request for constructing its requests, which appears to be the root cause of the incorrect header calculation for FormData bodies.
Reproduction
https://github.com/Cigan12/openapi-fetch-reproduction
Expected result
The Content-Length header for multipart/form-data uploads sent via openapi-fetch should accurately represent the byte size of the request body.
Extra
The text was updated successfully, but these errors were encountered: