troglobit / uftpd

FTP/TFTP server for Linux that just works™
https://troglobit.com/projects/uftpd/
ISC License
182 stars 32 forks source link

Add support for REST #13

Closed troglobit closed 6 years ago

troglobit commented 6 years ago

When transferring a large file the transfer can be interrupted by network problems or the client pausing the transfer. To restart a RETR, or STOR, we need to support REST.

This issue is instrumental to getting the VLC Android app. mentioned in issue #9 to work.

oz123 commented 6 years ago

@troglobit I looked at the source code for pyftpdlib for REST. Seems easy enough to implement. My real life work in C is very limited, but this would be a perfect learning ground (large enough code base, but not to large), to implement a real code. Would you accept a my PR for this?

troglobit commented 6 years ago

Yup, that's it. A restart marker/offset and then use it for the next STOR or RETR command, but then you also need to support ABOR to reset the operation ... that's how it started for me; "just a small little function, how hard could it be?!"

To answer your question: No. But only because I have a whole week of unpushed patches lined up in my own queue, one of them being REST. I've planned to finalize and push them this weekend.

oz123 commented 6 years ago

Oh, well! Thanks for the honest answer. I will use your patched to learn by reading.

troglobit commented 6 years ago

Complete support added in refactor af54295.