]> granicus.if.org Git - php/commitdiff
BUG: all value comparaisons were not case insensitive in the conf file parser
authorJérôme Loyet <fat@php.net>
Mon, 2 Aug 2010 21:46:52 +0000 (21:46 +0000)
committerJérôme Loyet <fat@php.net>
Mon, 2 Aug 2010 21:46:52 +0000 (21:46 +0000)
sapi/fpm/fpm/fpm_conf.c

index 4590155c7f9a1d37b451e5c453f122b524cb0886..d422d4380b5adc6e523040885ecc403de4fc137b 100644 (file)
@@ -204,7 +204,7 @@ static char *fpm_conf_set_log_level(zval *value, void **config, intptr_t offset)
 {
        char *val = Z_STRVAL_P(value);
 
-       if (!strcmp(val, "debug")) {
+       if (!strcasecmp(val, "debug")) {
                fpm_globals.log_level = ZLOG_DEBUG;
        } else if (!strcasecmp(val, "notice")) {
                fpm_globals.log_level = ZLOG_NOTICE;
@@ -227,7 +227,7 @@ static char *fpm_conf_set_rlimit_core(zval *value, void **config, intptr_t offse
        char *val = Z_STRVAL_P(value);
        struct fpm_worker_pool_config_s *c = *config;
 
-       if (!strcmp(val, "unlimited")) {
+       if (!strcasecmp(val, "unlimited")) {
                c->rlimit_core = -1;
        } else {
                int int_value;
@@ -255,9 +255,9 @@ static char *fpm_conf_set_pm(zval *value, void **config, intptr_t offset) /* {{{
 {
        char *val = Z_STRVAL_P(value);
        struct fpm_worker_pool_config_s  *c = *config;
-       if (!strcmp(val, "static")) {
+       if (!strcasecmp(val, "static")) {
                c->pm = PM_STYLE_STATIC;
-       } else if (!strcmp(val, "dynamic")) {
+       } else if (!strcasecmp(val, "dynamic")) {
                c->pm = PM_STYLE_DYNAMIC;
        } else {
                return "invalid process manager (static or dynamic)";