A minimal, non-destructive parser for URI references.
More...
A minimal, non-destructive parser for URI references.
This module acts on URI references, and thus process both relative references and URIs.
Note that fragment identifiers are not handled by the implementation.
- See also
- https://tools.ietf.org/html/rfc3986
Handler functions for uri_parser
- Author
- Cenk Gündoğan cenk..nosp@m.guen.nosp@m.dogan.nosp@m.@haw.nosp@m.-hamb.nosp@m.urg..nosp@m.de
◆ uri_parser_is_absolute()
bool uri_parser_is_absolute |
( |
const char * |
uri, |
|
|
size_t |
uri_len |
|
) |
| |
Checks whether uri
is in absolute form.
- Parameters
-
[in] | uri | URI reference to check. Must not be NULL |
[in] | uri_len | Length of uri |
- Precondition
uri != NULL
- Returns
- true if
uri
is a URI
-
false if
uri
is a relative reference
◆ uri_parser_is_absolute_string()
bool uri_parser_is_absolute_string |
( |
const char * |
uri | ) |
|
Checks whether uri
is in absolute form.
- Parameters
-
[in] | uri | Zero-terminated URI reference to check. Must not be Null |
- Precondition
uri != NULL
- Returns
- true if
uri
is a URI
-
false if
uri
is a relative reference
◆ uri_parser_process()
Parse a URI reference.
- Parameters
-
[out] | result | pointer to a container that will hold the result |
[in] | uri | URI to parse. Must not be NULL |
[in] | uri_len | Length of uri |
- Precondition
uri != NULL
- Returns
- 0 on success
-
-1 on parsing error
◆ uri_parser_process_string()
Parse a URI reference.
- Parameters
-
[out] | result | pointer to a container that will hold the result |
[in] | uri | Zero-terminated URI to parse. Must not be NULL |
- Precondition
uri != NULL
- Returns
- 0 on success
-
-1 on parsing error