This is an automated email from the ASF dual-hosted git repository.
bnolsen 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 1feaba1235 header_rewrite: add debug to accompany parse_line errors
(#11238)
1feaba1235 is described below
commit 1feaba123536c14a462a507d12fbd95f3a26f8e4
Author: Brian Olsen <[email protected]>
AuthorDate: Thu Apr 11 16:03:35 2024 -0600
header_rewrite: add debug to accompany parse_line errors (#11238)
---
plugins/header_rewrite/header_rewrite.cc | 7 ++++++-
plugins/header_rewrite/value.cc | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/plugins/header_rewrite/header_rewrite.cc
b/plugins/header_rewrite/header_rewrite.cc
index b6999b3b68..60a1f72f29 100644
--- a/plugins/header_rewrite/header_rewrite.cc
+++ b/plugins/header_rewrite/header_rewrite.cc
@@ -180,7 +180,12 @@ RulesConfig::parse_config(const std::string &fname,
TSHttpHookID default_hook)
Parser p;
// Tokenize and parse this line
- if (!p.parse_line(line) || p.empty()) {
+ if (!p.parse_line(line)) {
+ Dbg(dbg_ctl, "Error parsing line '%s'", line.c_str());
+ continue;
+ }
+
+ if (p.empty()) {
continue;
}
diff --git a/plugins/header_rewrite/value.cc b/plugins/header_rewrite/value.cc
index 9256565a9d..d5d8f5727a 100644
--- a/plugins/header_rewrite/value.cc
+++ b/plugins/header_rewrite/value.cc
@@ -60,6 +60,7 @@ Value::set_value(const std::string &val)
tcond_val->initialize(parser);
} else {
// TODO: should we produce error here?
+ Dbg(dbg_ctl, "Error parsing value '%s'", _value.c_str());
}
}
} else {