Name
rfc1808_parse_uri, rfc1808_expand_uri — parse and resolve URI references per RFC 1808
Synopsis
any rfc1808_parse_uri(
|
in uri varchar, |
in as_array integer); |
varchar rfc1808_expand_uri(
|
in base_uri varchar, |
| in rel_uri varchar, | |
| in output_charset varchar, | |
| in resolve_like_http_get integer, | |
| in base_charset varchar, | |
in rel_charset varchar); |
Description
rfc1808_parse_uri parses uri
into its RFC 1808 components (scheme, authority, path, parameters, query,
fragment). The optional as_array argument selects
the return shape: when zero the function returns the components
concatenated/joined per the original RFC 1808 rules; when non-zero it
returns a vector with the individual component strings.
rfc1808_expand_uri resolves
rel_uri against base_uri per
RFC 1808, returning the absolute URI. The optional
output_charset, base_charset
and rel_charset arguments specify the character set
encoding of the inputs and the desired encoding of the output; pass NULL
for defaults. When resolve_like_http_get is
non-zero, the resolution follows the relaxed rules that an HTTP user-agent
applies when dereferencing a URL (e.g. an empty relative URI resolves to
the base URI minus its fragment).