Skip to main content

Module normalize

Module normalize 

Source
Expand description

Per-URL-component normalization: decode only unreserved characters (RFC 3986 §2.3 — A-Z, a-z, 0-9, -, ., _, ~). Reserved characters stay percent-encoded so that downstream rules see the same shape regardless of encoding variation.

Structs§

NormalizedComponent
Result of normalization.

Functions§

normalize_path
Normalize a URL path component (decode unreserved chars, up to 3 rounds). Returns (normalized, raw, detected_double_encoding).
normalize_query
Normalize a query/fragment component (same treatment as path).