What hidden features of HTTP do you think are worth mentioning?
By hidden features I mean features that already are part of the standard but widely rath
You can request to resume a (large) HTTP response (e.g. file download) using Range and If-Range request headers with respectively the specified byte range and the unique file identifier or the file modification timestamp. This is possible if the server has sent the Accept-Ranges: bytes and ETag or Last-Modified response headers on the initial response with respectively the notification that the server supports byte range requests, the unique file identifier and the file modification timestamp.
The initial response can look like (the ETag
is usually composed of file name, size and last modification timestamp):
Accept-Ranges: bytes
ETag: file.ext_1234_1234567890
Content-Range: bytes 0-1233/1234
When the download get aborted on for example 1KB (1024 bytes), the client can resume it as follows:
If-Range: file.ext_1234_1234567890
Range: bytes=1024-
Which should return this response with the appropriate bytes in the body:
Accept-Ranges: bytes
ETag: file.ext_1234_1234567890
Content-Range: bytes 1024-1233/1234