Hello.

I've build a "download manager" module for my application arround 
THttpCli and I'm making use of ContentRangeBegin to resume failed 
downloads. It all works very nice and smooth, and all my downloads 
resume fine. Unfortunately my downloads only fail when I unplug the 
network cable from my computer OR when I disable my network adapter... 
and I don't think those are the most common causes of disconnections for 
the average user! So I'll have to ask about "abnormal" situations, just 
to make sure I'm getting things right:

(1) What happens if I use ContnetRangeBegin and the server doesn't 
support ranges (ex: if I'm downloading the results of a script)? Will I 
end up with the whole document append to the already downloaded portion 
of the document?
(2) I noticed there's a AcceptRanges property that's set up by THttpCli 
from the headers it receives while processing a request. I supose this 
is server-dependent. Can I make use of this to determine if ranges are 
supported?
(3) In the code running after a failed download I'm removing the last 
portion of the received data, just in case it's corrupted. I noticed 
this behavior in a freeware download manager I used to use some time 
ago. But now I'm asking: is this really necessary? HTTP traffic travels 
over TCP and TCP is supposed to be an checksummed, reliable protocol. Is 
the probability of receiving corrupt data high enough to make such 
radical surgery useful? If so, is tail-trimming the best solution, or 
should I implement some other kind of checksumming to make sure no 
portion of the code is actually corrupt (after all, corruption might 
occur anywhere in the document, not just in the last received portion).

Thanks,
Cosmin Prund
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to