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.
When using a
sftp://
url, thisheaders
variable is an empty array, which breaks theObject.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