Browse Source

[doc] enhance error msg for backend server config

enhance error message for backend server config file parse
(fastcgi.server, scgi.server, proxy.server)

x-ref:
  https://redmine.lighttpd.net/boards/2/topics/6571
personal/stbuehler/mod-csrf-old
Glenn Strauss 6 years ago
parent
commit
d0dc881d73
  1. 6
      src/mod_fastcgi.c
  2. 6
      src/mod_proxy.c
  3. 6
      src/mod_scgi.c

6
src/mod_fastcgi.c

@ -1227,7 +1227,7 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
if (du->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sss",
"unexpected type for key: ", "fastcgi.server", "array of strings");
"unexpected type for key: ", "fastcgi.server", "expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}
@ -1245,7 +1245,7 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
if (da->value->data[j]->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sssbs",
"unexpected type for key: ", "fastcgi.server",
"[", da->value->data[j]->key, "](string)");
"[", da->value->data[j]->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}
@ -1294,7 +1294,7 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
log_error_write(srv, __FILE__, __LINE__, "ssSBS",
"unexpected type for key:",
"fastcgi.server",
"[", da_host->key, "](string)");
"[", da_host->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}

6
src/mod_proxy.c

@ -232,7 +232,7 @@ SETDEFAULTS_FUNC(mod_proxy_set_defaults) {
if (du->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sss",
"unexpected type for key: ", "proxy.server", "array of strings");
"unexpected type for key: ", "proxy.server", "expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
return HANDLER_ERROR;
}
@ -249,7 +249,7 @@ SETDEFAULTS_FUNC(mod_proxy_set_defaults) {
if (da_ext->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sssbs",
"unexpected type for key: ", "proxy.server",
"[", da->value->data[j]->key, "](string)");
"[", da->value->data[j]->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
return HANDLER_ERROR;
}
@ -278,7 +278,7 @@ SETDEFAULTS_FUNC(mod_proxy_set_defaults) {
log_error_write(srv, __FILE__, __LINE__, "ssSBS",
"unexpected type for key:",
"proxy.server",
"[", da_ext->value->data[n]->key, "](string)");
"[", da_ext->value->data[n]->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
return HANDLER_ERROR;
}

6
src/mod_scgi.c

@ -996,7 +996,7 @@ SETDEFAULTS_FUNC(mod_scgi_set_defaults) {
if (du->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sss",
"unexpected type for key: ", "scgi.server", "array of strings");
"unexpected type for key: ", "scgi.server", "expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}
@ -1014,7 +1014,7 @@ SETDEFAULTS_FUNC(mod_scgi_set_defaults) {
if (da->value->data[j]->type != TYPE_ARRAY) {
log_error_write(srv, __FILE__, __LINE__, "sssbs",
"unexpected type for key: ", "scgi.server",
"[", da->value->data[j]->key, "](string)");
"[", da->value->data[j]->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}
@ -1061,7 +1061,7 @@ SETDEFAULTS_FUNC(mod_scgi_set_defaults) {
log_error_write(srv, __FILE__, __LINE__, "ssSBS",
"unexpected type for key:",
"scgi.server",
"[", da_host->key, "](string)");
"[", da_host->key, "](string); expected ( \"ext\" => ( \"backend-label\" => ( \"key\" => \"value\" )))");
goto error;
}

Loading…
Cancel
Save