Traffic Server URL string representations API.
The URL data structure is a parsed version of a standard internet URL. The Traffic Server URL API provides access to URL data stored in marshal buffers. The URL functions can create, copy, retrieve or delete entire URLs, and retrieve or modify parts of URLs, such as their host, port or scheme information.
TSUrlStringGet() constructs a string representation of the URL located
at offset within the marshal buffer bufp. (However bufp is actually superfluous and may be null.)
TSUrlStringGet() stores the length of the allocated string in the
parameter length. This is the same length that
returns. The returned string is allocated by a call to
must be freed by a call to
TSfree(). If length is
NULL then no
attempt is made to de-reference it.
The source is transaction txn in order to have access to the full request.
It combines, if needed, both the explicit url and the
Hostfield. This is done if the explicit URL does not have a host and the
This function is useful to guarantee a URL that is as complete as possible given the specific request.
TSUrlLengthGet() calculates the length of the URL located at
offset within the marshal buffer bufp as if it were returned as a
string. This length will be the same as the length returned by
TSAPI(3ts), TSmalloc(3ts), TSUrlCreate(3ts), TSUrlHostGet(3ts), TSUrlHostSet(3ts), TSUrlPercentEncode(3ts)