summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-08-05 23:32:53 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-08-06 23:32:25 -0400
commit7ec74fe7b1502c7ffc970dd5a6171afac2508cf8 (patch)
treecdf4a5ec18457634038a6b435af1e3fba9bc6f7e
parent19d2190a4f87cabdd59916ca859df45b416c9dbe (diff)
downloadlighttpd1.4-7ec74fe7b1502c7ffc970dd5a6171afac2508cf8.tar.gz
lighttpd1.4-7ec74fe7b1502c7ffc970dd5a6171afac2508cf8.zip
[core] warn if backend server config contains '_'
(detect a common config typo)
-rw-r--r--src/gw_backend.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gw_backend.c b/src/gw_backend.c
index 52d5147c..fd046c8e 100644
--- a/src/gw_backend.c
+++ b/src/gw_backend.c
@@ -1302,6 +1302,14 @@ int gw_set_defaults_backend(server *srv, gw_plugin_data *p, data_unset *du, size
goto error;
}
+ for (size_t m = 0; m < da_host->value->used; ++m) {
+ if (NULL != strchr(da_host->value->data[m]->key->ptr, '_')) {
+ log_error_write(srv, __FILE__, __LINE__, "sb",
+ "incorrect directive contains underscore ('_') instead of dash ('-'):",
+ da_host->value->data[m]->key);
+ }
+ }
+
if ((!buffer_string_is_empty(host->host) || host->port)
&& !buffer_string_is_empty(host->unixsocket)) {
log_error_write(srv, __FILE__, __LINE__, "sbsbsbs",