TSHTTPTXNISINTERNAL(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’– TSHTTPTXNISINTERNAL(3ts) πŸ’–

okay bestie, welcome to the 3ts corner of the manual, aka the Apache Traffic Server API zone ✨ this one's short and sweet and it answers exactly one (1) question: did we make this request ourselves, or did somebody else? πŸ¦‹


🌸 NAME 🌸

TSHttpTxnIsInternal β€” test whether a request is internally-generated πŸ‘€


✨ SYNOPSIS ✨

#include <ts/ts.h>

int TSHttpTxnIsInternal(TSHttpTxn txnp)

int TSHttpSsnIsInternal(TSHttpSsn ssnp)

πŸ’… DESCRIPTION πŸ’…

So like, two lil functions, both with the same energy:

  • TSHttpTxnIsInternal() β€” tests whether a HTTP transaction was originated within Traffic Server 🫢
  • TSHttpSsnIsInternal() β€” tests whether a HTTP session was originated within Traffic Server 🫢

that's it. that's the whole vibe. internal origin or not, no in-between πŸ’€


πŸŽ€ RETURN VALUES πŸŽ€

Both these APIs return a int, indicating whether the request was internal (1) or not (0) πŸ‘‘

so: 1 = yeah girl we made it, 0 = nope, this came from outside. no cap πŸ’–


🌈 EXAMPLES 🌈

the ESI plugin uses TSHttpTxnIsInternal() to ignore requests that it had generated while fetching portions of an ESI document πŸ™ˆ iconic behaviour honestly

static bool
checkForCacheHeader(const char *name, int name_len, const char *value, int value_len, bool &cacheable)
{
(yeah that's where the snippet cuts off in the original β€” we keep it exactly as it is, no editing the queen's handwriting πŸ’…)

πŸ”₯ SEE ALSO πŸ”₯


2026, dev@trafficserver.apache.org πŸ’œ


and that's the whole page bestie, periodt ✨ this was TSHTTPTXNISINTERNAL(3ts) from Apache Traffic Server, version 9.2, dated Feb 12, 2026 β€” go forth and vibe check your transactions πŸŒΈπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from