Jump to content
noimes

TMultipartHttpDownloader encountered a problem with a 302 url

Recommended Posts

TMultipartHttpDownloader downloads 302 redirected url errors, please help。

700613134_QQ20230705234505.thumb.png.6e321d850f65fca16e7256d698dd7c6f.png

Share this post


Link to post

TMultipartHttpDownloader is a very old component designed in the days of slow dial-up internet to speed up downloads by doing several parts at once.  But very few applications need that since broadband downloads are so far.

 

What happens when you use a modern component like TSslHttpRest which includes saving to a file and repeat partial failed downloads?

 

Angus

 

Share this post


Link to post
9 hours ago, Angus Robertson said:

TMultipartHttpDownloader is a very old component designed in the days of slow dial-up internet to speed up downloads by doing several parts at once.  But very few applications need that since broadband downloads are so far.

 

What happens when you use a modern component like TSslHttpRest which includes saving to a file and repeat partial failed downloads?

 

Angus

 

thanks for reply
For some reasons, I need to download several parts. I modified TMultipartHttpDownloader to inherit from Tsslhttpcli. Now the problem is that it writes 302 information into the file. I am not very familiar with the TSslHttpRest component,TSslHttpRest is also an inheritance of Tsslhttpcli。

 

1.thumb.png.2bb8b8e37fde932b80bf0acfbc28be9c.png

2.thumb.png.a5c919fa400001aacbb77e7a81795975.png

Edited by noimes

Share this post


Link to post

I suggest you build the OverbyteIcsHttpRestTst and OverbyteIcsXferTst samples and test your HTTPS downloading with those, the TIcsHttpMulti component in the latter downloads gigs of files daily here. 

 

I'll need to know a lot more about why you need to use TMultipartHttpDownloader to bring it up to date with HTTPS, etc, no point if no-one needs to use it.

 

Angus

 

Share this post


Link to post

[! WARNING !]

 

There should be a big fat warning at TMultipartHttpDownloader component, that nobody should use it !

version = 8.70

 

I've just spent 3 days to rewrite my Indy "downloader with progressbar" form to work based on this component, and the end result was a disaster:

  • After each download the whole Delphi7 IDE froze, had to kill it by ProcessExplorer
  • the "done" function was called not just once at the end, but like 5 times (while there were only 2 progress enabled)
  • ... and several other problems, but worse is:
  • The downloaded file was NOT THE SAME as the original! (a total scrambled version with mixed bytes)

 

There are still many places where only DSL / 3G internet is available. (Having only 100/20Kbit down/up speed.)

 so I've hoped it helps but it made it worst.

Share this post


Link to post

Multipart download won't help if the channel at client side is slow. It only makes sense if a server limits speed per connection. In your case you just downloading N parts at CHANNEL_BPS/N speed

Share this post


Link to post
35 minutes ago, Angus Robertson said:

My earlier comments did state this is an old unsupported component, with better modern components.

 

Yes, I understand, and it's clear for me now,

 but this could have been avoided, if there is a warning in the readme file + in the PAS file itself, stating that:

 "this component should NOT BE USED any more!" Use Instead: ...

 

Maybe deleting the whole component + from examples completely would be the best?

 

PS: My "lost 30 work-hours" ar still compensated by ICS itself. Thank you guys to developing + supporting it!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×