Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/admin-guide/files/records.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,7 @@ Customizable User Response Pages

The customizable response page default directory. If this is a
relative path, |TS| resolves it relative to the
``PREFIX`` directory.
``SYSCONFDIR`` directory.

.. ts:cv:: CONFIG proxy.config.body_factory.template_base STRING ""
:reloadable:
Expand Down
2 changes: 1 addition & 1 deletion doc/admin-guide/monitoring/error-messages.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ is provided in :ref:`appendix-http-status-codes`.

The error messages can be customized. The actual response is generated from a template. These
templates are stored in files which means the errors responses can be customized by modifying these
files. The default directory for the template files is ``PREFIX/body_factory/default`` but this can
files. The default directory for the template files is ``SYSCONFDIR/body_factory/default`` but this can
be changed by the configuration variable :ts:cv:`proxy.config.body_factory.template_sets_dir`. All
files in this directory are added to a lookup table which is consulted when the error message is
generated. The name used for lookup is by default that listed in the :ref:`following table
Expand Down
4 changes: 2 additions & 2 deletions proxy/http/HttpBodyFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ HttpBodyFactory::reconfigure()
ats_scoped_str directory_of_template_sets(RecConfigReadConfigPath("proxy.config.body_factory.template_sets_dir", "body_factory"));

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' ");
Fatal("Unable to access() directory '%s': %d, %s. Please set 'proxy.config.body_factory.template_sets_dir' ",
(const char *)directory_of_template_sets, errno, strerror(errno));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think .get() can work here instead of the cast:

directory_of_template_sets.get(), errno, ...

}

Debug("body_factory", "directory_of_template_sets = '%s' ", (const char *)directory_of_template_sets);
Expand Down