trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Allow set-debug in remap plugins, and cleanup
Date Thu, 13 Apr 2017 04:02:48 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  72c93d2   Allow set-debug in remap plugins, and cleanup
72c93d2 is described below

commit 72c93d2826d032bf4294245017d5a22dd2af368b
Author: Leif Hedstrom <zwoop@apache.org>
AuthorDate: Tue Apr 11 18:04:12 2017 -0600

    Allow set-debug in remap plugins, and cleanup
---
 plugins/header_rewrite/operators.cc | 1 +
 plugins/header_rewrite/operators.h  | 2 --
 plugins/header_rewrite/ruleset.cc   | 2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/header_rewrite/operators.cc b/plugins/header_rewrite/operators.cc
index 185cc18..5defc83 100644
--- a/plugins/header_rewrite/operators.cc
+++ b/plugins/header_rewrite/operators.cc
@@ -878,6 +878,7 @@ void
 OperatorSetDebug::initialize_hooks()
 {
   add_allowed_hook(TS_HTTP_READ_REQUEST_HDR_HOOK);
+  add_allowed_hook(TS_REMAP_PSEUDO_HOOK);
 }
 
 void
diff --git a/plugins/header_rewrite/operators.h b/plugins/header_rewrite/operators.h
index 520d1ba..d7ec61f 100644
--- a/plugins/header_rewrite/operators.h
+++ b/plugins/header_rewrite/operators.h
@@ -313,8 +313,6 @@ protected:
 
 private:
   DISALLOW_COPY_AND_ASSIGN(OperatorSetDebug);
-
-  Value _ds_value;
 };
 
 #endif // __OPERATORS_H
diff --git a/plugins/header_rewrite/ruleset.cc b/plugins/header_rewrite/ruleset.cc
index f14e8e4..3ce874e 100644
--- a/plugins/header_rewrite/ruleset.cc
+++ b/plugins/header_rewrite/ruleset.cc
@@ -79,6 +79,8 @@ RuleSet::add_operator(Parser &p, const char *filename, int lineno)
     TSDebug(PLUGIN_NAME, "   Adding operator: %s(%s)", p.get_op().c_str(), p.get_arg().c_str());
     o->initialize(p);
     if (!o->set_hook(_hook)) {
+      TSDebug(PLUGIN_NAME, "in %s:%d: can't use this operator in hook=%s:  %s(%s)", filename,
lineno, TSHttpHookNameLookup(_hook),
+              p.get_op().c_str(), p.get_arg().c_str());
       TSError("[%s] in %s:%d: can't use this operator in hook=%s:  %s(%s)", PLUGIN_NAME,
filename, lineno,
               TSHttpHookNameLookup(_hook), p.get_op().c_str(), p.get_arg().c_str());
       return false;

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message