Module uri

Module uri 

Source
Expand description

Provide methods and data structures for handling URIs.

This module is based on libxml/uri.h, uri.c, and so on in libxml2-v2.11.8.
Please refer to original libxml2 documents also.

Structs§

XmlURI
A parsed URI reference. This is a struct containing the various fields as described in RFC 2396 but separated for further processing.

Functions§

build_relative_uri
Expresses the URI of the reference in terms relative to the base.
Some examples of this operation include:
build_uri
Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396
canonic_path
Returns a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.
escape_url
Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it’s impossible to be sure.
escape_url_except
This routine escapes a string to hex, ignoring reserved characters (a-z, A-Z, 0-9, “@-_.!~*’()”) and the characters in the exception list.
normalize_uri_path
Applies the 5 normalization steps to a path string–that is, RFC 2396 Section 5.2, steps 6.c through 6.g.
path_to_uri
Constructs an URI expressing the existing path
unescape_url
Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding)