]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow up to r1715876: core directives are ASCII.
authorYann Ylavic <ylavic@apache.org>
Wed, 30 Dec 2015 00:16:50 +0000 (00:16 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 30 Dec 2015 00:16:50 +0000 (00:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722251 13f79535-47bb-0310-9956-ffa450edef68

server/config.c
server/core.c

index 045a4986ab4e3df8b6ed8b4c90ae141ac7fb9548..50dfb1172546b649a1e5e73ee1b2c31c4aee365d 100644 (file)
@@ -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 </",
                                    (*curr_parent)->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, "</", 2)
-            && (strcasecmp(vb.buf + 2, bracket) == 0)
+            && (ap_casecmpstr(vb.buf + 2, bracket) == 0)
             && (*curr_parent == NULL)) {
             break;
         }
@@ -1621,7 +1621,7 @@ AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive)
             if (cmd_name[1] == '/') {
                 cmd_name[strlen(cmd_name) - 1] = '\0';
 
-                if (strcasecmp(cmd_name + 2, directive + 1) != 0) {
+                if (ap_casecmpstr(cmd_name + 2, directive + 1) != 0) {
                     return apr_pstrcat(cmd->pool, "Expected </",
                                        directive + 1, "> 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;
     }
index 5840ba5111566d5ef8d96e2db46c9c3eb05203d1..46acd46d9eb5f16097f076ad5a4910093952fdcf 100644 (file)
@@ -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, "<VirtualHost")) { 
+    if (cmd->parent && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) { 
         return apr_pstrcat(cmd->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, "<VirtualHost")) { 
+    if (cmd->parent && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ",
                                       cmd->parent->directive, " context", NULL);
     }