Skip to main content

HEADER_SESSION_STATUS

Constant HEADER_SESSION_STATUS 

Source
pub const HEADER_SESSION_STATUS: &'static str;
Expand description

HTTP header turning a session POST into a status probe.

When present (value 1/probe) on a session request, the server does NOT write the body. Instead it opens (creating if needed) the shared per-session temp and replies with the JSON-encoded byte ranges already received for that session: {"ranges": [[start,end], ...]}. The client uses this to compute which blocks are still missing and re-send only those — a BitTorrent-style “only retransmit the broken parts” resume.

Absent (older clients) keeps the previous behavior; legacy servers that ignore this header simply write nothing for the empty probe body and return an empty range set, which degrades to a full re-send (idempotent positional writes make that correct too).