You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2022/02/07 22:39:45 UTC

[trafficserver] branch revert-8388-body_factory_fix created (now 3b95355)

This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a change to branch revert-8388-body_factory_fix
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


      at 3b95355  Revert "body factory does not respect runroot (#8388)"

This branch includes the following new commits:

     new 3b95355  Revert "body factory does not respect runroot (#8388)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[trafficserver] 01/01: Revert "body factory does not respect runroot (#8388)"

Posted by bn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch revert-8388-body_factory_fix
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 3b9535551cfae2e1515c16f26abf3d85cf479d47
Author: Brian Neradt <br...@verizonmedia.com>
AuthorDate: Mon Feb 7 16:39:37 2022 -0600

    Revert "body factory does not respect runroot (#8388)"
    
    This reverts commit d19ef809cce96a684e1854b249231c909e0bad02.
---
 lib/records/RecConfigParse.cc | 2 +-
 proxy/http/HttpBodyFactory.cc | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/records/RecConfigParse.cc b/lib/records/RecConfigParse.cc
index a6cc89b..bc7e5d5 100644
--- a/lib/records/RecConfigParse.cc
+++ b/lib/records/RecConfigParse.cc
@@ -89,7 +89,7 @@ RecConfigOverrideFromRunroot(const char *name)
   if (!get_runroot().empty()) {
     if (!strcmp(name, "proxy.config.bin_path") || !strcmp(name, "proxy.config.local_state_dir") ||
         !strcmp(name, "proxy.config.log.logfile_dir") || !strcmp(name, "proxy.config.plugin.plugin_dir") ||
-        !strcmp(name, "proxy.config.hostdb.storage_path") || !strcmp(name, "proxy.config.body_factory.template_sets_dir")) {
+        !strcmp(name, "proxy.config.hostdb.storage_path")) {
       return true;
     }
   }
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index 88f6b9f..c60680c 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -277,13 +277,7 @@ HttpBodyFactory::reconfigure()
   rec_err   = RecGetRecordString_Xmalloc("proxy.config.body_factory.template_sets_dir", &s);
   all_found = all_found && (rec_err == REC_ERR_OKAY);
   if (rec_err == REC_ERR_OKAY) {
-    // check if we should tweak with run_root value
-    if (s && strlen(s) > 0) {
-      // the value is set via config file or ENV var
-      directory_of_template_sets = Layout::get()->relative(s);
-    } else {
-      directory_of_template_sets = Layout::relative_to(RecConfigReadConfigDir(), "body_factory");
-    }
+    directory_of_template_sets = Layout::get()->relative(s);
     if (access(directory_of_template_sets, R_OK) < 0) {
       Warning("Unable to access() directory '%s': %d, %s", (const char *)directory_of_template_sets, errno, strerror(errno));
       if (TSSystemState::is_initializing()) {