The XDebug plugin allows HTTP clients to debug the operation of
the Traffic Server cache using the default
X-Debug header. The plugin
is triggered by the presence of the
X-Debug or the configured header in
the client request. The contents of this header should be the names of the
debug headers that are desired in the response. The XDebug plugin
will inject the desired headers into the client response. In addition, a value of the
fwd=n may appear in the
X-Debug header, where
n is a nonnegative
n is zero, the
X-Debug header will be deleted. Otherwise,
decremented by 1.
=n may be omitted, in which case the
X-Debug header will
not be modified or deleted.
XDebug is a global plugin. It is installed by adding it to the
plugin.config file. It currently takes a single, optional
This overrides the default
X-Debug header name.
All the debug headers are disabled by default, and you need to enable them
selectively by passing header names to
X-Cache. If a client’s request has
X-Debug: x-remap, x-cache, probe, XDebug will only injects
The XDebug plugin is able to generate the following debugging headers:
Viaheader is requested, the XDebug plugin sets the
proxy.config.http.insert_response_via_strconfiguration variable to
3for the request.
Diagsheader is requested, the XDebug plugin enables the transaction specific diagnostics for the transaction. This also requires that
proxy.config.diags.debug.enabledis set to
All request and response headers are written to the response body. Because the body is altered, it disables writing to cache. In conjunction with the fwd tag, the response body will contain a chronological log of all headers for all transactions used for this response.
Request Headers from Client -> Proxy A
Request Headers from Proxy A -> Proxy B
Original content body
Response Headers from Proxy B -> Proxy A
Response Headers from Proxy A -> Client
X-Cache-Keyheader contains the URL that identifies the HTTP object in the Traffic Server cache. This header is particularly useful if a custom cache key is being used.
X-Cacheheader contains the results of any cache lookups.
No cache lookup was attempted.
The object was not found in the cache.
The object was found in the cache, but it was stale.
The object was fresh in the cache.
The cache lookup was skipped.
If a request goes through multiple proxies, each one appends its X-Cache header content the end of the existing X-Cache header. This is the same order as for the
The cache generation ID for this transaction, as specified by the
X-Milestonesheader contains detailed information about how long the transaction took to traverse portions of the HTTP state machine. The timing information is obtained from the
TSHttpTxnMilestoneGet()API. Each milestone value is a fractional number of seconds since the beginning of the transaction.
A unique transaction ID, which identifies this request / transaction. This matches the log field format that is also available, %<cruuid>.
If the URL was remapped for a request, this header gives the to and from field from the line in remap.config that caused the URL to be remapped.
If the URL was remapped for a request, this header gives the URL resulting from the remapping. Note that if there are multiple remaps, this header aggregates the URLs, space-comma-separated. The URLs are inside doublequotes.
X-ParentSelection-Keyheader contains the URL that is used to determine parent selection for an object in the Traffic Server. This header is particularly useful if a custom parent selection key is being used.