Scroll to navigation

TSHTTPTXNISINTERNAL(3ts) Apache Traffic Server TSHTTPTXNISINTERNAL(3ts)

NAME

TSHttpTxnIsInternal - test whether a request is internally-generated

SYNOPSIS

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

int TSHttpSsnIsInternal(TSHttpSsn ssnp)

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:

checkForCacheHeader(const char *name, int name_len, const char *value, int value_len, bool &cacheable)
{
  cacheable = true;
  if (Utils::areEqual(name, name_len, TS_MIME_FIELD_EXPIRES, TS_MIME_LEN_EXPIRES)) {


SEE ALSO

TSAPI(3ts)

COPYRIGHT

2020, dev@trafficserver.apache.org
June 25, 2020 8.0