On Tue, 14 Jun 2011, Rieker Flaik wrote:

But why would you ask for such a range in the first place? That seems utterly pointless.

I do need to test a hash-tag which is in the first 200 bytes - and if
this differs from the local hash-tag the full file will be downloaded.
So yes, I need this CURLOPT_RANGE and it's very helpful.

No, that seems like a flawed reason.

You say you first want the first 200 bytes and *if the contents differs* then you want the full/rest of the file, so why ask for both ranges at once? If you just as well can ask for both ranges at once (which is the full file) then why use the range header at all in the first place when you can just ask for the whole thing and hash the first 200 bytes once they've arrived?

I would expect you to first do a range request for the first 200 bytes, and if you find that the contents differ then you do a *second* request for the remainder of the file. No mime parser needed for that!

Thanks, I'll do so. Or do you know of a MIME parser which has this already implemented?

As it is standard MIME formatted I would assume that all MIME parsers will do it. I don't know of any existing MIME parsers, no.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to