kvarn::prelude::utils::parse

Function sanitize_request

source
pub fn sanitize_request<T>(
    request: &Request<T>,
) -> Result<CriticalRequestComponents, SanitizeError>
Expand description

Sanitizes request for unwanted data and returns critical components.

§Errors

Will alert you when the request’s path contains a ./ or Path::is_absolute(). Also rejects ranges which have a start after the end.

See SanitizeError for all the variants.