TSUrlStringGet¶
Traffic Server URL string representations API.
Description¶
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 :arg:`offset` within the marshal buffer :arg:`bufp`.
TSUrlStringGet() stores the length of the allocated string in the
parameter :arg:`length`. This is the same length that TSUrlLengthGet()
returns. The returned string is allocated by a call to TSmalloc() and
must be freed by a call to TSfree(). If length is NULL then no
attempt is made to de-reference it.
TSUrlLengthGet() calculates the length of the URL located at
:arg:`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
TSUrlStringGet().
TSUrlPrint() formats a URL stored in an TSMBuffer to an
TSIOBuffer.
See Also¶
TSAPI(3ts), TSmalloc(3ts), TSUrlCreate(3ts), TSUrlHostGet(3ts), TSUrlHostSet(3ts), TSUrlPercentEncode(3ts)