views:

106

answers:

3

I was downloading a 200MB file yesterday with FlashGet in the statistics it showed that it was using the HTTP1.1 protocol.
I was under the impression that HTTP is a request-response protocol and most generally used for web pages weighing a few KiB...I don't quite understand how it can download MB's or GB's of data and that too simultaneously through 5(or more) different streams.

A: 

There is no size limit in http. It is used for web pages, but it is also used to deliver a huge majority of the content on the Internet. It's more a matter of bandwidth that limits sizes, not the protocol itself. And of course, this was more of a limit in the early days. (and, I suppose, those still on dial-up)

David Stratton
What process does the download manager use to download huge files with multiple streams with just a handful of requests?
Kevin Boyd
+3  A: 

HTTP/1.1 has a "Range" header that can specify what part of a file to transfer over the connection. The download manager can make multiple connections, specifying different ranges to transfer. It would then combine the chunks together to build the full file.

Jeffrey Bird
If the connection breaks or dies, how does it know where to start from again? How does it keep track of bytes transferred etc in this case?
Kevin Boyd
The downloader would know how much data had been transferred on a given connection just by counting how many bytes it had received. It could then make a new connection and specify a range of bytes to transfer that starts after the transferred bytes.The download process would basically be:1. retrieve the length of the data file2. calculate a nunber of chunks to transfer e.g. break the file into say 1MB chunks3. Start a number of parallel connections that transfer these chunksi.e. the chunks would be say bytes 1-1000000, 1000001-2000000, and so on.
Jeffrey Bird
A: 

These links might help:

HTTP

HTTP Persistent Connections

Chunked Transfer Encoding

Zaki
Incidentally I had read them all 2 days ago however I still could not understand the basics of Download Managers and HTTP 1.1 ...
Kevin Boyd