TSHttpTxnIsInternal

Test whether a request is internally-generated.

概要

#include <ts/ts.h>
int TSHttpTxnIsInternal(TSHttpTxn txnp)
int TSHttpSsnIsInternal(TSHttpSsn ssnp)

解説

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).

The ESI plugin uses TSHttpTxnIsInternal() to ignore requests that is had generated while fetching portions of an ESI document:

  do {
    *intercept_header = checkHeaderValue(bufp, hdr_loc, SERVER_INTERCEPT_HEADER, SERVER_INTERCEPT_HEADER_LEN);
    if (*intercept_header) {
      if (is_cache_txn) {

参考

TSAPI(3ts)