12345678module juptune.http.uri;
Result uriParsePath(
const char[] chars,
const char[] path,
const char[] next,
UriParseHints hints
);
Parses the path of a URI.
pathIsAbsolute -> /path?query#fragment, e.g. "/some/path?some=query#some-fragment"
pathIsRootless -> path?query#fragment, e.g. "some/path?some=query#some-fragment"
pathIsEmpty -> ?query#fragment, e.g. "?some=query#some-fragment"
pathHasStartColon mixes with pathIsAbsolute -> /pa:th?query#fragment, e.g. "/some:path/yada/yada?some=query#some-fragment"
percentEncodedPath mixes with pathIsAbsolute and pathIsRootless -> pa%20th?query#fragment, e.g. "some%20path/yada/yada?some=query#some-fragment"
Given the string "/some/path/?some=query#some-fragment", the pathparameter will be set to "/some/path/", and the nextparameter will be set to "?some=query#some-fragment".
The output of all outparameters is undefined if the function returns an error.
While percent encoding is validated, it is not decoded.
UriError.pathIsInvalidif the path is absolute and starts with "//"
UriError.pathIsInvalidif the path is rootless and contains a ':' in the first segment
UriError.pathIsInvalidif the path contains an invalid character
UriError.pathIsInvalidif the path contains an invalid percent encoded character
A Resultindicating whether the parsing was successful or not.