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
{{ message }}
Repository navigation
Posting formdata may result in request header 'Content-Length': 'NaN' being set #5534
Passing a FormData object to Axios client may result in request header 'Content-Length': 'NaN' being set.
To Reproduce
Given the following code:
// client is an Axios instanceconstpdf=awaitclient.get(pdfUrl,{responseType: 'stream'});constform=newFormData();form.append('file',pdf.data,{ filename,contentType: 'application/pdf'});constres=awaitclient.post(urlToUploadService,form);
Thanks for the report! I can't reproduce the error, but we'll add an isFinite check on our side, just in case. Apparently, there are some unhandled cases under which the method returns NaN instead of calling its callback with an error.
Activity
DigitalBrainJS commentedon Feb 6, 2023
Thanks for the report! I can't reproduce the error, but we'll add an
isFinitecheck on our side, just in case. Apparently, there are some unhandled cases under which the method returns NaN instead of calling its callback with an error.thhermansen commentedon Feb 7, 2023
Thank you! :)