Skip to content

Commit

Permalink
Follow-up to r1778350
Browse files Browse the repository at this point in the history
Remove useless tests in order to avoid the duplication of a message.
Be consistent with "FPM" vs "PHP-FPM" usage messages.
Fix style issues.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778500 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Christophe Jaillet committed Jan 13, 2017
1 parent bbffc5c commit 80c930c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions modules/proxy/mod_proxy_fcgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,26 +1023,20 @@ static void *fcgi_merge_dconf(apr_pool_t *p, void *basev, void *overridesv)
return a;
}


static const char *cmd_servertype(cmd_parms *cmd, void *in_dconf,
const char *val)
{
fcgi_dirconf_t *dconf = in_dconf;

if (!val || !*val) {
return "ProxyFCGIBackendType requires one of the following arguments: "
"'GENERIC', 'PHP-FPM'";
}

if (!strcasecmp(val, "GENERIC")) {
dconf->backend_type = BACKEND_GENERIC;
}
else if (!strcasecmp(val, "FPM") || !strcasecmp(val, "PHP-FPM")) {
dconf->backend_type = BACKEND_FPM;
}
else {
return "ProxyFCGIBackendType requires one of the following arguments: "
"'GENERIC', 'PHP-FPM'";
return "ProxyFCGIBackendType requires one of the following arguments: "
"'GENERIC', 'FPM'";
}

return NULL;
Expand All @@ -1053,9 +1047,10 @@ static void register_hooks(apr_pool_t *p)
proxy_hook_scheme_handler(proxy_fcgi_handler, NULL, NULL, APR_HOOK_FIRST);
proxy_hook_canon_handler(proxy_fcgi_canon, NULL, NULL, APR_HOOK_FIRST);
}

static const command_rec command_table[] = {
AP_INIT_TAKE1( "ProxyFCGIBackendType", cmd_servertype, NULL, OR_FILEINFO,
" Specify the type of FastCGI server: 'Generic' 'FPM'"),
AP_INIT_TAKE1("ProxyFCGIBackendType", cmd_servertype, NULL, OR_FILEINFO,
"Specify the type of FastCGI server: 'Generic', 'FPM'"),
{ NULL }
};

Expand Down

0 comments on commit 80c930c

Please sign in to comment.