Skip to main content

normalize_request_path

Function normalize_request_path 

Source
pub fn normalize_request_path(target: &str, max_bytes: usize) -> Option<String>
Expand description

Normalizes an absolute request path without permitting parent traversal.

§Parameters

§Returns

Returns Some when crate::normalize_request_path can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::normalize_request_path.

§Examples

ⓘ
let _result = pharos_runtime_core::normalize_request_path("/", 1024);
  • crate for adjacent helpers that share the same runtime surface.