TSHttpTxnIsInternal
Test whether a request is internally-generated.
Synopsis
#include <ts/ts.h>
Description
TSHttpTxnIsInternal() tests whether a HTTP transaction
was originated within Traffic Server.
TSHttpSsnIsInternal() tests whether a HTTP session
was originated within Traffic Server.
Return Values
Both these APIs return a int, indicating whether the
request was internal (1) or not (0).
Examples
The ESI plugin uses TSHttpTxnIsInternal() to ignore requests that is
had generated while fetching portions of an ESI document:
method = TSHttpHdrMethodGet(bufp, hdr_loc, &method_len);
if (method == nullptr) {
TSError("[esi][%s] Couldn't get method for URL [%s]", __FUNCTION__, request_url.c_str());
TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
See also
TSAPI(3ts)