From: Yann Ylavic Date: Wed, 30 Dec 2015 00:16:50 +0000 (+0000) Subject: Follow up to r1715876: core directives are ASCII. X-Git-Tag: 2.5.0-alpha~2481 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b122da4868b97617ce8364fb28b7fa68f32c09a;p=thirdparty%2Fapache%2Fhttpd.git Follow up to r1715876: core directives are ASCII. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722251 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/config.c b/server/config.c index 045a4986ab4..50dfb117254 100644 --- a/server/config.c +++ b/server/config.c @@ -1042,7 +1042,7 @@ AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, const command_rec *cmds) { while (cmds->name) { - if (!strcasecmp(name, cmds->name)) + if (!ap_casecmpstr(name, cmds->name)) return cmds; ++cmds; @@ -1197,8 +1197,8 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool, *bracket = '\0'; - if (strcasecmp(cmd_name + 2, - (*curr_parent)->directive + 1) != 0) { + if (ap_casecmpstr(cmd_name + 2, + (*curr_parent)->directive + 1) != 0) { parms->err_directive = newdir; return apr_pstrcat(p, "Expected directive + 1, "> but saw ", @@ -1244,7 +1244,7 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p, while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, max_len)) == APR_SUCCESS) { if (!memcmp(vb.buf, "pool, "Expected but saw ", cmd_name, ">", NULL); @@ -2614,7 +2614,7 @@ static int count_directives_sub(const char *directive, ap_directive_t *current) while (current != NULL) { if (current->first_child != NULL) count += count_directives_sub(directive, current->first_child); - if (strcasecmp(current->directive, directive) == 0) + if (ap_casecmpstr(current->directive, directive) == 0) count++; current = current->next; } diff --git a/server/core.c b/server/core.c index 5840ba51115..46acd46d9eb 100644 --- a/server/core.c +++ b/server/core.c @@ -1160,7 +1160,7 @@ static const ap_directive_t * find_parent(const ap_directive_t *dirp, dirp = dirp->parent; /* ### it would be nice to have atom-ized directives */ - if (strcasecmp(dirp->directive, what) == 0) + if (ap_casecmpstr(dirp->directive, what) == 0) return dirp; } @@ -1360,7 +1360,7 @@ static void init_config_defines(apr_pool_t *pconf) static const char *set_define(cmd_parms *cmd, void *dummy, const char *name, const char *value) { - if (cmd->parent && strcasecmp(cmd->parent->directive, "parent && ap_casecmpstr(cmd->parent->directive, "pool, cmd->cmd->name, " is not valid in ", cmd->parent->directive, " context", NULL); } @@ -1391,7 +1391,7 @@ static const char *unset_define(cmd_parms *cmd, void *dummy, { int i; char **defines; - if (cmd->parent && strcasecmp(cmd->parent->directive, "parent && ap_casecmpstr(cmd->parent->directive, "pool, cmd->cmd->name, " is not valid in ", cmd->parent->directive, " context", NULL); }