Github user zwoop commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/748#discussion_r69008502
--- Diff: plugins/healthchecks/healthchecks.c ---
@@ -301,8 +301,22 @@ parse_configs(const char *fname)
char buf[2 * 1024];
HCFileInfo *head_finfo = NULL, *finfo = NULL, *prev_finfo = NULL;
- if (NULL == (fd = fopen(fname, "r")))
+ if (!fname) {
return NULL;
+ }
+
+ if ('/' == *fname) {
+ fd = fopen(fname, "r");
+ } else {
+ char filename[PATH_MAX + 1];
+
+ snprintf(filename, sizeof(filename), "%s/%s", fname, TSConfigDirGet());
+ fd = fopen(filename, "r");
--- End diff --
So, these files are the actual content files, and they really should not be
based in the ATS config area (or anything near ATS run-time). Best practices
says that you likely want to use an absolute path in these config files, I can
add that to the docs.
Also, all this changes if/when we replace this junk with a file serving
remap based plugin :).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---