Repository: trafficserver
Updated Branches:
  refs/heads/master 70f23c7d7 -> e82473536


TS-3903 Adds a 'diags' header option to xdebug.so


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c53980fb
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c53980fb
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c53980fb

Branch: refs/heads/master
Commit: c53980fb26f37a0f835401d75bb37e7776064e7b
Parents: 70f23c7
Author: Leif Hedstrom <[email protected]>
Authored: Fri Sep 11 08:41:56 2015 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Wed Oct 21 09:24:03 2015 -0600

----------------------------------------------------------------------
 doc/reference/plugins/xdebug.en.rst   | 5 +++++
 plugins/experimental/xdebug/xdebug.cc | 3 +++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c53980fb/doc/reference/plugins/xdebug.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/plugins/xdebug.en.rst 
b/doc/reference/plugins/xdebug.en.rst
index 3e041f4..6d43369 100644
--- a/doc/reference/plugins/xdebug.en.rst
+++ b/doc/reference/plugins/xdebug.en.rst
@@ -47,6 +47,11 @@ Via
     :ts:cv:`proxy.config.http.insert_response_via_str` configuration variable
     to ``3`` for the request.
 
+Diags
+    If the ``Diags`` header is requested, the `XDebug` plugin enables the
+    transaction specific diagnostics for the transaction. This also requires
+    that :ts:cv:`proxy.config.diags.debug.enabled` is set to ``1``.
+
 X-Cache-Key
     The ``X-Cache-Key`` header contains the URL that identifies the HTTP 
object in the
     Traffic Server cache. This header is particularly useful if a custom cache

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c53980fb/plugins/experimental/xdebug/xdebug.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/xdebug/xdebug.cc 
b/plugins/experimental/xdebug/xdebug.cc
index 637b37c..140b853 100644
--- a/plugins/experimental/xdebug/xdebug.cc
+++ b/plugins/experimental/xdebug/xdebug.cc
@@ -320,6 +320,9 @@ XScanRequestHeaders(TSCont /* contp */, TSEvent event, void 
*edata)
       } else if (header_field_eq("via", value, vsize)) {
         // If the client requests the Via header, enable verbose Via debugging 
for this transaction.
         TSHttpTxnConfigIntSet(txn, TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR, 3);
+      } else if (header_field_eq("diags", value, vsize)) {
+        // Enable diagnostics for DebugTxn()'s only
+        TSHttpTxnDebugSet(txn, 1);
       } else {
         TSDebug("xdebug", "ignoring unrecognized debug tag '%.*s'", vsize, 
value);
       }

Reply via email to