Skip to main content

probe

Function probe 

Source
pub async fn probe(
    client: &Client,
    url: &Url,
) -> Result<RemoteInfo, TransferError>
Expand description

Ask the server what it has, without downloading it.

A one-byte ranged GET rather than HEAD: plenty of servers and CDNs answer HEAD with different (or absent) headers than they answer GET, and a ranged GET tells us in one round trip whether ranges actually work — as opposed to whether the server merely claims they do.

Prefer probe_priming for the primary URL; this remains the right call for mirrors, where we want the metadata and emphatically not the body.