Technically, what is the difference between the way of hosting (on the server) of
- a file that can be paused while downloading and resumed again, and
- a file that needs to be downloaded in one go?
Technically, what is the difference between the way of hosting (on the server) of
A common one is a lack of a
content-size
orcontent-range
header. Perhaps the author forgot to set one in their download script?The server would need to support the ability to serve partial content and handle partial requests. Most modern web servers are able to handle it unless you are using something that you built in-house.
You can get more information by reading this Apache document and the relevant RFCs. From the document linked - an example of a response.
A download can be resumed if the HTTP server supports range retrieval requests as defined in Section 14.35 of RFC 2616, which Wikipedia calls "byte serving" for some odd reason.
Accept-Ranges: bytes
in a response to aHEAD
orGET
request to indicate that it supports byte serving.GET
request includingRange: bytes=aaa-bbb
, where the starting offset isaaa
bytes after the start of the file, and the length of the range isbbb - aaa + 1
bytes.Content-range: bytes aaa-bbb/cccc
, whereaaa-bbb
are as before andcccc
is either the length of the file in bytes or*
if the server cannot determine it, followed by a response body containing the requested range of bytes. If the range is out of bounds, the server instead sends a status 416 (requested range not satisfiable) response.Some video players use range requests to support seeking through a video. The Ogg media container uses interpolated bisection search to support this use case.
Popular web server software can be configured to serve ranges from static files, but a server-side script that authenticates the download may or may not need to handle ranges itself. (Check your scripting language's manual.) Some operators of download servers open to the public deliberately block range requests because several download managers have used support for content ranges to make more than one request to a server, hogging resources that could be used to provide downloads to other users.