ParseURI¶
Parse a URI-reference (RFC 3986 section 4.1) into structured components.
Handles both absolute URIs (http://host/path?query) and relative
references (/path?query). Components are stored percent-encoded.
The parsing algorithm follows RFC 3986 section 3: scan for : before
any of /?# to identify the scheme, then check for // to identify
authority, then extract path (up to ? or #), query (between ?
and #), and fragment (after #). Scanning operates on literal
delimiter characters only — percent-encoded delimiters (%2F, %3F,
%23) are not treated as structural boundaries.
Scheme validation: the scheme must start with a letter and contain
only letters, digits, +, -, and . (RFC 3986 section 3.1).
The asterisk-form (*) used by HTTP OPTIONS is a valid relative
reference under RFC 3986 — it parses as a URI with path * and no
other components.
Constructors¶
create¶
Returns¶
- ParseURI val^
Public Functions¶
apply¶
Parameters¶
- raw: String val
Returns¶
- (URI val | InvalidPort val | InvalidHost val)
eq¶
Parameters¶
- that: ParseURI val
Returns¶
- Bool val
ne¶
Parameters¶
- that: ParseURI val
Returns¶
- Bool val