Skip to main content

parse_byte_range

Function parse_byte_range 

Source
pub(super) fn parse_byte_range(header: &str, total: u64) -> ByteRange
Expand description

Parses a single bytes= range (a-b, a-, or the suffix form -n). Anything this doesn’t understand — another unit, several ranges, b < a, junk — serves the whole file, which RFC 9110 §14.2 allows a server to do for any Range it chooses to ignore.