You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2017/02/28 15:36:03 UTC

[trafficserver] branch master updated: Fix broken template path caused by ba42078 (PR 1468)

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

amc pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  396209d   Fix broken template path caused by ba42078 (PR 1468)
396209d is described below

commit 396209d4d42d0349c6cfa0b882b273641e3a5b3f
Author: Persia Aziz <pe...@yahoo-inc.com>
AuthorDate: Mon Feb 27 16:54:30 2017 -0600

    Fix broken template path caused by ba42078 (PR 1468)
---
 mgmt/RecordsConfig.cc         | 2 +-
 proxy/http/HttpBodyFactory.cc | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index f9efa96..8dfc79f 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -755,7 +755,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.body_factory.enable_logging", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.body_factory.template_sets_dir", RECD_STRING, TS_BUILD_SYSCONFDIR "/body_factory", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]+$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.body_factory.template_sets_dir", RECD_STRING, "body_factory", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]+$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.body_factory.response_max_size", RECD_INT, "8192", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index 745fb40..313caf7 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -166,7 +166,6 @@ HttpBodyFactory::fabricate_with_old_api(const char *type, HttpTransact::State *c
   // handle return of instantiated template and generate the content //
   // language and content type return values                         //
   /////////////////////////////////////////////////////////////////////
-
   if (buffer) { // got an instantiated template
     if (!plain_flag) {
       snprintf(content_language_out_buf, content_language_buf_size, "%s", lang_ptr);
@@ -263,7 +262,6 @@ HttpBodyFactory::reconfigure()
 //#endif
 {
   RecInt e;
-  RecString s = nullptr;
   bool all_found;
   int rec_err;
 
@@ -301,14 +299,12 @@ HttpBodyFactory::reconfigure()
 
   ats_scoped_str directory_of_template_sets(RecConfigReadConfigPath("proxy.config.body_factory.template_sets_dir", "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));
     Warning(" Please set 'proxy.config.body_factory.template_sets_dir' ");
   }
 
-  Debug("body_factory", "directory_of_template_sets = '%s' (found = %s)", (const char *)directory_of_template_sets, s);
-  ats_free(s);
+  Debug("body_factory", "directory_of_template_sets = '%s' ", (const char *)directory_of_template_sets);
 
   if (!all_found) {
     Warning("config changed, but can't fetch all proxy.config.body_factory values");

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