Skip to main content

parse_range

Function parse_range 

Source
pub fn parse_range(value: &str, len: u64) -> Option<(u64, u64)>
Expand description

Parse one bytes=a-b / bytes=a- / bytes=-n range against a known length into an inclusive (start, end). Multi-range requests, empty bodies and unsatisfiable ranges are refused.