node-sftp-s3 icon indicating copy to clipboard operation
node-sftp-s3 copied to clipboard

READ returned more bytes than requested

Open eXeDK opened this issue 8 years ago • 5 comments

I'm having issues with READ returning bigger packets than the client requested. Both using Transmit and FileZilla on MacOS.

I'm using the package as used in the example with files of size around 10 megabytes.

Is this something you have experienced yourself?

Best Regards Thomas

eXeDK avatar Jun 04 '17 14:06 eXeDK

Hi Thomas, I don't believe I've ever noticed this issue. Is it causing file corruption?

cmrigney avatar Jun 04 '17 18:06 cmrigney

It's causing my client to give up the transfer. I'll investigate further in the morning. Just wanted to hear if you had ever noticed it before.

eXeDK avatar Jun 04 '17 22:06 eXeDK

For me all files above 32k (32768) bytes fails when downloading. Upload works fine. 64k files fails as well.

eXeDK avatar Jun 05 '17 16:06 eXeDK

Seems like you want to send 32k (or whatever the client asks for) packets but that the packets sent are all of the full file length. Looking at line 202 of node-sftp-s3.js and forward

eXeDK avatar Jun 05 '17 16:06 eXeDK

Thanks, I think I can look into this next week. If you happen to fix it, I'll gladly accept a PR.

cmrigney avatar Jun 07 '17 03:06 cmrigney