TSURLHOSTSET(3ts) | Apache Traffic Server | TSURLHOSTSET(3ts) |
TSUrlHostSet - traffic Server URL component manipulation API
#include <ts/ts.h>
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.
TSUrlSchemeSet(), TSUrlUserSet(), TSUrlPasswordSet(), TSUrlHostSet(), TSUrlHttpParamsSet(), TSUrlHttpQuerySet() and TSUrlHttpFragmentSet() each set the specified portion of the URL located at offset within the marshal buffer bufp to the string value. If length is -1 then these functions assume that value is NULL-terminated. Otherwise, the length of the string value is taken to be the value of length. These functions copy the string to within bufp, so it can be subsequently modified or deleted.
TSUrlPortSet() sets the port number portion of the URL located at offset within the marshal buffer bufp to the value port. Normal canonicalization based on the URL scheme still applies.
All these APIs returns a TSReturnCode, indicating success (TS_SUCCESS) or failure (TS_ERROR) of the operation.
TSAPI(3ts), TSUrlCreate(3ts), TSUrlHostGet(3ts), TSUrlStringGet(3ts), TSUrlPercentEncode(3ts)
2022, dev@trafficserver.apache.org
May 21, 2022 | 8.0 |