fn validate_download_size(
label: &str,
expected: Option<u64>,
actual: u64,
) -> Result<()>Expand description
Validates the streamed byte count against Content-Length when the server
reports one.
The check is exact: both short downloads and extra bytes are treated as errors. If the server does not report a length, the check is skipped.