Skip to main content

## span_for

# Function span_for

Source

    pub fn span_for(range: Option<&str>, len: u64) -> Option<Span>

Expand description

Decide which span to send for a `Range` header (or its absence).

`None` means unsatisfiable — answer 416. A missing or unparseable header yields the first chunk, so a client that did not ask for a range still gets a bounded response it can continue from, which is exactly the case the asset protocol answered with the whole file.

TRACES: UR-071 | DR-137 | UT-127