curl-library
Re: Handling broken ftp REST over 2 GB
Date: Wed, 17 Dec 2003 17:11:54 +0100 (CET)
On Tue, 16 Dec 2003, Dave Meyer wrote:
> > I'm not really sure how we solve this the nicest possible way...
>
> The thought I had (and the one I'm working towards currently) is to make the
> REST handler tell the document body writing code to skip some number of
> bytes of server data. If the server's offset is 100 and our request was
> 150, the document writing code would thus simply ignore the first 50 bytes
> of data.
Yes, for download that's easy. For upload, it isn't so easy...
> Of course, the assumption I'm making here is that anytime data is received
> from the server it eventually passes through Curl_client_write. If that's
> not the case, then I'm not sure the solution I'm working on will actually
> work in all cases...
That's a correct assumption for downloads.
For uploads, the app will tell libcurl "resume upload at pos X" and then it'll
probably seek to that position in a file or something, then when the read
callback gets called, the app reads from the file at that position.
With this new REST stuff, the library can find out that X is no good, we need
to restart at Y instead and thus the app needs to be told to upload from that
position instead...
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=clickReceived on 2003-12-17