node-libcurl icon indicating copy to clipboard operation
node-libcurl copied to clipboard

fix(curly): use default content-type when there are no headers

Open liamdiprose opened this issue 9 months ago • 0 comments

When using a sftp:// url, this headers variable is an empty array, which breaks the Object.entries call.

This PR adds a bounds check so the default content-type will be chosen if the headers variable is empty.

I failed to get this to work with my vite-based project, something about 'exports not defined'. It does work if I manually patch the dist/ javascript. So, I'll leave the verification to you.

Thanks, Liam

liamdiprose avatar May 01 '24 05:05 liamdiprose