Skip to main content

validate_path

Function validate_path 

Source
pub fn validate_path(path: &str) -> Result<(), CoreError>
Expand description

Validate --path — pre-I/O, usage class (exit 2):

(a) must start with / (it joins onto the profile URL); (b) must not be host-shaped — a protocol-relative //host/… prefix or any string url::Url parses WITH a host (absolute/foreign URLs) is refused: url_for’s join would silently rebase the request off the profile’s gateway, turning the CLI into a proxy; (c) must not embed ? — the ONE query mechanism is the repeatable --query k=v flag (Pitfall 4: double-encoded query params are a silent wire corruption).