HTTP Resume Download

monir
monir used Ask the Experts™
on
Can I do a HTTP download with "resume download" using any HTTP client socket or any other socket, but without using Wininet API.

Monir.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mohammed NasmanSoftware Developer

Commented:
Hello Monir
  Use iedownload, you can download it form this link, and th samples programs with it, and one for resume downloading

http://www.euromind.com/iedelphi/iedownload.htm


Best regards
Mohammed Nasman

Author

Commented:
Thank you for your answer, but they use Wininet API, What I want is to do a download by using a socket and HTTP protocol.

Monir

Author

Commented:
Thank you for your answer, but they use Wininet API, What I want is to do a download by using a socket and HTTP protocol.

Monir
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

if you are using Indy, check out TIdHTTP's Request.ContentRangeStart and ContentRangeEnd. Specifying that will allow return the data from the range you specified

Author

Commented:
Thank you DragonSlayer
I checked TIdHttp Request, I cound not find ContentRangeStart and ContentRangeEnd in it, I am using the latest version of Indy!!
It has been found in TIdEntityHeaderInfo, could you plase tell how can I use that in HTTP download, just a guidelines please.
Monir.
Here's a sample scenario:

Assume that you are downloading a file called abc.zip from http://somesite.com/files/ and the file size is 1,024,000 bytes.

You have downloaded till 512,000 bytes when you get disconnected.

Here's what you need to do:

Set the exact same settings as in the initial download (URL, port, etc), but you change ContentRangeStart

IdHTTP1.Request.ContentRangeStart := 512001;

and you download as usual.

Author

Commented:
Thank you,
I have got the answer now, you got the points,
Could you please tell me how to do the same things with
NetMaster component TNMHttp.

Monir

Author

Commented:
That is exaclty what I want, thank you.
Umm... sorry, but I don't use the NetMaster components (in fact, I uninstalled the whole package and the help file).
Hi,
Use TNMFTP instead. It has DownloadRestore method for that purpose.

Regards, Geo
Hi Geo... I think he wants to use HTTP instead :)
Hi DragonSlayer, I don't think that it's possible using TNMHTTP component. That's why I suggested TNMFTP. While I was writing my comment the question was closed by the way.

Author

Commented:
"resume download" with FTP (using any socket component) is very easy, but in HTTP is a bit complicated.

DragonSlayer solve it for Indy thank you again.
Monir

Author

Commented:
"resume download" with FTP (using any socket component) is very easy, but in HTTP is a bit complicated.

DragonSlayer solve it for Indy thank you again.
Monir

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial