]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 9 Jun 2016 00:06:42 +0000 (00:06 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 9 Jun 2016 00:06:42 +0000 (00:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68

50 files changed:
include/ap_mmn.h
include/httpd.h
modules/aaa/mod_auth_basic.c
modules/aaa/mod_auth_digest.c
modules/aaa/mod_auth_form.c
modules/aaa/mod_authn_core.c
modules/aaa/mod_authnz_fcgi.c
modules/cache/cache_storage.c
modules/cache/cache_util.c
modules/dav/main/mod_dav.c
modules/dav/main/util.c
modules/filters/mod_charset_lite.c
modules/filters/mod_deflate.c
modules/filters/mod_include.c
modules/filters/mod_proxy_html.c
modules/generators/mod_autoindex.c
modules/generators/mod_info.c
modules/http/byterange_filter.c
modules/http/http_filters.c
modules/http2/h2_proxy_session.c
modules/http2/h2_util.c
modules/http2/h2_util.h
modules/loggers/mod_log_config.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_vhost_alias.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_headers.c
modules/proxy/ajp_header.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_ajp.c
modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_fcgi.c
modules/proxy/mod_proxy_fdpass.c
modules/proxy/mod_proxy_ftp.c
modules/proxy/mod_proxy_hcheck.c
modules/proxy/mod_proxy_http.c
modules/proxy/mod_proxy_scgi.c
modules/proxy/mod_proxy_wstunnel.c
modules/proxy/mod_serf.c
modules/proxy/proxy_util.c
modules/ssl/ssl_engine_ocsp.c
modules/test/mod_policy.c
server/config.c
server/core.c
server/mpm_unix.c
server/protocol.c
server/util.c
server/util_expr_eval.c
server/util_script.c

index 8ccc9ef6f6c197368d6cc06f5baf1f8316fb935a..0e0327a21f49502dc7426d1fd44b429db4fccaff 100644 (file)
  *                         to struct proxy_{worker,balancer} in mod_proxy.h,
  *                         and optional ssl_engine_set() to mod_ssl.h.
  * 20160315.3 (2.5.0-dev)  Add childtags to dav_error.
+ * 20160608.1 (2.5.0-dev)  Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n]()
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20160315
+#define MODULE_MAGIC_NUMBER_MAJOR 20160608
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 3                 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 1                 /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 585a89d5e36a16d6b5e8ec3c72a83848c7c46ac1..f2c7c12ca713deeb4ff2bf5c4bb67f40f0430ccd 100644 (file)
@@ -2470,23 +2470,32 @@ AP_DECLARE(int) ap_array_str_contains(const apr_array_header_t *array,
                                       const char *s);
 
 /**
- * Known-fast version of strcasecmp(): ASCII case-folding, POSIX compliant
- * @param s1 The 1st string to compare
- * @param s2 The 2nd string to compare
- * @return 0 if s1 is lexicographically equal to s2 ignoring case;
- *         non-0 otherwise.
+ * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
+ * treating upper and lower case values of the 26 standard C/POSIX alphabetic
+ * characters as equivalent. Extended latin characters outside of this set
+ * are treated as unique octets, irrespective of the current locale.
+ *
+ * Returns in integer greater than, equal to, or less than 0,
+ * according to whether @a str1 is considered greater than, equal to,
+ * or less than @a str2.
+ *
+ * @note Same code as apr_cstr_casecmp, which arrives in APR 1.6
  */
-AP_DECLARE(int) ap_casecmpstr(const char *s1, const char *s2);
+AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2);
 
 /**
- * Known-fast version of strncasecmp(): ASCII case-folding, POSIX compliant
- * @param s1 The 1st string to compare
- * @param s2 The 2nd string to compare
- * @param n  Maximum number of characters in the strings to compare
- * @return 0 if s1 is lexicographically equal to s2 ignoring case;
- *         non-0 otherwise.
+ * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
+ * treating upper and lower case values of the 26 standard C/POSIX alphabetic
+ * characters as equivalent. Extended latin characters outside of this set
+ * are treated as unique octets, irrespective of the current locale.
+ *
+ * Returns in integer greater than, equal to, or less than 0,
+ * according to whether @a str1 is considered greater than, equal to,
+ * or less than @a str2.
+ *
+ * @note Same code as apr_cstr_casecmp, which arrives in APR 1.6
  */
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2, apr_size_t n);
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n);
 
 #ifdef __cplusplus
 }
index d0986940099e23aa63e0576b594004f48ac54ec5..30afcd28423fcc5f14dd1b1d5aaff3bfc02da8f3 100644 (file)
@@ -238,7 +238,7 @@ static void note_basic_auth_failure(request_rec *r)
 
 static int hook_note_basic_auth_failure(request_rec *r, const char *auth_type)
 {
-    if (ap_casecmpstr(auth_type, "Basic"))
+    if (ap_cstr_casecmp(auth_type, "Basic"))
         return DECLINED;
 
     note_basic_auth_failure(r);
@@ -261,7 +261,7 @@ static int get_basic_auth(request_rec *r, const char **user,
         return HTTP_UNAUTHORIZED;
     }
 
-    if (ap_casecmpstr(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
+    if (ap_cstr_casecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
         /* Client tried to authenticate using wrong auth scheme */
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01614)
                       "client used wrong authentication scheme: %s", r->uri);
@@ -301,7 +301,7 @@ static int authenticate_basic_user(request_rec *r)
 
     /* Are we configured to be Basic auth? */
     current_auth = ap_auth_type(r);
-    if (!current_auth || ap_casecmpstr(current_auth, "Basic")) {
+    if (!current_auth || ap_cstr_casecmp(current_auth, "Basic")) {
         return DECLINED;
     }
 
index e91409939f3a1d94f848b67114cbcd900652543d..c0da9e8506cde724b9682db4513c06efb5e045fe 100644 (file)
@@ -538,7 +538,7 @@ static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
     if (!strcasecmp(op, "auth-int")) {
         return "AuthDigestQop auth-int is not implemented";
     }
-    else if (ap_casecmpstr(op, "auth")) {
+    else if (ap_cstr_casecmp(op, "auth")) {
         return apr_pstrcat(cmd->pool, "Unrecognized qop: ", op, NULL);
     }
 
@@ -590,7 +590,7 @@ static const char *set_algorithm(cmd_parms *cmd, void *config, const char *alg)
         return "AuthDigestAlgorithm: ERROR: algorithm `MD5-sess' "
                 "is not implemented";
     }
-    else if (ap_casecmpstr(alg, "MD5")) {
+    else if (ap_cstr_casecmp(alg, "MD5")) {
         return apr_pstrcat(cmd->pool, "Invalid algorithm in AuthDigestAlgorithm: ", alg, NULL);
     }
 
@@ -889,7 +889,7 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp)
     }
 
     resp->scheme = ap_getword_white(r->pool, &auth_line);
-    if (ap_casecmpstr(resp->scheme, "Digest")) {
+    if (ap_cstr_casecmp(resp->scheme, "Digest")) {
         resp->auth_hdr_sts = NOT_DIGEST;
         return !OK;
     }
@@ -953,25 +953,25 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp)
             auth_line++;
         }
 
-        if (!ap_casecmpstr(key, "username"))
+        if (!ap_cstr_casecmp(key, "username"))
             resp->username = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "realm"))
+        else if (!ap_cstr_casecmp(key, "realm"))
             resp->realm = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "nonce"))
+        else if (!ap_cstr_casecmp(key, "nonce"))
             resp->nonce = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "uri"))
+        else if (!ap_cstr_casecmp(key, "uri"))
             resp->uri = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "response"))
+        else if (!ap_cstr_casecmp(key, "response"))
             resp->digest = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "algorithm"))
+        else if (!ap_cstr_casecmp(key, "algorithm"))
             resp->algorithm = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "cnonce"))
+        else if (!ap_cstr_casecmp(key, "cnonce"))
             resp->cnonce = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "opaque"))
+        else if (!ap_cstr_casecmp(key, "opaque"))
             resp->opaque = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "qop"))
+        else if (!ap_cstr_casecmp(key, "qop"))
             resp->message_qop = apr_pstrdup(r->pool, value);
-        else if (!ap_casecmpstr(key, "nc"))
+        else if (!ap_cstr_casecmp(key, "nc"))
             resp->nonce_count = apr_pstrdup(r->pool, value);
     }
 
@@ -1149,7 +1149,7 @@ static void note_digest_auth_failure(request_rec *r,
     if (apr_is_empty_array(conf->qop_list)) {
         qop = ", qop=\"auth\"";
     }
-    else if (!ap_casecmpstr(*(const char **)(conf->qop_list->elts), "none")) {
+    else if (!ap_cstr_casecmp(*(const char **)(conf->qop_list->elts), "none")) {
         qop = "";
     }
     else {
@@ -1238,7 +1238,7 @@ static int hook_note_digest_auth_failure(request_rec *r, const char *auth_type)
     digest_header_rec *resp;
     digest_config_rec *conf;
 
-    if (ap_casecmpstr(auth_type, "Digest"))
+    if (ap_cstr_casecmp(auth_type, "Digest"))
         return DECLINED;
 
     /* get the client response and mark */
@@ -1348,7 +1348,7 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp,
     }
 
     if (!apr_is_empty_array(conf->qop_list) &&
-        !ap_casecmpstr(*(const char **)(conf->qop_list->elts), "none")) {
+        !ap_cstr_casecmp(*(const char **)(conf->qop_list->elts), "none")) {
         /* qop is none, client must not send a nonce count */
         if (snc != NULL) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01772)
@@ -1551,7 +1551,7 @@ static int authenticate_digest_user(request_rec *r)
 
     /* do we require Digest auth for this URI? */
 
-    if (!(t = ap_auth_type(r)) || ap_casecmpstr(t, "Digest")) {
+    if (!(t = ap_auth_type(r)) || ap_cstr_casecmp(t, "Digest")) {
         return DECLINED;
     }
 
@@ -1696,7 +1696,7 @@ static int authenticate_digest_user(request_rec *r)
     }
 
     if (resp->algorithm != NULL
-        && ap_casecmpstr(resp->algorithm, "MD5")) {
+        && ap_cstr_casecmp(resp->algorithm, "MD5")) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01789)
                       "unknown algorithm `%s' received: %s",
                       resp->algorithm, r->uri);
@@ -1750,7 +1750,7 @@ static int authenticate_digest_user(request_rec *r)
         int match = 0, idx;
         const char **tmp = (const char **)(conf->qop_list->elts);
         for (idx = 0; idx < conf->qop_list->nelts; idx++) {
-            if (!ap_casecmpstr(*tmp, resp->message_qop)) {
+            if (!ap_cstr_casecmp(*tmp, resp->message_qop)) {
                 match = 1;
                 break;
             }
@@ -1759,7 +1759,7 @@ static int authenticate_digest_user(request_rec *r)
 
         if (!match
             && !(apr_is_empty_array(conf->qop_list)
-                 && !ap_casecmpstr(resp->message_qop, "auth"))) {
+                 && !ap_cstr_casecmp(resp->message_qop, "auth"))) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01793)
                           "invalid qop `%s' received: %s",
                           resp->message_qop, r->uri);
@@ -1841,7 +1841,7 @@ static int add_auth_info(request_rec *r)
     /* do rfc-2069 digest
      */
     if (!apr_is_empty_array(conf->qop_list) &&
-        !ap_casecmpstr(*(const char **)(conf->qop_list->elts), "none")
+        !ap_cstr_casecmp(*(const char **)(conf->qop_list->elts), "none")
         && resp->message_qop == NULL) {
         /* use only RFC-2069 format */
         ai = nextnonce;
index 5a38f2f3f8ef97899db0f48560391700b52ea282..03dc15bcaac242b94e30c7794b4d8074928f6e2e 100644 (file)
@@ -420,7 +420,7 @@ static void note_cookie_auth_failure(request_rec * r)
 static int hook_note_cookie_auth_failure(request_rec * r,
                                          const char *auth_type)
 {
-    if (ap_casecmpstr(auth_type, "form"))
+    if (ap_cstr_casecmp(auth_type, "form"))
         return DECLINED;
 
     note_cookie_auth_failure(r);
@@ -892,7 +892,7 @@ static int authenticate_form_authn(request_rec * r)
 
     /* Are we configured to be Form auth? */
     current_auth = ap_auth_type(r);
-    if (!current_auth || ap_casecmpstr(current_auth, "form")) {
+    if (!current_auth || ap_cstr_casecmp(current_auth, "form")) {
         return DECLINED;
     }
 
index a2f8e1c340703e0a451b73e88fa978b0bf7d979a..c3226449e4bf87a487817fdcf7cb13c3ce31260a 100644 (file)
@@ -347,7 +347,7 @@ static const char *authn_ap_auth_type(request_rec *r)
             return NULL;
         }
 
-        return ap_casecmpstr(type, "None") ? type : NULL;
+        return ap_cstr_casecmp(type, "None") ? type : NULL;
     }
 
     return NULL;
index df592864d63bbb9de39beeb75d51a30e7332bd65..a73bad61df80404bac04cfec8f37d323708634b0 100644 (file)
@@ -680,7 +680,7 @@ static int mod_fcgid_modify_auth_header(void *vars,
     /* When the application gives a 200 response, the server ignores response
        headers whose names aren't prefixed with Variable- prefix, and ignores
        any response content */
-    if (ap_casecmpstrn(key, "Variable-", 9) == 0)
+    if (ap_cstr_casecmpn(key, "Variable-", 9) == 0)
         apr_table_setn(vars, key, val);
     return 1;
 }
@@ -808,7 +808,7 @@ static int fcgi_check_authn(request_rec *r)
 
     prov = dconf && dconf->name ? dconf->name : NULL;
 
-    if (!prov || !ap_casecmpstr(prov, "None")) {
+    if (!prov || !ap_cstr_casecmp(prov, "None")) {
         return DECLINED;
     }
 
@@ -823,7 +823,7 @@ static int fcgi_check_authn(request_rec *r)
                   dconf->user_expr ? "yes" : "no",
                   auth_type);
 
-    if (auth_type && !ap_casecmpstr(auth_type, "Basic")) {
+    if (auth_type && !ap_cstr_casecmp(auth_type, "Basic")) {
         if ((res = ap_get_basic_auth_pw(r, &password))) {
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                           APLOGNO(02517) "%s: couldn't retrieve basic auth "
index 6df17f2adb657efacf7859cb8f69bb84cd713a02..217c1d74b44ad4981132f1cd3e0fb44ef1e64fc7 100644 (file)
@@ -115,7 +115,7 @@ int cache_create_entity(cache_request_rec *cache, request_rec *r,
 
 static int filter_header_do(void *v, const char *key, const char *val)
 {
-    if ((*key == 'W' || *key == 'w') && !ap_casecmpstr(key, "Warning")
+    if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")
             && *val == '1') {
         /* any stored Warning headers with warn-code 1xx (see section
          * 14.46) MUST be deleted from the cache entry and the forwarded
@@ -129,7 +129,7 @@ static int filter_header_do(void *v, const char *key, const char *val)
 }
 static int remove_header_do(void *v, const char *key, const char *val)
 {
-    if ((*key == 'W' || *key == 'w') && !ap_casecmpstr(key, "Warning")) {
+    if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")) {
         /* any stored Warning headers with warn-code 2xx MUST be retained
          * in the cache entry and the forwarded response.
          */
index 6f6fbb43236ce026c7c8ef4e0c1940230aa31b39..c349d10e645cdd4b295db880f71114e725ad9c75 100644 (file)
@@ -55,7 +55,7 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
     }
     else {
         /* The URI scheme must be present and identical except for case. */
-        if (!url->scheme || ap_casecmpstr(filter->scheme, url->scheme)) {
+        if (!url->scheme || ap_cstr_casecmp(filter->scheme, url->scheme)) {
             return 0;
         }
 
@@ -999,7 +999,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
         char *header = apr_pstrdup(r->pool, pragma_header);
         const char *token = cache_strqtok(header, CACHE_SEPARATOR, &last);
         while (token) {
-            if (!ap_casecmpstr(token, "no-cache")) {
+            if (!ap_cstr_casecmp(token, "no-cache")) {
                 cc->no_cache = 1;
             }
             token = cache_strqtok(NULL, CACHE_SEPARATOR, &last);
@@ -1016,7 +1016,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
             switch (token[0]) {
             case 'n':
             case 'N': {
-                if (!ap_casecmpstrn(token, "no-cache", 8)) {
+                if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
                     if (token[8] == '=') {
                         cc->no_cache_header = 1;
                     }
@@ -1024,17 +1024,17 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
                         cc->no_cache = 1;
                     }
                 }
-                else if (!ap_casecmpstr(token, "no-store")) {
+                else if (!ap_cstr_casecmp(token, "no-store")) {
                     cc->no_store = 1;
                 }
-                else if (!ap_casecmpstr(token, "no-transform")) {
+                else if (!ap_cstr_casecmp(token, "no-transform")) {
                     cc->no_transform = 1;
                 }
                 break;
             }
             case 'm':
             case 'M': {
-                if (!ap_casecmpstrn(token, "max-age", 7)) {
+                if (!ap_cstr_casecmpn(token, "max-age", 7)) {
                     if (token[7] == '='
                             && !apr_strtoff(&offt, token + 8, &endp, 10)
                             && endp > token + 8 && !*endp) {
@@ -1042,10 +1042,10 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
                         cc->max_age_value = offt;
                     }
                 }
-                else if (!ap_casecmpstr(token, "must-revalidate")) {
+                else if (!ap_cstr_casecmp(token, "must-revalidate")) {
                     cc->must_revalidate = 1;
                 }
-                else if (!ap_casecmpstrn(token, "max-stale", 9)) {
+                else if (!ap_cstr_casecmpn(token, "max-stale", 9)) {
                     if (token[9] == '='
                             && !apr_strtoff(&offt, token + 10, &endp, 10)
                             && endp > token + 10 && !*endp) {
@@ -1057,7 +1057,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
                         cc->max_stale_value = -1;
                     }
                 }
-                else if (!ap_casecmpstrn(token, "min-fresh", 9)) {
+                else if (!ap_cstr_casecmpn(token, "min-fresh", 9)) {
                     if (token[9] == '='
                             && !apr_strtoff(&offt, token + 10, &endp, 10)
                             && endp > token + 10 && !*endp) {
@@ -1069,17 +1069,17 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
             }
             case 'o':
             case 'O': {
-                if (!ap_casecmpstr(token, "only-if-cached")) {
+                if (!ap_cstr_casecmp(token, "only-if-cached")) {
                     cc->only_if_cached = 1;
                 }
                 break;
             }
             case 'p':
             case 'P': {
-                if (!ap_casecmpstr(token, "public")) {
+                if (!ap_cstr_casecmp(token, "public")) {
                     cc->public = 1;
                 }
-                else if (!ap_casecmpstrn(token, "private", 7)) {
+                else if (!ap_cstr_casecmpn(token, "private", 7)) {
                     if (token[7] == '=') {
                         cc->private_header = 1;
                     }
@@ -1087,14 +1087,14 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
                         cc->private = 1;
                     }
                 }
-                else if (!ap_casecmpstr(token, "proxy-revalidate")) {
+                else if (!ap_cstr_casecmp(token, "proxy-revalidate")) {
                     cc->proxy_revalidate = 1;
                 }
                 break;
             }
             case 's':
             case 'S': {
-                if (!ap_casecmpstrn(token, "s-maxage", 8)) {
+                if (!ap_cstr_casecmpn(token, "s-maxage", 8)) {
                     if (token[8] == '='
                             && !apr_strtoff(&offt, token + 9, &endp, 10)
                             && endp > token + 9 && !*endp) {
@@ -1130,7 +1130,7 @@ static int cache_control_remove(request_rec *r, const char *cc_header,
             switch (token[0]) {
             case 'n':
             case 'N': {
-                if (!ap_casecmpstrn(token, "no-cache", 8)) {
+                if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
                     if (token[8] == '=') {
                         const char *header = cache_strqtok(token + 9,
                                 CACHE_SEPARATOR "\"", &slast);
@@ -1147,7 +1147,7 @@ static int cache_control_remove(request_rec *r, const char *cc_header,
             }
             case 'p':
             case 'P': {
-                if (!ap_casecmpstrn(token, "private", 7)) {
+                if (!ap_cstr_casecmpn(token, "private", 7)) {
                     if (token[7] == '=') {
                         const char *header = cache_strqtok(token + 8,
                                 CACHE_SEPARATOR "\"", &slast);
index 45c7a1aa7f87d4f5aa2ab8d5317681aff7f83610..d35c75ae0bdf697843f18f4a5fce34486b5a35dc 100644 (file)
@@ -669,7 +669,7 @@ DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth)
         return def_depth;
     }
 
-    if (ap_casecmpstr(depth, "infinity") == 0) {
+    if (ap_cstr_casecmp(depth, "infinity") == 0) {
         return DAV_INFINITY;
     }
     else if (strcmp(depth, "0") == 0) {
@@ -799,7 +799,7 @@ static int dav_parse_range(request_rec *r,
         return 0;
 
     range = apr_pstrdup(r->pool, range_c);
-    if (ap_casecmpstrn(range, "bytes ", 6) != 0
+    if (ap_cstr_casecmpn(range, "bytes ", 6) != 0
         || (dash = ap_strchr(range, '-')) == NULL
         || (slash = ap_strchr(range, '/')) == NULL) {
         /* malformed header */
@@ -2474,7 +2474,7 @@ static int process_mkcol_body(request_rec *r)
     r->remaining = 0;
 
     if (tenc) {
-        if (ap_casecmpstr(tenc, "chunked")) {
+        if (ap_cstr_casecmp(tenc, "chunked")) {
             /* Use this instead of Apache's default error string */
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00589)
                           "Unknown Transfer-Encoding %s", tenc);
index 5deac1446f51d75b6d8e2346f804fbf5bb023468..149629b3fad3789b4dc341c742398353a85b4588 100644 (file)
@@ -240,7 +240,7 @@ DAV_DECLARE(dav_lookup_result) dav_lookup_uri(const char *uri,
            request. the port must match our port.
         */
         port = r->connection->local_addr->port;
-        if (ap_casecmpstr(comp.scheme, scheme) != 0
+        if (ap_cstr_casecmp(comp.scheme, scheme) != 0
 #ifdef APACHE_PORT_HANDLING_IS_BUSTED
             || comp.port != port
 #endif
index 2b30050e7958c5f0b7650835ee86941f3d062d1f..c154c8ee4af695ddbdc35b9b4e77086b71c67c20 100644 (file)
@@ -790,7 +790,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
     if (!ctx->noop && ctx->xlate == NULL) {
         const char *mime_type = f->r->content_type;
 
-        if (mime_type && (ap_casecmpstrn(mime_type, "text/", 5) == 0 ||
+        if (mime_type && (ap_cstr_casecmpn(mime_type, "text/", 5) == 0 ||
 #if APR_CHARSET_EBCDIC
         /* On an EBCDIC machine, be willing to translate mod_autoindex-
          * generated output.  Otherwise, it doesn't look too cool.
@@ -806,7 +806,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
          */
             strcmp(mime_type, DIR_MAGIC_TYPE) == 0 ||
 #endif
-            ap_casecmpstrn(mime_type, "message/", 8) == 0 ||
+            ap_cstr_casecmpn(mime_type, "message/", 8) == 0 ||
             dc->force_xlate == FX_FORCE)) {
 
             rv = apr_xlate_open(&ctx->xlate,
index a8d501220355e9b9fa0c6a62dc6858ed514f4e9a..3ee78c7d0b08ead66add96d9d7fafcd2e9a2512e 100644 (file)
@@ -123,8 +123,8 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
     if (encoding && *encoding) {
 
         /* check the usual/simple case first */
-        if (!ap_casecmpstr(encoding, "gzip")
-            || !ap_casecmpstr(encoding, "x-gzip")) {
+        if (!ap_cstr_casecmp(encoding, "gzip")
+            || !ap_cstr_casecmp(encoding, "x-gzip")) {
             found = 1;
             if (hdrs) {
                 apr_table_unset(hdrs, "Content-Encoding");
@@ -142,8 +142,8 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
             for(;;) {
                 char *token = ap_strrchr(new_encoding, ',');
                 if (!token) {        /* gzip:identity or other:identity */
-                    if (!ap_casecmpstr(new_encoding, "gzip")
-                        || !ap_casecmpstr(new_encoding, "x-gzip")) {
+                    if (!ap_cstr_casecmp(new_encoding, "gzip")
+                        || !ap_cstr_casecmp(new_encoding, "x-gzip")) {
                         found = 1;
                         if (hdrs) {
                             apr_table_unset(hdrs, "Content-Encoding");
@@ -155,8 +155,8 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
                     break; /* seen all tokens */
                 }
                 for (ptr=token+1; apr_isspace(*ptr); ++ptr);
-                if (!ap_casecmpstr(ptr, "gzip")
-                    || !ap_casecmpstr(ptr, "x-gzip")) {
+                if (!ap_cstr_casecmp(ptr, "gzip")
+                    || !ap_cstr_casecmp(ptr, "x-gzip")) {
                     *token = '\0';
                     if (hdrs) {
                         apr_table_setn(hdrs, "Content-Encoding", new_encoding);
@@ -166,7 +166,7 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
                     }
                     found = 1;
                 }
-                else if (!ptr[0] || !ap_casecmpstr(ptr, "identity")) {
+                else if (!ptr[0] || !ap_cstr_casecmp(ptr, "identity")) {
                     *token = '\0';
                     continue; /* strip the token and find the next one */
                 }
@@ -744,7 +744,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             }
 
             token = ap_get_token(r->pool, &accepts, 0);
-            while (token && token[0] && ap_casecmpstr(token, "gzip")) {
+            while (token && token[0] && ap_cstr_casecmp(token, "gzip")) {
                 /* skip parameters, XXX: ;q=foo evaluation? */
                 while (*accepts == ';') {
                     ++accepts;
@@ -818,7 +818,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
          */
 
         /* If the entire Content-Encoding is "identity", we can replace it. */
-        if (!encoding || !ap_casecmpstr(encoding, "identity")) {
+        if (!encoding || !ap_cstr_casecmp(encoding, "identity")) {
             apr_table_setn(r->headers_out, "Content-Encoding", "gzip");
         }
         else {
index 6bd85e7fe0db45c2f5a1d0fe9ec8d2b6a9cf8735..975b94f6edddff7e9a003abba462903bbcf0344d 100644 (file)
@@ -1967,25 +1967,25 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                 token = apr_strtok(d, ", \t", &last);
 
                 while (token) {
-                    if (!ap_casecmpstr(token, "none")) {
+                    if (!ap_cstr_casecmp(token, "none")) {
                         /* do nothing */
                     }
-                    else if (!ap_casecmpstr(token, "url")) {
+                    else if (!ap_cstr_casecmp(token, "url")) {
                         char *buf = apr_pstrdup(ctx->pool, echo_text);
                         ap_unescape_url(buf);
                         echo_text = buf;
                     }
-                    else if (!ap_casecmpstr(token, "urlencoded")) {
+                    else if (!ap_cstr_casecmp(token, "urlencoded")) {
                         char *buf = apr_pstrdup(ctx->pool, echo_text);
                         ap_unescape_urlencoded(buf);
                         echo_text = buf;
                     }
-                    else if (!ap_casecmpstr(token, "entity")) {
+                    else if (!ap_cstr_casecmp(token, "entity")) {
                         char *buf = apr_pstrdup(ctx->pool, echo_text);
                         decodehtml(buf);
                         echo_text = buf;
                     }
-                    else if (!ap_casecmpstr(token, "base64")) {
+                    else if (!ap_cstr_casecmp(token, "base64")) {
                         echo_text = ap_pbase64decode(ctx->dpool, echo_text);
                     }
                     else {
@@ -2003,19 +2003,19 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                 token = apr_strtok(e, ", \t", &last);
 
                 while (token) {
-                    if (!ap_casecmpstr(token, "none")) {
+                    if (!ap_cstr_casecmp(token, "none")) {
                         /* do nothing */
                     }
-                    else if (!ap_casecmpstr(token, "url")) {
+                    else if (!ap_cstr_casecmp(token, "url")) {
                         echo_text = ap_escape_uri(ctx->dpool, echo_text);
                     }
-                    else if (!ap_casecmpstr(token, "urlencoded")) {
+                    else if (!ap_cstr_casecmp(token, "urlencoded")) {
                         echo_text = ap_escape_urlencoded(ctx->dpool, echo_text);
                     }
-                    else if (!ap_casecmpstr(token, "entity")) {
+                    else if (!ap_cstr_casecmp(token, "entity")) {
                         echo_text = ap_escape_html2(ctx->dpool, echo_text, 0);
                     }
-                    else if (!ap_casecmpstr(token, "base64")) {
+                    else if (!ap_cstr_casecmp(token, "base64")) {
                         char *buf;
                         buf = ap_pbase64encode(ctx->dpool, (char *)echo_text);
                         echo_text = buf;
@@ -2605,25 +2605,25 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                 token = apr_strtok(d, ", \t", &last);
 
                 while (token) {
-                    if (!ap_casecmpstr(token, "none")) {
+                    if (!ap_cstr_casecmp(token, "none")) {
                         /* do nothing */
                     }
-                    else if (!ap_casecmpstr(token, "url")) {
+                    else if (!ap_cstr_casecmp(token, "url")) {
                         char *buf = apr_pstrdup(ctx->pool, parsed_string);
                         ap_unescape_url(buf);
                         parsed_string = buf;
                     }
-                    else if (!ap_casecmpstr(token, "urlencoded")) {
+                    else if (!ap_cstr_casecmp(token, "urlencoded")) {
                         char *buf = apr_pstrdup(ctx->pool, parsed_string);
                         ap_unescape_urlencoded(buf);
                         parsed_string = buf;
                     }
-                    else if (!ap_casecmpstr(token, "entity")) {
+                    else if (!ap_cstr_casecmp(token, "entity")) {
                         char *buf = apr_pstrdup(ctx->pool, parsed_string);
                         decodehtml(buf);
                         parsed_string = buf;
                     }
-                    else if (!ap_casecmpstr(token, "base64")) {
+                    else if (!ap_cstr_casecmp(token, "base64")) {
                         parsed_string = ap_pbase64decode(ctx->dpool, parsed_string);
                     }
                     else {
@@ -2641,19 +2641,19 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                 token = apr_strtok(e, ", \t", &last);
 
                 while (token) {
-                    if (!ap_casecmpstr(token, "none")) {
+                    if (!ap_cstr_casecmp(token, "none")) {
                         /* do nothing */
                     }
-                    else if (!ap_casecmpstr(token, "url")) {
+                    else if (!ap_cstr_casecmp(token, "url")) {
                         parsed_string = ap_escape_uri(ctx->dpool, parsed_string);
                     }
-                    else if (!ap_casecmpstr(token, "urlencoded")) {
+                    else if (!ap_cstr_casecmp(token, "urlencoded")) {
                         parsed_string = ap_escape_urlencoded(ctx->dpool, parsed_string);
                     }
-                    else if (!ap_casecmpstr(token, "entity")) {
+                    else if (!ap_cstr_casecmp(token, "entity")) {
                         parsed_string = ap_escape_html2(ctx->dpool, parsed_string, 0);
                     }
-                    else if (!ap_casecmpstr(token, "base64")) {
+                    else if (!ap_cstr_casecmp(token, "base64")) {
                         char *buf;
                         buf = ap_pbase64encode(ctx->dpool, (char *)parsed_string);
                         parsed_string = buf;
index e949fe49aa73408c0aa112b4e7baf6f17fb1f43e..62f2bee2e3ee76b4fc06f1f2d03135d3ea190707 100644 (file)
@@ -295,8 +295,8 @@ static void pinternalSubset(void* ctxt, const xmlChar *name,
     }
     ap_fputstrs(ctx->f->next, ctx->bb, "<!DOCTYPE ", (const char *)name, NULL);
     if (externalID) {
-        if (!ap_casecmpstr((const char*)name, "html") &&
-            !ap_casecmpstrn((const char *)externalID, "-//W3C//DTD XHTML ", 18)) {
+        if (!ap_cstr_casecmp((const char*)name, "html") &&
+            !ap_cstr_casecmpn((const char *)externalID, "-//W3C//DTD XHTML ", 18)) {
             ctx->etag = xhtml_etag;
         }
         else {
@@ -690,7 +690,7 @@ static meta *metafix(request_rec *r, const char *buf)
         while (!apr_isalpha(*++p));
         for (q = p; apr_isalnum(*q) || (*q == '-'); ++q);
         header = apr_pstrndup(r->pool, p, q-p);
-        if (ap_casecmpstrn(header, "Content-", 8)) {
+        if (ap_cstr_casecmpn(header, "Content-", 8)) {
             /* find content=... string */
             p = apr_strmatch(seek_content, buf+offs+pmatch[0].rm_so,
                               pmatch[0].rm_eo - pmatch[0].rm_so);
@@ -718,7 +718,7 @@ static meta *metafix(request_rec *r, const char *buf)
                 }
             }
         }
-        else if (!ap_casecmpstrn(header, "Content-Type", 12)) {
+        else if (!ap_cstr_casecmpn(header, "Content-Type", 12)) {
             ret = apr_palloc(r->pool, sizeof(meta));
             ret->start = offs+pmatch[0].rm_so;
             ret->end = offs+pmatch[0].rm_eo;
@@ -842,8 +842,8 @@ static saxctxt *check_filter_init (ap_filter_t *f)
             else if (!f->r->content_type) {
                 errmsg = "No content-type; bailing out of proxy-html filter";
             }
-            else if (ap_casecmpstrn(f->r->content_type, "text/html", 9) &&
-                     ap_casecmpstrn(f->r->content_type,
+            else if (ap_cstr_casecmpn(f->r->content_type, "text/html", 9) &&
+                     ap_cstr_casecmpn(f->r->content_type,
                                  "application/xhtml+xml", 21)) {
                 errmsg = "Non-HTML content; not inserting proxy-html filter";
             }
index 67d7e5a576150238a51c7fadae3bcab587f88c29..11825cef6cde3ec060daa67cfc3f601098dc7e56 100644 (file)
@@ -1068,7 +1068,7 @@ static void emit_head(request_rec *r, char *header_fname, int suppress_amble,
                     emit_H1 = 1;
                 }
             }
-            else if (!ap_casecmpstrn("text/", rr->content_type, 5)) {
+            else if (!ap_cstr_casecmpn("text/", rr->content_type, 5)) {
                 /*
                  * If we can open the file, prefix it with the preamble
                  * regardless; since we'll be sending a <pre> block around
@@ -1163,7 +1163,7 @@ static void emit_tail(request_rec *r, char *readme_fname, int suppress_amble)
                     suppress_post = suppress_amble;
                 }
             }
-            else if (!ap_casecmpstrn("text/", rr->content_type, 5)) {
+            else if (!ap_cstr_casecmpn("text/", rr->content_type, 5)) {
                 /*
                  * If we can open the file, suppress the signature.
                  */
index 0e91ebf40c40fd526f9db24647dc38c51e880adc..09d29881268c63b39f02104cfc669d5a4e5a2c6d 100644 (file)
@@ -791,7 +791,7 @@ static int display_info(request_rec * r)
              "  <title>Server Information</title>\n" "</head>\n", r);
     ap_rputs("<body><h1 style=\"text-align: center\">"
              "Apache Server Information</h1>\n", r);
-    if (!r->args || ap_casecmpstr(r->args, "list")) {
+    if (!r->args || ap_cstr_casecmp(r->args, "list")) {
         if (!r->args) {
             ap_rputs("<dl><dt><tt>Subpages:<br />", r);
             ap_rputs("<a href=\"?config\">Configuration Files</a>, "
@@ -825,19 +825,19 @@ static int display_info(request_rec * r)
             ap_rputs("</tt></dt></dl><hr />", r);
         }
 
-        if (!r->args || !ap_casecmpstr(r->args, "server")) {
+        if (!r->args || !ap_cstr_casecmp(r->args, "server")) {
             show_server_settings(r);
         }
 
-        if (!r->args || !ap_casecmpstr(r->args, "hooks")) {
+        if (!r->args || !ap_cstr_casecmp(r->args, "hooks")) {
             show_active_hooks(r);
         }
 
-        if (!r->args || !ap_casecmpstr(r->args, "providers")) {
+        if (!r->args || !ap_cstr_casecmp(r->args, "providers")) {
             show_providers(r);
         }
 
-        if (r->args && 0 == ap_casecmpstr(r->args, "config")) {
+        if (r->args && 0 == ap_cstr_casecmp(r->args, "config")) {
             ap_rputs("<dl><dt><strong>Configuration:</strong>\n", r);
             mod_info_module_cmds(r, NULL, ap_conftree, 0, 0);
             ap_rputs("</dl><hr />", r);
@@ -848,7 +848,7 @@ static int display_info(request_rec * r)
                  modules = get_sorted_modules(r->pool);
             for (i = 0; i < modules->nelts; i++) {
                 modp = APR_ARRAY_IDX(modules, i, module *);
-                if (!r->args || !ap_casecmpstr(modp->name, r->args)) {
+                if (!r->args || !ap_cstr_casecmp(modp->name, r->args)) {
                     ap_rprintf(r,
                                "<dl><dt><a name=\"%s\"><strong>Module Name:</strong></a> "
                                "<font size=\"+1\"><tt><a href=\"?%s\">%s</a></tt></font></dt>\n",
@@ -946,7 +946,7 @@ static int display_info(request_rec * r)
                     }
                 }
             }
-            if (!modp && r->args && ap_casecmpstr(r->args, "server")) {
+            if (!modp && r->args && ap_cstr_casecmp(r->args, "server")) {
                 ap_rputs("<p><b>No such module</b></p>\n", r);
             }
         }
index 7078e308a7df6af7ceaa0d287be38f53f162c7d4..5ed90aaa9175cbe2050ceb7f2c2efd419a2259ac 100644 (file)
@@ -101,7 +101,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
     }
 
     range = apr_table_get(r->headers_in, "Range");
-    if (!range || ap_casecmpstrn(range, "bytes=", 6) || r->status != HTTP_OK) {
+    if (!range || ap_cstr_casecmpn(range, "bytes=", 6) || r->status != HTTP_OK) {
         return 0;
     }
 
@@ -112,7 +112,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
 
     /* is content already a multiple range? */
     if ((ct = apr_table_get(r->headers_out, "Content-Type"))
-        && ap_casecmpstrn(ct, "multipart/byteranges", 20) == 0) {
+        && ap_cstr_casecmpn(ct, "multipart/byteranges", 20) == 0) {
             return 0;
     }
 
index 18fc0f79296a773db1d4eed8b0f8a8fd0b2275d1..d5a8ed118fb8f746f9fe2b6293298164c2c5b5cb 100644 (file)
@@ -317,7 +317,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
         lenp = apr_table_get(f->r->headers_in, "Content-Length");
 
         if (tenc) {
-            if (ap_casecmpstr(tenc, "chunked") == 0 /* fast path */
+            if (ap_cstr_casecmp(tenc, "chunked") == 0 /* fast path */
                     || ap_find_last_token(f->r->pool, tenc, "chunked")) {
                 ctx->state = BODY_CHUNK;
             }
@@ -764,7 +764,7 @@ static int uniq_field_values(void *d, const char *key, const char *val)
          */
         for (i = 0, strpp = (char **) values->elts; i < values->nelts;
              ++i, ++strpp) {
-            if (*strpp && ap_casecmpstr(*strpp, start) == 0) {
+            if (*strpp && ap_cstr_casecmp(*strpp, start) == 0) {
                 break;
             }
         }
@@ -1306,7 +1306,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
 
         while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) {
             for (i = 0; i < r->content_languages->nelts; ++i) {
-                if (!ap_casecmpstr(token, languages[i]))
+                if (!ap_cstr_casecmp(token, languages[i]))
                     break;
             }
             if (i == r->content_languages->nelts) {
@@ -1543,7 +1543,7 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy)
     r->remaining = 0;
 
     if (tenc) {
-        if (ap_casecmpstr(tenc, "chunked")) {
+        if (ap_cstr_casecmp(tenc, "chunked")) {
             ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01592)
                           "Unknown Transfer-Encoding %s", tenc);
             return HTTP_NOT_IMPLEMENTED;
index 17321024e7f97ede1d792f634f41163e780f0e1f..db6e23cb46bbc21045ddbad1e99cea5975262105 100644 (file)
@@ -210,7 +210,7 @@ static void process_proxy_header(request_rec *r, const char *n, const char *v)
     int i;
     
     for (i = 0; transform_hdrs[i].name; ++i) {
-        if (!ap_casecmpstr(transform_hdrs[i].name, n)) {
+        if (!ap_cstr_casecmp(transform_hdrs[i].name, n)) {
             dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
             apr_table_add(r->headers_out, n,
                           (*transform_hdrs[i].func)(r, dconf, v));
index f8575fa7e10a4b31c5ac7fc295a6ad8adc7a7f2f..596b76dde11168d7b317ce944ed8635d9dfd0212 100644 (file)
@@ -1579,7 +1579,7 @@ void h2_push_policy_determine(struct h2_request *req, apr_pool_t *p, int push_en
 }
 
 /*******************************************************************************
- * ap_casecmpstr, when will it be backported?
+ * ap_cstr_casecmp, when will it be backported?
  ******************************************************************************/
 #if !APR_CHARSET_EBCDIC
 /*
index 61ffdbcbea6a7a4ceebe8e6c85602984b9cd95c3..3a3c5512851c8f2ca26a41fcaceb056a977dde13 100644 (file)
@@ -413,7 +413,7 @@ apr_status_t h2_append_brigade(apr_bucket_brigade *to,
  */
 apr_off_t h2_brigade_mem_size(apr_bucket_brigade *bb);
 
-/* when will ap_casecmpstr() be backported finally? */
+/* when will ap_cstr_casecmp() be backported finally? */
 int h2_casecmpstr(const char *s1, const char *s2);
 int h2_casecmpstrn(const char *s1, const char *s2, apr_size_t n);
 
index 4351bc507da9b3d64bca6a33b9107415da4df84f..6eb8448bbfff37324ca938a097697d39467f1656 100644 (file)
@@ -503,7 +503,7 @@ static APR_INLINE char *find_multiple_headers(apr_pool_t *pool,
     result_list = rp = NULL;
 
     do {
-        if (!ap_casecmpstr(t_elt->key, key)) {
+        if (!ap_cstr_casecmp(t_elt->key, key)) {
             if (!result_list) {
                 result_list = rp = apr_palloc(pool, sizeof(*rp));
             }
@@ -547,10 +547,10 @@ static const char *log_header_out(request_rec *r, char *a)
 {
     const char *cp = NULL;
 
-    if (!ap_casecmpstr(a, "Content-type") && r->content_type) {
+    if (!ap_cstr_casecmp(a, "Content-type") && r->content_type) {
         cp = ap_field_noparam(r->pool, r->content_type);
     }
-    else if (!ap_casecmpstr(a, "Set-Cookie")) {
+    else if (!ap_cstr_casecmp(a, "Set-Cookie")) {
         cp = find_multiple_headers(r->pool, r->headers_out, a);
     }
     else {
@@ -606,7 +606,7 @@ static const char *log_cookie(request_rec *r, char *a)
                     --last;
                 }
 
-                if (!ap_casecmpstr(name, a)) {
+                if (!ap_cstr_casecmp(name, a)) {
                     /* last1 points to the next char following the ';' delim,
                        or the trailing NUL char of the string */
                     last = last1 - (*last1 ? 2 : 1);
index aaa55ca3e8364777496ef99a709e85f8c091fe94..a360cb91eafef066806da7f5fc97358c87928bb2 100644 (file)
@@ -774,7 +774,7 @@ static enum header_state get_header_line(char *buffer, int len, apr_file_t *map)
     /* We need to shortcut the rest of this block following the Body:
      * tag - we will not look for continutation after this line.
      */
-    if (!ap_casecmpstrn(buffer, "Body:", 5))
+    if (!ap_cstr_casecmpn(buffer, "Body:", 5))
         return header_seen;
 
     while (apr_file_getc(&c, map) != APR_EOF) {
index 6ab530f07f232ce5fd539a800d9e7d8079312500..6bb842786d3419be2f563994510d7cfd63d6aa2a 100644 (file)
@@ -526,7 +526,7 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
     switch (*uri++) {
     case 'a':
     case 'A':
-        if (!ap_casecmpstrn(uri, "jp://", 5)) {        /* ajp://    */
+        if (!ap_cstr_casecmpn(uri, "jp://", 5)) {        /* ajp://    */
           *sqs = 1;
           return 6;
         }
@@ -534,7 +534,7 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'b':
     case 'B':
-        if (!ap_casecmpstrn(uri, "alancer://", 10)) {   /* balancer:// */
+        if (!ap_cstr_casecmpn(uri, "alancer://", 10)) {   /* balancer:// */
           *sqs = 1;
           return 11;
         }
@@ -542,10 +542,10 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'f':
     case 'F':
-        if (!ap_casecmpstrn(uri, "tp://", 5)) {        /* ftp://    */
+        if (!ap_cstr_casecmpn(uri, "tp://", 5)) {        /* ftp://    */
             return 6;
         }
-        if (!ap_casecmpstrn(uri, "cgi://", 6)) {       /* fcgi://   */
+        if (!ap_cstr_casecmpn(uri, "cgi://", 6)) {       /* fcgi://   */
             *sqs = 1;
             return 7;
         }
@@ -553,26 +553,26 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'g':
     case 'G':
-        if (!ap_casecmpstrn(uri, "opher://", 8)) {     /* gopher:// */
+        if (!ap_cstr_casecmpn(uri, "opher://", 8)) {     /* gopher:// */
             return 9;
         }
         break;
 
     case 'h':
     case 'H':
-        if (!ap_casecmpstrn(uri, "ttp://", 6)) {       /* http://   */
+        if (!ap_cstr_casecmpn(uri, "ttp://", 6)) {       /* http://   */
             *sqs = 1;
             return 7;
         }
-        else if (!ap_casecmpstrn(uri, "ttps://", 7)) { /* https://  */
+        else if (!ap_cstr_casecmpn(uri, "ttps://", 7)) { /* https://  */
             *sqs = 1;
             return 8;
         }
-        else if (!ap_casecmpstrn(uri, "2://", 4)) {    /* h2://     */
+        else if (!ap_cstr_casecmpn(uri, "2://", 4)) {    /* h2://     */
             *sqs = 1;
             return 5;
         }
-        else if (!ap_casecmpstrn(uri, "2c://", 5)) {   /* h2c://    */
+        else if (!ap_cstr_casecmpn(uri, "2c://", 5)) {   /* h2c://    */
             *sqs = 1;
             return 6;
         }
@@ -580,14 +580,14 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'l':
     case 'L':
-        if (!ap_casecmpstrn(uri, "dap://", 6)) {       /* ldap://   */
+        if (!ap_cstr_casecmpn(uri, "dap://", 6)) {       /* ldap://   */
             return 7;
         }
         break;
 
     case 'm':
     case 'M':
-        if (!ap_casecmpstrn(uri, "ailto:", 6)) {       /* mailto:   */
+        if (!ap_cstr_casecmpn(uri, "ailto:", 6)) {       /* mailto:   */
             *sqs = 1;
             return 7;
         }
@@ -595,17 +595,17 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'n':
     case 'N':
-        if (!ap_casecmpstrn(uri, "ews:", 4)) {         /* news:     */
+        if (!ap_cstr_casecmpn(uri, "ews:", 4)) {         /* news:     */
             return 5;
         }
-        else if (!ap_casecmpstrn(uri, "ntp://", 6)) {  /* nntp://   */
+        else if (!ap_cstr_casecmpn(uri, "ntp://", 6)) {  /* nntp://   */
             return 7;
         }
         break;
 
     case 's':
     case 'S':
-        if (!ap_casecmpstrn(uri, "cgi://", 6)) {       /* scgi://   */
+        if (!ap_cstr_casecmpn(uri, "cgi://", 6)) {       /* scgi://   */
             *sqs = 1;
             return 7;
         }
@@ -613,11 +613,11 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
 
     case 'w':
     case 'W':
-        if (!ap_casecmpstrn(uri, "s://", 4)) {        /* ws://     */
+        if (!ap_cstr_casecmpn(uri, "s://", 4)) {        /* ws://     */
             *sqs = 1;
             return 5;
         }
-        else if (!ap_casecmpstrn(uri, "ss://", 5)) {  /* wss://    */
+        else if (!ap_cstr_casecmpn(uri, "ss://", 5)) {  /* wss://    */
             *sqs = 1;
             return 6;
         }
@@ -725,7 +725,7 @@ static char *escape_absolute_uri(apr_pool_t *p, char *uri, unsigned scheme)
          *               [dn ["?" [attributes] ["?" [scope]
          *               ["?" [filter] ["?" extensions]]]]]]
          */
-        if (!ap_casecmpstrn(uri, "ldap", 4)) {
+        if (!ap_cstr_casecmpn(uri, "ldap", 4)) {
             char *token[5];
             int c = 0;
 
@@ -827,7 +827,7 @@ static void reduce_uri(request_rec *r)
     cp = (char *)ap_http_scheme(r);
     l  = strlen(cp);
     if (   strlen(r->filename) > l+3
-        && ap_casecmpstrn(r->filename, cp, l) == 0
+        && ap_cstr_casecmpn(r->filename, cp, l) == 0
         && r->filename[l]   == ':'
         && r->filename[l+1] == '/'
         && r->filename[l+2] == '/' ) {
@@ -2590,14 +2590,14 @@ static void add_cookie(request_rec *r, char *s)
                                  : NULL,
                                  expires ? (exp_time ? exp_time : "")
                                  : NULL,
-                                 (secure && (!ap_casecmpstr(secure, "true")
+                                 (secure && (!ap_cstr_casecmp(secure, "true")
                                              || !strcmp(secure, "1")
-                                             || !ap_casecmpstr(secure,
+                                             || !ap_cstr_casecmp(secure,
                                                             "secure"))) ?
                                   "; secure" : NULL,
-                                 (httponly && (!ap_casecmpstr(httponly, "true")
+                                 (httponly && (!ap_cstr_casecmp(httponly, "true")
                                                || !strcmp(httponly, "1")
-                                               || !ap_casecmpstr(httponly,
+                                               || !ap_cstr_casecmp(httponly,
                                                               "HttpOnly"))) ?
                                   "; HttpOnly" : NULL,
                                  NULL);
index b20d8f8d63c814df5e27bfc63b7b219346544c1e..b1e5bfbe507e6be6469f1dd22e651860372614c3 100644 (file)
@@ -152,7 +152,7 @@ static const char *vhost_alias_set(cmd_parms *cmd, void *dummy, const char *map)
     }
 
     if (!ap_os_is_path_absolute(cmd->pool, map)) {
-        if (ap_casecmpstr(map, "none")) {
+        if (ap_cstr_casecmp(map, "none")) {
             return "format string must be an absolute path, or 'none'";
         }
         *pmap = NULL;
index 8cdeb3e7b9092ae1ea1d0bba977c4a21a953aa93..3f36b2dba8a8e296f51e23c40e35a2346ed3a650 100644 (file)
@@ -240,7 +240,7 @@ static int scan_meta_file(request_rec *r, apr_file_t *f)
         while (apr_isspace(*l))
             ++l;
 
-        if (!ap_casecmpstr(w, "Content-type")) {
+        if (!ap_cstr_casecmp(w, "Content-type")) {
             char *tmp;
             /* Nuke trailing whitespace */
 
@@ -252,7 +252,7 @@ static int scan_meta_file(request_rec *r, apr_file_t *f)
             ap_content_type_tolower(tmp);
             ap_set_content_type(r, tmp);
         }
-        else if (!ap_casecmpstr(w, "Status")) {
+        else if (!ap_cstr_casecmp(w, "Status")) {
             sscanf(l, "%d", &r->status);
             r->status_line = apr_pstrdup(r->pool, l);
         }
index a21f71efd0e51d31f3abbbc5532cb1ec7e592364..3fd98042277a398f3bcc29b5e5690c1a0b5e422b 100644 (file)
@@ -789,14 +789,14 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
             }
             break;
         case hdr_set:
-            if (!ap_casecmpstr(hdr->header, "Content-Type")) {
+            if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
                  ap_set_content_type(r, process_tags(hdr, r));
             }
             apr_table_setn(headers, hdr->header, process_tags(hdr, r));
             break;
         case hdr_setifempty:
             if (NULL == apr_table_get(headers, hdr->header)) {
-                if (!ap_casecmpstr(hdr->header, "Content-Type")) {
+                if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
                     ap_set_content_type(r, process_tags(hdr, r));
                 }
                 apr_table_setn(headers, hdr->header, process_tags(hdr, r));
@@ -813,7 +813,7 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
             break;
         case hdr_edit:
         case hdr_edit_r:
-            if (!ap_casecmpstr(hdr->header, "Content-Type") && r->content_type) {
+            if (!ap_cstr_casecmp(hdr->header, "Content-Type") && r->content_type) {
                 const char *repl = process_regexp(hdr, r->content_type, r);
                 if (repl == NULL)
                     return 0;
index 153a03ee0c04ec5f1aae9cfb39dee39511b0f00e..4cfc65b9f945e4bcef78a1937e50d915ce3da9da 100644 (file)
@@ -632,15 +632,15 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
         }
 
         /* Set-Cookie need additional processing */
-        if (!ap_casecmpstr(stringname, "Set-Cookie")) {
+        if (!ap_cstr_casecmp(stringname, "Set-Cookie")) {
             value = ap_proxy_cookie_reverse_map(r, dconf, value);
         }
         /* Location, Content-Location, URI and Destination need additional
          * processing */
-        else if (!ap_casecmpstr(stringname, "Location")
-                 || !ap_casecmpstr(stringname, "Content-Location")
-                 || !ap_casecmpstr(stringname, "URI")
-                 || !ap_casecmpstr(stringname, "Destination"))
+        else if (!ap_cstr_casecmp(stringname, "Location")
+                 || !ap_cstr_casecmp(stringname, "Content-Location")
+                 || !ap_cstr_casecmp(stringname, "URI")
+                 || !ap_cstr_casecmp(stringname, "Destination"))
         {
           value = ap_proxy_location_reverse_map(r, dconf, value);
         }
@@ -653,7 +653,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
         apr_table_add(r->headers_out, stringname, value);
 
         /* Content-type needs an additional handling */
-        if (ap_casecmpstr(stringname, "Content-Type") == 0) {
+        if (ap_cstr_casecmp(stringname, "Content-Type") == 0) {
              /* add corresponding filter */
             ap_set_content_type(r, apr_pstrdup(r->pool, value));
             ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
index 7a3bad92666f231ecf0d3201ee46ac2825a4ce8e..b77216e1cf6a11cf94c60cae0101e9173672e51e 100644 (file)
@@ -569,7 +569,7 @@ static int proxy_detect(request_rec *r)
     if (conf->req && r->parsed_uri.scheme) {
         /* but it might be something vhosted */
         if (!(r->parsed_uri.hostname
-              && !ap_casecmpstr(r->parsed_uri.scheme, ap_http_scheme(r))
+              && !ap_cstr_casecmp(r->parsed_uri.scheme, ap_http_scheme(r))
               && ap_matches_request_vhost(r, r->parsed_uri.hostname,
                                           (apr_port_t)(r->parsed_uri.port_str ? r->parsed_uri.port
                                                        : ap_default_port(r))))) {
@@ -948,7 +948,7 @@ static int proxy_needsdomain(request_rec *r, const char *url, const char *domain
     /* If host does contain a dot already, or it is "localhost", decline */
     if (strchr(r->parsed_uri.hostname, '.') != NULL /* has domain, or IPv4 literal */
      || strchr(r->parsed_uri.hostname, ':') != NULL /* IPv6 literal */
-     || ap_casecmpstr(r->parsed_uri.hostname, "localhost") == 0)
+     || ap_cstr_casecmp(r->parsed_uri.hostname, "localhost") == 0)
         return DECLINED;    /* host name has a dot already */
 
     ref = apr_table_get(r->headers_in, "Referer");
@@ -1154,9 +1154,9 @@ static int proxy_handler(request_rec *r)
                 if (strcmp(ents[i].scheme, "*") == 0 ||
                     (ents[i].use_regex &&
                      ap_regexec(ents[i].regexp, url, 0, NULL, 0) == 0) ||
-                    (p2 == NULL && ap_casecmpstr(scheme, ents[i].scheme) == 0) ||
+                    (p2 == NULL && ap_cstr_casecmp(scheme, ents[i].scheme) == 0) ||
                     (p2 != NULL &&
-                    ap_casecmpstrn(url, ents[i].scheme,
+                    ap_cstr_casecmpn(url, ents[i].scheme,
                                 strlen(ents[i].scheme)) == 0)) {
 
                     /* handle the scheme */
@@ -1643,7 +1643,7 @@ PROXY_DECLARE(const char *) ap_proxy_de_socketfy(apr_pool_t *p, const char *url)
      * We could be passed a URL during the config stage that contains
      * the UDS path... ignore it
      */
-    if (!ap_casecmpstrn(url, "unix:", 5) &&
+    if (!ap_cstr_casecmpn(url, "unix:", 5) &&
         ((ptr = ap_strchr_c(url, '|')) != NULL)) {
         /* move past the 'unix:...|' UDS path info */
         const char *ret, *c;
index 04afec6c95840facea53c7a536d97d2fee94ce9b..42f6eb66905fd58c58fcc6eddde38d8285e7db4e 100644 (file)
@@ -35,7 +35,7 @@ static int proxy_ajp_canon(request_rec *r, char *url)
     apr_port_t port, def_port;
 
     /* ap_port_of_scheme() */
-    if (ap_casecmpstrn(url, "ajp:", 4) == 0) {
+    if (ap_cstr_casecmpn(url, "ajp:", 4) == 0) {
         url += 4;
     }
     else {
@@ -247,7 +247,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
     /* read the first bloc of data */
     input_brigade = apr_brigade_create(p, r->connection->bucket_alloc);
     tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
-    if (tenc && (ap_casecmpstr(tenc, "chunked") == 0)) {
+    if (tenc && (ap_cstr_casecmp(tenc, "chunked") == 0)) {
         /* The AJP protocol does not want body data yet */
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00870) "request is chunked");
     } else {
@@ -748,7 +748,7 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker,
     apr_pool_t *p = r->pool;
     apr_uri_t *uri;
 
-    if (ap_casecmpstrn(url, "ajp:", 4) != 0) {
+    if (ap_cstr_casecmpn(url, "ajp:", 4) != 0) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00894) "declining URL %s", url);
         return DECLINED;
     }
index 77cdced7b9907eac2860af990316b0e29bf7e858..cbd62aed4d3cd57658121e926e571b8bf5fd195e 100644 (file)
@@ -73,7 +73,7 @@ static int proxy_balancer_canon(request_rec *r, char *url)
     apr_port_t port = 0;
 
     /* TODO: offset of BALANCER_PREFIX ?? */
-    if (ap_casecmpstrn(url, "balancer:", 9) == 0) {
+    if (ap_cstr_casecmpn(url, "balancer:", 9) == 0) {
         url += 9;
     }
     else {
@@ -1154,7 +1154,7 @@ static int balancer_handler(request_rec *r)
         if ((val = apr_table_get(params, "w_hm"))) {
             proxy_hcmethods_t *method = proxy_hcmethods;
             for (; method->name; method++) {
-                if (!ap_casecmpstr(method->name, val) && method->implemented)
+                if (!ap_cstr_casecmp(method->name, val) && method->implemented)
                     wsel->s->method = method->method;
             }
         }
@@ -1430,7 +1430,7 @@ static int balancer_handler(request_rec *r)
                 ap_rprintf(r, "          <httpd:lbset>%d</httpd:lbset>\n",
                            worker->s->lbset);
                 /* End proxy_worker_stat */
-                if (!ap_casecmpstr(worker->s->scheme, "ajp")) {
+                if (!ap_cstr_casecmp(worker->s->scheme, "ajp")) {
                     ap_rputs("          <httpd:flushpackets>", r);
                     switch (worker->s->flush_packets) {
                         case flush_off:
index 864762e08a96500cb1c877bb21d44cdfbee7f551..e95ed3e630dabbadee3a6649541ae5496b57a0f8 100644 (file)
@@ -39,7 +39,7 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
     fcgi_req_config_t *rconf = NULL;
     const char *pathinfo_type = NULL;
 
-    if (ap_casecmpstrn(url, "fcgi:", 5) == 0) {
+    if (ap_cstr_casecmpn(url, "fcgi:", 5) == 0) {
         url += 5;
     }
     else {
@@ -888,7 +888,7 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
                   "url: %s proxyname: %s proxyport: %d",
                   url, proxyname, proxyport);
 
-    if (ap_casecmpstrn(url, "fcgi:", 5) != 0) {
+    if (ap_cstr_casecmpn(url, "fcgi:", 5) != 0) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01077) "declining URL %s", url);
         return DECLINED;
     }
index 01462f101f9b08a35b5af32387657e42c9256f21..8f9893d78c50fcc4a1d3cf0649414b9ee03a3098 100644 (file)
@@ -32,7 +32,7 @@ static int proxy_fdpass_canon(request_rec *r, char *url)
 {
     const char *path;
 
-    if (ap_casecmpstrn(url, "fd://", 5) == 0) {
+    if (ap_cstr_casecmpn(url, "fd://", 5) == 0) {
         url += 5;
     }
     else {
@@ -129,7 +129,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
     apr_socket_t *sock;
     apr_socket_t *clientsock;
 
-    if (ap_casecmpstrn(url, "fd://", 5) == 0) {
+    if (ap_cstr_casecmpn(url, "fd://", 5) == 0) {
         url += 5;
     }
     else {
index de7bcbb6629a3ac7b3aeadd5ddea85dc69ca0ba7..38d93f3861388ccfc4e8fcaa2ffe5dfda6dc3f83 100644 (file)
@@ -294,7 +294,7 @@ static int proxy_ftp_canon(request_rec *r, char *url)
     apr_port_t port, def_port;
 
     /* */
-    if (ap_casecmpstrn(url, "ftp:", 4) == 0) {
+    if (ap_cstr_casecmpn(url, "ftp:", 4) == 0) {
         url += 4;
     }
     else {
@@ -494,7 +494,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
         path = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITSITEPART | APR_URI_UNP_OMITQUERY);
 
         /* If path began with /%2f, change the basedir */
-        if (ap_casecmpstrn(path, "/%2f", 4) == 0) {
+        if (ap_cstr_casecmpn(path, "/%2f", 4) == 0) {
             basedir = "/%2f";
         }
 
@@ -1011,7 +1011,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                       proxyhost);
         return DECLINED;        /* proxy connections are via HTTP */
     }
-    if (ap_casecmpstrn(url, "ftp:", 4)) {
+    if (ap_cstr_casecmpn(url, "ftp:", 4)) {
         ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
                       "declining URL %s - not ftp:", url);
         return DECLINED;        /* only interested in FTP */
@@ -1082,7 +1082,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
      * still smaller that the URL is logged regularly.
      */
     if ((password = apr_table_get(r->headers_in, "Authorization")) != NULL
-        && ap_casecmpstr(ap_getword(r->pool, &password, ' '), "Basic") == 0
+        && ap_cstr_casecmp(ap_getword(r->pool, &password, ' '), "Basic") == 0
         && (password = ap_pbase64decode(r->pool, password))[0] != ':') {
         /* Check the decoded string for special characters. */
         if (!ftp_check_string(password)) {
@@ -1328,7 +1328,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
     /* Special handling for leading "%2f": this enforces a "cwd /"
      * out of the $HOME directory which was the starting point after login
      */
-    if (ap_casecmpstrn(path, "%2f", 3) == 0) {
+    if (ap_cstr_casecmpn(path, "%2f", 3) == 0) {
         path += 3;
         while (*path == '/') /* skip leading '/' (after root %2f) */
             ++path;
index c8f1a7b17c10d261c511d298205e5f58d2e39e3c..d1f395368fb35935fddbb27dc842d0ecaafb51a4 100644 (file)
@@ -113,7 +113,7 @@ static const char *set_worker_hc_param(apr_pool_t *p,
         hc_template_t *template;
         template = (hc_template_t *)ctx->templates->elts;
         for (ival = 0; ival < ctx->templates->nelts; ival++, template++) {
-            if (!ap_casecmpstr(template->name, val)) {
+            if (!ap_cstr_casecmp(template->name, val)) {
                 if (worker) {
                     worker->s->method = template->method;
                     worker->s->interval = template->interval;
@@ -137,7 +137,7 @@ static const char *set_worker_hc_param(apr_pool_t *p,
     else if (!strcasecmp(key, "hcmethod")) {
         proxy_hcmethods_t *method = proxy_hcmethods;
         for (; method->name; method++) {
-            if (!ap_casecmpstr(val, method->name)) {
+            if (!ap_cstr_casecmp(val, method->name)) {
                 if (!method->implemented) {
                     return apr_psprintf(p, "Health check method %s not (yet) implemented",
                                         val);
@@ -1095,7 +1095,7 @@ static const char *hc_expr_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
 {
     char *var = (char *)data;
 
-    if (var && *var && ctx->r && ap_casecmpstr(var, "BODY") == 0) {
+    if (var && *var && ctx->r && ap_cstr_casecmp(var, "BODY") == 0) {
         return hc_get_body(ctx->r);
     }
     return NULL;
@@ -1106,7 +1106,7 @@ static const char *hc_expr_func_fn(ap_expr_eval_ctx_t *ctx, const void *data,
 {
     char *var = (char *)arg;
 
-    if (var && *var && ctx->r && ap_casecmpstr(var, "BODY") == 0) {
+    if (var && *var && ctx->r && ap_cstr_casecmp(var, "BODY") == 0) {
         return hc_get_body(ctx->r);
     }
     return NULL;
index e21d7e26c4348a05468bb6343e5e128a3a39c9f9..ccaa0e634fcd1bcf373603d2353749255363f74f 100644 (file)
@@ -43,11 +43,11 @@ static int proxy_http_canon(request_rec *r, char *url)
     apr_port_t port, def_port;
 
     /* ap_port_of_scheme() */
-    if (ap_casecmpstrn(url, "http:", 5) == 0) {
+    if (ap_cstr_casecmpn(url, "http:", 5) == 0) {
         url += 5;
         scheme = "http";
     }
-    else if (ap_casecmpstrn(url, "https:", 6) == 0) {
+    else if (ap_cstr_casecmpn(url, "https:", 6) == 0) {
         url += 6;
         scheme = "https";
     }
@@ -743,7 +743,7 @@ static int ap_proxy_http_prefetch(apr_pool_t *p, request_rec *r,
      * encoding has been done by the extensions' handler, and
      * do not modify add_te_chunked's logic
      */
-    if (*old_te_val && ap_casecmpstr(*old_te_val, "chunked") != 0) {
+    if (*old_te_val && ap_cstr_casecmp(*old_te_val, "chunked") != 0) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01093)
                       "%s Transfer-Encoding is not supported", *old_te_val);
         return HTTP_INTERNAL_SERVER_ERROR;
@@ -1064,14 +1064,14 @@ static void process_proxy_header(request_rec *r, proxy_dir_conf *c,
     };
     int i;
     for (i = 0; date_hdrs[i]; ++i) {
-        if (!ap_casecmpstr(date_hdrs[i], key)) {
+        if (!ap_cstr_casecmp(date_hdrs[i], key)) {
             apr_table_add(r->headers_out, key,
                           date_canon(r->pool, value));
             return;
         }
     }
     for (i = 0; transform_hdrs[i].name; ++i) {
-        if (!ap_casecmpstr(transform_hdrs[i].name, key)) {
+        if (!ap_cstr_casecmp(transform_hdrs[i].name, key)) {
             apr_table_add(r->headers_out, key,
                           (*transform_hdrs[i].func)(r, c, value));
             return;
index 983f9ba28e91255e482a512f9ac68df13ba8ffcc..a276fe63b71dee3d081dcb633c13d13269c0a61f 100644 (file)
@@ -180,7 +180,7 @@ static int scgi_canon(request_rec *r, char *url)
     const char *err, *path;
     apr_port_t port, def_port;
 
-    if (ap_casecmpstrn(url, SCHEME "://", sizeof(SCHEME) + 2)) {
+    if (ap_cstr_casecmpn(url, SCHEME "://", sizeof(SCHEME) + 2)) {
         return DECLINED;
     }
     url += sizeof(SCHEME); /* Keep slashes */
@@ -434,7 +434,7 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn)
         if (location && *location == '/') {
             scgi_request_config *req_conf = apr_palloc(r->pool,
                                                        sizeof(*req_conf));
-            if (ap_casecmpstr(location_header, "Location")) {
+            if (ap_cstr_casecmp(location_header, "Location")) {
                 if (err) {
                     apr_table_unset(r->err_headers_out, location_header);
                 }
@@ -533,7 +533,7 @@ static int scgi_handler(request_rec *r, proxy_worker *worker,
     apr_uri_t *uri;
     char dummy;
 
-    if (ap_casecmpstrn(url, SCHEME "://", sizeof(SCHEME) + 2)) {
+    if (ap_cstr_casecmpn(url, SCHEME "://", sizeof(SCHEME) + 2)) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00865)
                       "declining URL %s", url);
         return DECLINED;
index 2c1ccc8cd3ccef1f5ba0a016957899dd06614b96..9adad20c80f85bc4b1a613f0c6f39ed1f3ea20c7 100644 (file)
@@ -231,12 +231,12 @@ static int proxy_wstunnel_canon(request_rec *r, char *url)
     apr_port_t port, def_port;
 
     /* ap_port_of_scheme() */
-    if (ap_casecmpstrn(url, "ws:", 3) == 0) {
+    if (ap_cstr_casecmpn(url, "ws:", 3) == 0) {
         url += 3;
         scheme = "ws:";
         def_port = apr_uri_port_of_scheme("http");
     }
-    else if (ap_casecmpstrn(url, "wss:", 4) == 0) {
+    else if (ap_cstr_casecmpn(url, "wss:", 4) == 0) {
         url += 4;
         scheme = "wss:";
         def_port = apr_uri_port_of_scheme("https");
@@ -452,11 +452,11 @@ static int proxy_wstunnel_handler(request_rec *r, proxy_worker *worker,
     apr_uri_t *uri;
     int is_ssl = 0;
 
-    if (ap_casecmpstrn(url, "wss:", 4) == 0) {
+    if (ap_cstr_casecmpn(url, "wss:", 4) == 0) {
         scheme = "WSS";
         is_ssl = 1;
     }
-    else if (ap_casecmpstrn(url, "ws:", 3) == 0) {
+    else if (ap_cstr_casecmpn(url, "ws:", 3) == 0) {
         scheme = "WS";
     }
     else {
@@ -465,7 +465,7 @@ static int proxy_wstunnel_handler(request_rec *r, proxy_worker *worker,
     }
 
     upgrade = apr_table_get(r->headers_in, "Upgrade");
-    if (!upgrade || ap_casecmpstr(upgrade, "WebSocket") != 0) {
+    if (!upgrade || ap_cstr_casecmp(upgrade, "WebSocket") != 0) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02900)
                       "declining URL %s  (not WebSocket)", url);
         return DECLINED;
index 47cde1584bc7ba7174b7d157d5ff9221fa1ca8a3..01dad7a834b825e6dd2f6e6bff74ca4b1e3af2b2 100644 (file)
@@ -151,40 +151,40 @@ static int copy_headers_in(void *vbaton, const char *key, const char *value)
     switch (key[0]) {
     case 'a':
     case 'A':
-        if (ap_casecmpstr("Accept-Encoding", key) == 0) {
+        if (ap_cstr_casecmp("Accept-Encoding", key) == 0) {
             return 0;
         }
         break;
     case 'c':
     case 'C':
-        if (ap_casecmpstr("Connection", key) == 0) {
+        if (ap_cstr_casecmp("Connection", key) == 0) {
             return 0;
         }
         break;
     case 'h':
     case 'H':
-        if (ap_casecmpstr("Host", key) == 0) {
+        if (ap_cstr_casecmp("Host", key) == 0) {
             return 0;
         }
         break;
     case 'k':
     case 'K':
-        if (ap_casecmpstr("Keep-Alive", key) == 0) {
+        if (ap_cstr_casecmp("Keep-Alive", key) == 0) {
             return 0;
         }
         break;
     case 't':
     case 'T':
-        if (ap_casecmpstr("TE", key) == 0) {
+        if (ap_cstr_casecmp("TE", key) == 0) {
             return 0;
         }
-        if (ap_casecmpstr("Trailer", key) == 0) {
+        if (ap_cstr_casecmp("Trailer", key) == 0) {
             return 0;
         }
         break;
     case 'u':
     case 'U':
-        if (ap_casecmpstr("Upgrade", key) == 0) {
+        if (ap_cstr_casecmp("Upgrade", key) == 0) {
             return 0;
         }
         break;
@@ -205,27 +205,27 @@ static int copy_headers_out(void *vbaton, const char *key, const char *value)
     switch (key[0]) {
     case 'c':
     case 'C':
-        if (ap_casecmpstr("Content-Type", key) == 0) {
+        if (ap_cstr_casecmp("Content-Type", key) == 0) {
             ap_set_content_type(ctx->r, value);
             done = 1;
             break;
         }
-        else if (ap_casecmpstr("Connection", key) == 0) {
+        else if (ap_cstr_casecmp("Connection", key) == 0) {
             done = 1;
             break;
         }
-        else if (ap_casecmpstr("Content-Encoding", key) == 0) {
+        else if (ap_cstr_casecmp("Content-Encoding", key) == 0) {
             done = 1;
             break;
         }
-        else if (ap_casecmpstr("Content-Length", key) == 0) {
+        else if (ap_cstr_casecmp("Content-Length", key) == 0) {
             done = 1;
             break;
         }
         break;
     case 't':
     case 'T':
-        if (ap_casecmpstr("Transfer-Encoding", key) == 0) {
+        if (ap_cstr_casecmp("Transfer-Encoding", key) == 0) {
             done = 1;
             break;
         }
@@ -512,7 +512,7 @@ static int drive_serf(request_rec *r, serf_config_t *conf)
     baton->done_headers = 0;
     baton->keep_reading = 1;
 
-    if (ap_casecmpstr(conf->url.scheme, "https") == 0) {
+    if (ap_cstr_casecmp(conf->url.scheme, "https") == 0) {
         baton->want_ssl = 1;
     }
     else {
index 80ccd087a101d8ba4bd24bf2238453a6596ddf21..ef9d93fb90d8744d77829555c28982ac343e7fdf 100644 (file)
@@ -1056,7 +1056,7 @@ PROXY_DECLARE(int) ap_proxy_valid_balancer_name(char *name, int i)
 {
     if (!i)
         i = sizeof(BALANCER_PREFIX)-1;
-    return (!ap_casecmpstrn(name, BALANCER_PREFIX, i));
+    return (!ap_cstr_casecmpn(name, BALANCER_PREFIX, i));
 }
 
 
@@ -1659,7 +1659,7 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p,
     if (ptr) {
         *ptr = '\0';
         rv = apr_uri_parse(p, url, &urisock);
-        if (rv == APR_SUCCESS && !ap_casecmpstr(urisock.scheme, "unix")) {
+        if (rv == APR_SUCCESS && !ap_cstr_casecmp(urisock.scheme, "unix")) {
             sockpath = ap_runtime_dir_relative(p, urisock.path);;
             url = ptr+1;    /* so we get the scheme for the uds */
         }
@@ -3356,7 +3356,7 @@ static int ap_proxy_clear_connection(request_rec *r, apr_table_t *headers)
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02807)
                           "Removing header '%s' listed in Connection header",
                           name);
-            if (!ap_casecmpstr(name, "close")) {
+            if (!ap_cstr_casecmp(name, "close")) {
                 closed = 1;
             }
             apr_table_unset(headers, name);
@@ -3516,7 +3516,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
 
         /* Add the Expect header if not already there. */
         if (((val = apr_table_get(r->headers_in, "Expect")) == NULL)
-                || (ap_casecmpstr(val, "100-Continue") != 0 /* fast path */
+                || (ap_cstr_casecmp(val, "100-Continue") != 0 /* fast path */
                     && !ap_find_token(r->pool, val, "100-Continue"))) {
             apr_table_mergen(r->headers_in, "Expect", "100-Continue");
         }
@@ -3581,15 +3581,15 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
             || headers_in[counter].val == NULL
 
             /* Already sent */
-            || !ap_casecmpstr(headers_in[counter].key, "Host")
+            || !ap_cstr_casecmp(headers_in[counter].key, "Host")
 
             /* Clear out hop-by-hop request headers not to send
              * RFC2616 13.5.1 says we should strip these headers
              */
-            || !ap_casecmpstr(headers_in[counter].key, "Keep-Alive")
-            || !ap_casecmpstr(headers_in[counter].key, "TE")
-            || !ap_casecmpstr(headers_in[counter].key, "Trailer")
-            || !ap_casecmpstr(headers_in[counter].key, "Upgrade")
+            || !ap_cstr_casecmp(headers_in[counter].key, "Keep-Alive")
+            || !ap_cstr_casecmp(headers_in[counter].key, "TE")
+            || !ap_cstr_casecmp(headers_in[counter].key, "Trailer")
+            || !ap_cstr_casecmp(headers_in[counter].key, "Upgrade")
 
             ) {
             continue;
@@ -3599,7 +3599,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
          * If we have used it then MAYBE: RFC2616 says we MAY propagate it.
          * So let's make it configurable by env.
          */
-        if (!ap_casecmpstr(headers_in[counter].key,"Proxy-Authorization")) {
+        if (!ap_cstr_casecmp(headers_in[counter].key,"Proxy-Authorization")) {
             if (r->user != NULL) { /* we've authenticated */
                 if (!apr_table_get(r->subprocess_env, "Proxy-Chain-Auth")) {
                     continue;
@@ -3609,22 +3609,22 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
 
         /* Skip Transfer-Encoding and Content-Length for now.
          */
-        if (!ap_casecmpstr(headers_in[counter].key, "Transfer-Encoding")) {
+        if (!ap_cstr_casecmp(headers_in[counter].key, "Transfer-Encoding")) {
             *old_te_val = headers_in[counter].val;
             continue;
         }
-        if (!ap_casecmpstr(headers_in[counter].key, "Content-Length")) {
+        if (!ap_cstr_casecmp(headers_in[counter].key, "Content-Length")) {
             *old_cl_val = headers_in[counter].val;
             continue;
         }
 
         /* for sub-requests, ignore freshness/expiry headers */
         if (r->main) {
-            if (   !ap_casecmpstr(headers_in[counter].key, "If-Match")
-                || !ap_casecmpstr(headers_in[counter].key, "If-Modified-Since")
-                || !ap_casecmpstr(headers_in[counter].key, "If-Range")
-                || !ap_casecmpstr(headers_in[counter].key, "If-Unmodified-Since")
-                || !ap_casecmpstr(headers_in[counter].key, "If-None-Match")) {
+            if (   !ap_cstr_casecmp(headers_in[counter].key, "If-Match")
+                || !ap_cstr_casecmp(headers_in[counter].key, "If-Modified-Since")
+                || !ap_cstr_casecmp(headers_in[counter].key, "If-Range")
+                || !ap_cstr_casecmp(headers_in[counter].key, "If-Unmodified-Since")
+                || !ap_cstr_casecmp(headers_in[counter].key, "If-None-Match")) {
                 continue;
             }
         }
@@ -3711,7 +3711,7 @@ PROXY_DECLARE(apr_port_t) ap_proxy_port_of_scheme(const char *scheme)
         } else {
             proxy_schemes_t *pscheme;
             for (pscheme = pschemes; pscheme->name != NULL; ++pscheme) {
-                if (ap_casecmpstr(scheme, pscheme->name) == 0) {
+                if (ap_cstr_casecmp(scheme, pscheme->name) == 0) {
                     return pscheme->default_port;
                 }
             }
index 3600600a68dcca108a4415a2173bc9e0ac0d36c2..0a8315f45c6bd0dde7f08c9105b46df3ab8cae9c 100644 (file)
@@ -86,7 +86,7 @@ static apr_uri_t *determine_responder_uri(SSLSrvConfigRec *sc, X509 *cert,
         return NULL;
     }
 
-    if (ap_casecmpstr(u->scheme, "http") != 0) {
+    if (ap_cstr_casecmp(u->scheme, "http") != 0) {
         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(01920)
                       "cannot handle OCSP responder URI '%s'", s);
         return NULL;
index 775f9372314b50a870530b198515c304b01cf4b5..22184793e17dc59b0615f8458f242a28a6170399 100644 (file)
@@ -536,7 +536,7 @@ static apr_status_t policy_nocache_out_filter(ap_filter_t *f,
             char *header = apr_pstrdup(r->pool, pragma_header);
             const char *token = apr_strtok(header, ", ", &last);
             while (token) {
-                if (!ap_casecmpstr(token, "no-cache")) {
+                if (!ap_cstr_casecmp(token, "no-cache")) {
                     fail = 1;
                 }
                 token = apr_strtok(NULL, ", ", &last);
@@ -550,7 +550,7 @@ static apr_status_t policy_nocache_out_filter(ap_filter_t *f,
                 switch (token[0]) {
                 case 'n':
                 case 'N': {
-                    if (!ap_casecmpstrn(token, "no-cache", 8)) {
+                    if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
                         if (token[8] == '=') {
                         }
                         else if (!token[8]) {
@@ -558,14 +558,14 @@ static apr_status_t policy_nocache_out_filter(ap_filter_t *f,
                         }
                         break;
                     }
-                    else if (!ap_casecmpstr(token, "no-store")) {
+                    else if (!ap_cstr_casecmp(token, "no-store")) {
                         fail = 1;
                     }
                     break;
                 }
                 case 'p':
                 case 'P': {
-                    if (!ap_casecmpstrn(token, "private", 7)) {
+                    if (!ap_cstr_casecmpn(token, "private", 7)) {
                         if (token[7] == '=') {
                         }
                         else if (!token[7]) {
@@ -636,7 +636,7 @@ static apr_status_t policy_maxage_out_filter(ap_filter_t *f,
                 switch (token[0]) {
                 case 'm':
                 case 'M': {
-                    if (!ap_casecmpstrn(token, "max-age", 7)) {
+                    if (!ap_cstr_casecmpn(token, "max-age", 7)) {
                         if (token[7] == '=') {
                             max_age = 1;
                             max_age_value = apr_atoi64(token + 8);
@@ -647,7 +647,7 @@ static apr_status_t policy_maxage_out_filter(ap_filter_t *f,
                 }
                 case 's':
                 case 'S': {
-                    if (!ap_casecmpstrn(token, "s-maxage", 8)) {
+                    if (!ap_cstr_casecmpn(token, "s-maxage", 8)) {
                         if (token[8] == '=') {
                             s_maxage = 1;
                             s_maxage_value = apr_atoi64(token + 9);
index ac81e94c4f20f463288eb029e3227df3f9942b72..741bc00fd5a132046031ab0573fa199474fefc76 100644 (file)
@@ -1030,11 +1030,11 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
          */
         w = ap_getword_conf(parms->temp_pool, &args);
 
-        if (*w == '\0' || (ap_casecmpstr(w, "on") && ap_casecmpstr(w, "off")))
+        if (*w == '\0' || (ap_cstr_casecmp(w, "on") && ap_cstr_casecmp(w, "off")))
             return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
                                NULL);
 
-        return cmd->AP_FLAG(parms, mconfig, ap_casecmpstr(w, "off") != 0);
+        return cmd->AP_FLAG(parms, mconfig, ap_cstr_casecmp(w, "off") != 0);
 
     default:
         return apr_pstrcat(parms->pool, cmd->name,
@@ -1047,7 +1047,7 @@ AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name,
                                                      const command_rec *cmds)
 {
     while (cmds->name) {
-        if (!ap_casecmpstr(name, cmds->name))
+        if (!ap_cstr_casecmp(name, cmds->name))
             return cmds;
 
         ++cmds;
@@ -1212,7 +1212,7 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
 
             *bracket = '\0';
 
-            if (ap_casecmpstr(cmd_name + 2,
+            if (ap_cstr_casecmp(cmd_name + 2,
                               (*curr_parent)->directive + 1) != 0) {
                 parms->err_directive = newdir;
                 return apr_pstrcat(p, "Expected </",
@@ -1259,7 +1259,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)
-            && (ap_casecmpstr(vb.buf + 2, bracket) == 0)
+            && (ap_cstr_casecmp(vb.buf + 2, bracket) == 0)
             && (*curr_parent == NULL)) {
             break;
         }
@@ -1636,7 +1636,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 (ap_casecmpstr(cmd_name + 2, directive + 1) != 0) {
+                if (ap_cstr_casecmp(cmd_name + 2, directive + 1) != 0) {
                     return apr_pstrcat(cmd->pool, "Expected </",
                                        directive + 1, "> but saw ",
                                        cmd_name, ">", NULL);
@@ -2629,7 +2629,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 (ap_casecmpstr(current->directive, directive) == 0)
+        if (ap_cstr_casecmp(current->directive, directive) == 0)
             count++;
         current = current->next;
     }
index 257f114fb2debae2078fe1700e2fd8d6655697c1..92118a59f81cc245e2f0f1f1e1e5df44ae509ccd 100644 (file)
@@ -1258,7 +1258,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 (ap_casecmpstr(dirp->directive, what) == 0)
+        if (ap_cstr_casecmp(dirp->directive, what) == 0)
             return dirp;
     }
 
@@ -1461,7 +1461,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 && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) {
+    if (cmd->parent && ap_cstr_casecmp(cmd->parent->directive, "<VirtualHost")) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ",
                                       cmd->parent->directive, " context", NULL);
     }
@@ -1492,7 +1492,7 @@ static const char *unset_define(cmd_parms *cmd, void *dummy,
 {
     int i;
     char **defines;
-    if (cmd->parent && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) {
+    if (cmd->parent && ap_cstr_casecmp(cmd->parent->directive, "<VirtualHost")) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ",
                                       cmd->parent->directive, " context", NULL);
     }
@@ -1586,10 +1586,10 @@ static const char *set_add_default_charset(cmd_parms *cmd,
 {
     core_dir_config *d = d_;
 
-    if (!ap_casecmpstr(arg, "Off")) {
+    if (!ap_cstr_casecmp(arg, "Off")) {
        d->add_default_charset = ADD_DEFAULT_CHARSET_OFF;
     }
-    else if (!ap_casecmpstr(arg, "On")) {
+    else if (!ap_cstr_casecmp(arg, "On")) {
        d->add_default_charset = ADD_DEFAULT_CHARSET_ON;
        d->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
     }
@@ -1705,7 +1705,7 @@ static const char *set_error_document(cmd_parms *cmd, void *conf_,
             conf->response_code_exprs = apr_hash_make(cmd->pool);
         }
 
-        if (ap_casecmpstr(msg, "default") == 0) {
+        if (ap_cstr_casecmp(msg, "default") == 0) {
             /* special case: ErrorDocument 404 default restores the
              * canned server error response
              */
@@ -1761,36 +1761,36 @@ static const char *set_allow_opts(cmd_parms *cmd, allow_options_t *opts,
             first = 0;
         }
 
-        if (!ap_casecmpstr(w, "Indexes")) {
+        if (!ap_cstr_casecmp(w, "Indexes")) {
             opt = OPT_INDEXES;
         }
-        else if (!ap_casecmpstr(w, "Includes")) {
+        else if (!ap_cstr_casecmp(w, "Includes")) {
             /* If Includes is permitted, both Includes and
              * IncludesNOEXEC may be changed. */
             opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC);
         }
-        else if (!ap_casecmpstr(w, "IncludesNOEXEC")) {
+        else if (!ap_cstr_casecmp(w, "IncludesNOEXEC")) {
             opt = OPT_INCLUDES;
         }
-        else if (!ap_casecmpstr(w, "FollowSymLinks")) {
+        else if (!ap_cstr_casecmp(w, "FollowSymLinks")) {
             opt = OPT_SYM_LINKS;
         }
-        else if (!ap_casecmpstr(w, "SymLinksIfOwnerMatch")) {
+        else if (!ap_cstr_casecmp(w, "SymLinksIfOwnerMatch")) {
             opt = OPT_SYM_OWNER;
         }
-        else if (!ap_casecmpstr(w, "ExecCGI")) {
+        else if (!ap_cstr_casecmp(w, "ExecCGI")) {
             opt = OPT_EXECCGI;
         }
-        else if (!ap_casecmpstr(w, "MultiViews")) {
+        else if (!ap_cstr_casecmp(w, "MultiViews")) {
             opt = OPT_MULTI;
         }
-        else if (!ap_casecmpstr(w, "RunScripts")) { /* AI backcompat. Yuck */
+        else if (!ap_cstr_casecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
             opt = OPT_MULTI|OPT_EXECCGI;
         }
-        else if (!ap_casecmpstr(w, "None")) {
+        else if (!ap_cstr_casecmp(w, "None")) {
             opt = OPT_NONE;
         }
-        else if (!ap_casecmpstr(w, "All")) {
+        else if (!ap_cstr_casecmp(w, "All")) {
             opt = OPT_ALL;
         }
         else {
@@ -1831,40 +1831,40 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
                 *v++ = '\0';
         }
 
-        if (!ap_casecmpstr(w, "Limit")) {
+        if (!ap_cstr_casecmp(w, "Limit")) {
             d->override |= OR_LIMIT;
         }
-        else if (!ap_casecmpstr(k, "Options")) {
+        else if (!ap_cstr_casecmp(k, "Options")) {
             d->override |= OR_OPTIONS;
             if (v)
                 set_allow_opts(cmd, &(d->override_opts), v);
             else
                 d->override_opts = OPT_ALL;
         }
-        else if (!ap_casecmpstr(w, "FileInfo")) {
+        else if (!ap_cstr_casecmp(w, "FileInfo")) {
             d->override |= OR_FILEINFO;
         }
-        else if (!ap_casecmpstr(w, "AuthConfig")) {
+        else if (!ap_cstr_casecmp(w, "AuthConfig")) {
             d->override |= OR_AUTHCFG;
         }
-        else if (!ap_casecmpstr(w, "Indexes")) {
+        else if (!ap_cstr_casecmp(w, "Indexes")) {
             d->override |= OR_INDEXES;
         }
-        else if (!ap_casecmpstr(w, "Nonfatal")) {
-            if (!ap_casecmpstr(v, "Override")) {
+        else if (!ap_cstr_casecmp(w, "Nonfatal")) {
+            if (!ap_cstr_casecmp(v, "Override")) {
                 d->override |= NONFATAL_OVERRIDE;
             }
-            else if (!ap_casecmpstr(v, "Unknown")) {
+            else if (!ap_cstr_casecmp(v, "Unknown")) {
                 d->override |= NONFATAL_UNKNOWN;
             }
-            else if (!ap_casecmpstr(v, "All")) {
+            else if (!ap_cstr_casecmp(v, "All")) {
                 d->override |= NONFATAL_ALL;
             }
         }
-        else if (!ap_casecmpstr(w, "None")) {
+        else if (!ap_cstr_casecmp(w, "None")) {
             d->override = OR_NONE;
         }
-        else if (!ap_casecmpstr(w, "All")) {
+        else if (!ap_cstr_casecmp(w, "All")) {
             d->override = OR_ALL;
         }
         else {
@@ -1938,7 +1938,7 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c
     d->override_list = apr_table_make(cmd->pool, argc);
 
     for (i = 0; i < argc; i++) {
-        if (!ap_casecmpstr(argv[i], "None")) {
+        if (!ap_cstr_casecmp(argv[i], "None")) {
             if (argc != 1) {
                 return "'None' not allowed with other directives in "
                        "AllowOverrideList";
@@ -2002,31 +2002,31 @@ static const char *set_options(cmd_parms *cmd, void *d_, const char *l)
             return "Either all Options must start with + or -, or no Option may.";
         }
 
-        if (!ap_casecmpstr(w, "Indexes")) {
+        if (!ap_cstr_casecmp(w, "Indexes")) {
             opt = OPT_INDEXES;
         }
-        else if (!ap_casecmpstr(w, "Includes")) {
+        else if (!ap_cstr_casecmp(w, "Includes")) {
             opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC);
         }
-        else if (!ap_casecmpstr(w, "IncludesNOEXEC")) {
+        else if (!ap_cstr_casecmp(w, "IncludesNOEXEC")) {
             opt = OPT_INCLUDES;
         }
-        else if (!ap_casecmpstr(w, "FollowSymLinks")) {
+        else if (!ap_cstr_casecmp(w, "FollowSymLinks")) {
             opt = OPT_SYM_LINKS;
         }
-        else if (!ap_casecmpstr(w, "SymLinksIfOwnerMatch")) {
+        else if (!ap_cstr_casecmp(w, "SymLinksIfOwnerMatch")) {
             opt = OPT_SYM_OWNER;
         }
-        else if (!ap_casecmpstr(w, "ExecCGI")) {
+        else if (!ap_cstr_casecmp(w, "ExecCGI")) {
             opt = OPT_EXECCGI;
         }
-        else if (!ap_casecmpstr(w, "MultiViews")) {
+        else if (!ap_cstr_casecmp(w, "MultiViews")) {
             opt = OPT_MULTI;
         }
-        else if (!ap_casecmpstr(w, "RunScripts")) { /* AI backcompat. Yuck */
+        else if (!ap_cstr_casecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
             opt = OPT_MULTI|OPT_EXECCGI;
         }
-        else if (!ap_casecmpstr(w, "None")) {
+        else if (!ap_cstr_casecmp(w, "None")) {
             if (!first) {
                 return "'Options None' must be the first Option given.";
             }
@@ -2036,7 +2036,7 @@ static const char *set_options(cmd_parms *cmd, void *d_, const char *l)
             opt = OPT_NONE;
             all_none = 1;
         }
-        else if (!ap_casecmpstr(w, "All")) {
+        else if (!ap_cstr_casecmp(w, "All")) {
             if (!first) {
                 return "'Options All' must be the first option given.";
             }
@@ -2077,7 +2077,7 @@ static const char *set_options(cmd_parms *cmd, void *d_, const char *l)
 static const char *set_default_type(cmd_parms *cmd, void *d_,
                                    const char *arg)
 {
-    if (ap_casecmpstr(arg, "off") != 0 && ap_casecmpstr(arg, "none") != 0) {
+    if (ap_cstr_casecmp(arg, "off") != 0 && ap_cstr_casecmp(arg, "none") != 0) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00117)
               "Ignoring deprecated use of DefaultType in line %d of %s.",
                      cmd->directive->line_num, cmd->directive->filename);
@@ -2147,7 +2147,7 @@ static const char *set_etag_bits(cmd_parms *cmd, void *mconfig,
             }
         }
 
-        if (ap_casecmpstr(token, "None") == 0) {
+        if (ap_cstr_casecmp(token, "None") == 0) {
             if (action != '*') {
                 valid = 0;
             }
@@ -2156,7 +2156,7 @@ static const char *set_etag_bits(cmd_parms *cmd, void *mconfig,
                 explicit = 1;
             }
         }
-        else if (ap_casecmpstr(token, "All") == 0) {
+        else if (ap_cstr_casecmp(token, "All") == 0) {
             if (action != '*') {
                 valid = 0;
             }
@@ -2165,15 +2165,15 @@ static const char *set_etag_bits(cmd_parms *cmd, void *mconfig,
                 cfg->etag_bits = bit = ETAG_ALL;
             }
         }
-        else if (ap_casecmpstr(token, "Size") == 0) {
+        else if (ap_cstr_casecmp(token, "Size") == 0) {
             bit = ETAG_SIZE;
         }
-        else if ((ap_casecmpstr(token, "LMTime") == 0)
-                 || (ap_casecmpstr(token, "MTime") == 0)
-                 || (ap_casecmpstr(token, "LastModified") == 0)) {
+        else if ((ap_cstr_casecmp(token, "LMTime") == 0)
+                 || (ap_cstr_casecmp(token, "MTime") == 0)
+                 || (ap_cstr_casecmp(token, "LastModified") == 0)) {
             bit = ETAG_MTIME;
         }
-        else if (ap_casecmpstr(token, "INode") == 0) {
+        else if (ap_cstr_casecmp(token, "INode") == 0) {
             bit = ETAG_INODE;
         }
         else {
@@ -2240,10 +2240,10 @@ static const char *set_enable_mmap(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         d->enable_mmap = ENABLE_MMAP_ON;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         d->enable_mmap = ENABLE_MMAP_OFF;
     }
     else {
@@ -2258,10 +2258,10 @@ static const char *set_enable_sendfile(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         d->enable_sendfile = ENABLE_SENDFILE_ON;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         d->enable_sendfile = ENABLE_SENDFILE_OFF;
     }
     else {
@@ -3052,13 +3052,13 @@ static const char *set_signature_flag(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "On") == 0) {
+    if (ap_cstr_casecmp(arg, "On") == 0) {
         d->server_signature = srv_sig_on;
     }
-    else if (ap_casecmpstr(arg, "Off") == 0) {
+    else if (ap_cstr_casecmp(arg, "Off") == 0) {
         d->server_signature = srv_sig_off;
     }
-    else if (ap_casecmpstr(arg, "EMail") == 0) {
+    else if (ap_cstr_casecmp(arg, "EMail") == 0) {
         d->server_signature = srv_sig_withmail;
     }
     else {
@@ -3120,13 +3120,13 @@ static const char *set_allow2f(cmd_parms *cmd, void *d_, const char *arg)
 {
     core_dir_config *d = d_;
 
-    if (0 == ap_casecmpstr(arg, "on")) {
+    if (0 == ap_cstr_casecmp(arg, "on")) {
         d->allow_encoded_slashes = 1;
         d->decode_encoded_slashes = 1; /* for compatibility with 2.0 & 2.2 */
-    } else if (0 == ap_casecmpstr(arg, "off")) {
+    } else if (0 == ap_cstr_casecmp(arg, "off")) {
         d->allow_encoded_slashes = 0;
         d->decode_encoded_slashes = 0;
-    } else if (0 == ap_casecmpstr(arg, "nodecode")) {
+    } else if (0 == ap_cstr_casecmp(arg, "nodecode")) {
         d->allow_encoded_slashes = 1;
         d->decode_encoded_slashes = 0;
     } else {
@@ -3146,13 +3146,13 @@ static const char *set_hostname_lookups(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (!ap_casecmpstr(arg, "on")) {
+    if (!ap_cstr_casecmp(arg, "on")) {
         d->hostname_lookups = HOSTNAME_LOOKUP_ON;
     }
-    else if (!ap_casecmpstr(arg, "off")) {
+    else if (!ap_cstr_casecmp(arg, "off")) {
         d->hostname_lookups = HOSTNAME_LOOKUP_OFF;
     }
-    else if (!ap_casecmpstr(arg, "double")) {
+    else if (!ap_cstr_casecmp(arg, "double")) {
         d->hostname_lookups = HOSTNAME_LOOKUP_DOUBLE;
     }
     else {
@@ -3188,13 +3188,13 @@ static const char *set_accept_path_info(cmd_parms *cmd, void *d_, const char *ar
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         d->accept_path_info = AP_REQ_ACCEPT_PATH_INFO;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         d->accept_path_info = AP_REQ_REJECT_PATH_INFO;
     }
-    else if (ap_casecmpstr(arg, "default") == 0) {
+    else if (ap_cstr_casecmp(arg, "default") == 0) {
         d->accept_path_info = AP_REQ_DEFAULT_PATH_INFO;
     }
     else {
@@ -3209,13 +3209,13 @@ static const char *set_use_canonical_name(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         d->use_canonical_name = USE_CANONICAL_NAME_ON;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         d->use_canonical_name = USE_CANONICAL_NAME_OFF;
     }
-    else if (ap_casecmpstr(arg, "dns") == 0) {
+    else if (ap_cstr_casecmp(arg, "dns") == 0) {
         d->use_canonical_name = USE_CANONICAL_NAME_DNS;
     }
     else {
@@ -3230,10 +3230,10 @@ static const char *set_use_canonical_phys_port(cmd_parms *cmd, void *d_,
 {
     core_dir_config *d = d_;
 
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_ON;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_OFF;
     }
     else {
@@ -3547,22 +3547,22 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
         return err;
     }
 
-    if (!ap_casecmpstr(arg, "OS")) {
+    if (!ap_cstr_casecmp(arg, "OS")) {
         ap_server_tokens = SrvTk_OS;
     }
-    else if (!ap_casecmpstr(arg, "Min") || !ap_casecmpstr(arg, "Minimal")) {
+    else if (!ap_cstr_casecmp(arg, "Min") || !ap_cstr_casecmp(arg, "Minimal")) {
         ap_server_tokens = SrvTk_MINIMAL;
     }
-    else if (!ap_casecmpstr(arg, "Major")) {
+    else if (!ap_cstr_casecmp(arg, "Major")) {
         ap_server_tokens = SrvTk_MAJOR;
     }
-    else if (!ap_casecmpstr(arg, "Minor") ) {
+    else if (!ap_cstr_casecmp(arg, "Minor") ) {
         ap_server_tokens = SrvTk_MINOR;
     }
-    else if (!ap_casecmpstr(arg, "Prod") || !ap_casecmpstr(arg, "ProductOnly")) {
+    else if (!ap_cstr_casecmp(arg, "Prod") || !ap_cstr_casecmp(arg, "ProductOnly")) {
         ap_server_tokens = SrvTk_PRODUCT_ONLY;
     }
-    else if (!ap_casecmpstr(arg, "Full")) {
+    else if (!ap_cstr_casecmp(arg, "Full")) {
         ap_server_tokens = SrvTk_FULL;
     }
     else {
@@ -3667,13 +3667,13 @@ static const char *set_max_ranges(cmd_parms *cmd, void *conf_, const char *arg)
     core_dir_config *conf = conf_;
     int val = 0;
 
-    if (!ap_casecmpstr(arg, "none")) {
+    if (!ap_cstr_casecmp(arg, "none")) {
         val = AP_MAXRANGES_NORANGES;
     }
-    else if (!ap_casecmpstr(arg, "default")) {
+    else if (!ap_cstr_casecmp(arg, "default")) {
         val = AP_MAXRANGES_DEFAULT;
     }
-    else if (!ap_casecmpstr(arg, "unlimited")) {
+    else if (!ap_cstr_casecmp(arg, "unlimited")) {
         val = AP_MAXRANGES_UNLIMITED;
     }
     else {
@@ -3693,13 +3693,13 @@ static const char *set_max_overlaps(cmd_parms *cmd, void *conf_, const char *arg
     core_dir_config *conf = conf_;
     int val = 0;
 
-    if (!ap_casecmpstr(arg, "none")) {
+    if (!ap_cstr_casecmp(arg, "none")) {
         val = AP_MAXRANGES_NORANGES;
     }
-    else if (!ap_casecmpstr(arg, "default")) {
+    else if (!ap_cstr_casecmp(arg, "default")) {
         val = AP_MAXRANGES_DEFAULT;
     }
-    else if (!ap_casecmpstr(arg, "unlimited")) {
+    else if (!ap_cstr_casecmp(arg, "unlimited")) {
         val = AP_MAXRANGES_UNLIMITED;
     }
     else {
@@ -3719,13 +3719,13 @@ static const char *set_max_reversals(cmd_parms *cmd, void *conf_, const char *ar
     core_dir_config *conf = conf_;
     int val = 0;
 
-    if (!ap_casecmpstr(arg, "none")) {
+    if (!ap_cstr_casecmp(arg, "none")) {
         val = AP_MAXRANGES_NORANGES;
     }
-    else if (!ap_casecmpstr(arg, "default")) {
+    else if (!ap_cstr_casecmp(arg, "default")) {
         val = AP_MAXRANGES_DEFAULT;
     }
-    else if (!ap_casecmpstr(arg, "unlimited")) {
+    else if (!ap_cstr_casecmp(arg, "unlimited")) {
         val = AP_MAXRANGES_UNLIMITED;
     }
     else {
@@ -3931,13 +3931,13 @@ static const char *set_trace_enable(cmd_parms *cmd, void *dummy,
     core_server_config *conf =
         ap_get_core_module_config(cmd->server->module_config);
 
-    if (ap_casecmpstr(arg1, "on") == 0) {
+    if (ap_cstr_casecmp(arg1, "on") == 0) {
         conf->trace_enable = AP_TRACE_ENABLE;
     }
-    else if (ap_casecmpstr(arg1, "off") == 0) {
+    else if (ap_cstr_casecmp(arg1, "off") == 0) {
         conf->trace_enable = AP_TRACE_DISABLE;
     }
-    else if (ap_casecmpstr(arg1, "extended") == 0) {
+    else if (ap_cstr_casecmp(arg1, "extended") == 0) {
         conf->trace_enable = AP_TRACE_EXTENDED;
     }
     else {
@@ -3976,10 +3976,10 @@ static const char *set_protocols_honor_order(cmd_parms *cmd, void *dummy,
         return err;
     }
     
-    if (ap_casecmpstr(arg, "on") == 0) {
+    if (ap_cstr_casecmp(arg, "on") == 0) {
         conf->protocols_honor_order = 1;
     }
-    else if (ap_casecmpstr(arg, "off") == 0) {
+    else if (ap_cstr_casecmp(arg, "off") == 0) {
         conf->protocols_honor_order = 0;
     }
     else {
@@ -4036,13 +4036,13 @@ static const char *set_async_filter(cmd_parms *cmd, void *dummy,
         return err;
     }
 
-    if (ap_casecmpstr(arg, "network") == 0) {
+    if (ap_cstr_casecmp(arg, "network") == 0) {
         conf->async_filter = AP_FTYPE_NETWORK;
     }
-    else if (ap_casecmpstr(arg, "connection") == 0) {
+    else if (ap_cstr_casecmp(arg, "connection") == 0) {
         conf->async_filter = AP_FTYPE_CONNECTION;
     }
-    else if (ap_casecmpstr(arg, "request") == 0) {
+    else if (ap_cstr_casecmp(arg, "request") == 0) {
         conf->async_filter = 0;
     }
     else {
@@ -4346,7 +4346,7 @@ static const char *set_errorlog_format(cmd_parms *cmd, void *dummy,
         conf->error_log_format = parse_errorlog_string(cmd->pool, arg1,
                                                        &err_string, 1);
     }
-    else if (!ap_casecmpstr(arg1, "connection")) {
+    else if (!ap_cstr_casecmp(arg1, "connection")) {
         if (!conf->error_log_conn) {
             conf->error_log_conn = apr_array_make(cmd->pool, 5,
                                                   sizeof(apr_array_header_t *));
@@ -4358,7 +4358,7 @@ static const char *set_errorlog_format(cmd_parms *cmd, void *dummy,
             *e = parse_errorlog_string(cmd->pool, arg2, &err_string, 0);
         }
     }
-    else if (!ap_casecmpstr(arg1, "request")) {
+    else if (!ap_cstr_casecmp(arg1, "request")) {
         if (!conf->error_log_req) {
             conf->error_log_req = apr_array_make(cmd->pool, 5,
                                                  sizeof(apr_array_header_t *));
index b5f48742333ea176be52f7c14618ab43629d3896..db3b610702f98b0b4bdaf1a93ef9f004dc630b60 100644 (file)
@@ -627,7 +627,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
      * expensive to do correctly (performing a complete SSL handshake)
      * or cause log spam by doing incorrectly (simply sending EOF). */
     lp = ap_listeners;
-    while (lp && lp->protocol && ap_casecmpstr(lp->protocol, "http") != 0) {
+    while (lp && lp->protocol && ap_cstr_casecmp(lp->protocol, "http") != 0) {
         lp = lp->next;
     }
     if (!lp) {
@@ -675,7 +675,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
         return rv;
     }
 
-    if (lp->protocol && ap_casecmpstr(lp->protocol, "https") == 0) {
+    if (lp->protocol && ap_cstr_casecmp(lp->protocol, "https") == 0) {
         /* Send a TLS 1.0 close_notify alert.  This is perhaps the
          * "least wrong" way to open and cleanly terminate an SSL
          * connection.  It should "work" without noisy error logs if
index 1f6d6bb997d46407ae3376b982e322d628bf9729..bb524c4a3ccfab0f42402fb5cbf7e72544bb19c9 100644 (file)
@@ -527,7 +527,7 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
     if (status == APR_SUCCESS) {
         /* if it has a scheme we may need to do absoluteURI vhost stuff */
         if (r->parsed_uri.scheme
-            && !ap_casecmpstr(r->parsed_uri.scheme, ap_http_scheme(r))) {
+            && !ap_cstr_casecmp(r->parsed_uri.scheme, ap_http_scheme(r))) {
             r->hostname = r->parsed_uri.hostname;
         }
         else if (r->method_number == M_CONNECT) {
@@ -696,7 +696,7 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
             }
         }
         if (3 == sscanf(r->protocol, "%4s/%u.%u", http, &major, &minor)
-            && (ap_casecmpstr("http", http) == 0)
+            && (ap_cstr_casecmp("http", http) == 0)
             && (minor < HTTP_VERSION(1, 0)) ) { /* don't allow HTTP/0.1000 */
             r->proto_num = HTTP_VERSION(major, minor);
         }
@@ -1146,7 +1146,7 @@ request_rec *ap_read_request(conn_rec *conn)
              * the final encoding ...; the server MUST respond with the 400
              * (Bad Request) status code and then close the connection".
              */
-            if (!(ap_casecmpstr(tenc, "chunked") == 0 /* fast path */
+            if (!(ap_cstr_casecmp(tenc, "chunked") == 0 /* fast path */
                     || ap_find_last_token(r->pool, tenc, "chunked"))) {
                 ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02539)
                               "client sent unknown Transfer-Encoding "
@@ -1251,7 +1251,7 @@ request_rec *ap_read_request(conn_rec *conn)
          * unfortunately, to signal a poor man's mandatory extension that
          * the server must understand or return 417 Expectation Failed.
          */
-        if (ap_casecmpstr(expect, "100-continue") == 0) {
+        if (ap_cstr_casecmp(expect, "100-continue") == 0) {
             r->expecting_100 = 1;
         }
         else {
@@ -1427,7 +1427,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
 {
     const char *t, *auth_line;
 
-    if (!(t = ap_auth_type(r)) || ap_casecmpstr(t, "Basic"))
+    if (!(t = ap_auth_type(r)) || ap_cstr_casecmp(t, "Basic"))
         return DECLINED;
 
     if (!ap_auth_name(r)) {
@@ -1445,7 +1445,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
         return HTTP_UNAUTHORIZED;
     }
 
-    if (ap_casecmpstr(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
+    if (ap_cstr_casecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
         /* Client tried to authenticate using wrong auth scheme */
         ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00573)
                       "client used wrong authentication scheme: %s", r->uri);
index 8820bfa9fb7dcd37b99405e5958800ccddd2c743..a80c0ecfaba1d7569497f1b159dcbc24b0e26727 100644 (file)
@@ -935,7 +935,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
 
     if (finfo.filetype != APR_REG &&
 #if defined(WIN32) || defined(OS2) || defined(NETWARE)
-        ap_casecmpstr(apr_filepath_name_get(name), "nul") != 0) {
+        ap_cstr_casecmp(apr_filepath_name_get(name), "nul") != 0) {
 #else
         strcmp(name, "/dev/null") != 0) {
 #endif /* WIN32 || OS2 */
@@ -1663,7 +1663,7 @@ AP_DECLARE(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok)
         while (*s && !TEST_CHAR(*s, T_HTTP_TOKEN_STOP)) {
             ++s;
         }
-        if (!ap_casecmpstrn((const char *)start_token, (const char *)tok,
+        if (!ap_cstr_casecmpn((const char *)start_token, (const char *)tok,
                          s - start_token)) {
             return 1;
         }
@@ -1690,7 +1690,7 @@ AP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line,
         (lidx > 0 && !(apr_isspace(line[lidx - 1]) || line[lidx - 1] == ',')))
         return 0;
 
-    return (ap_casecmpstrn(&line[lidx], tok, tlen) == 0);
+    return (ap_cstr_casecmpn(&line[lidx], tok, tlen) == 0);
 }
 
 AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *str)
@@ -2657,7 +2657,7 @@ AP_DECLARE(int) ap_parse_form_data(request_rec *r, ap_filter_t *f,
 
     /* sanity check - we only support forms for now */
     ct = apr_table_get(r->headers_in, "Content-Type");
-    if (!ct || ap_casecmpstrn("application/x-www-form-urlencoded", ct, 33)) {
+    if (!ct || ap_cstr_casecmpn("application/x-www-form-urlencoded", ct, 33)) {
         return ap_discard_request_body(r);
     }
 
@@ -3316,7 +3316,7 @@ static const short ucharmap[] = {
 };
 #endif
 
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2)
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2)
 {
     const unsigned char *str1 = (const unsigned char *)s1;
     const unsigned char *str2 = (const unsigned char *)s2;
@@ -3333,7 +3333,7 @@ AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2)
     }
 }
 
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2, apr_size_t n)
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
 {
     const unsigned char *str1 = (const unsigned char *)s1;
     const unsigned char *str2 = (const unsigned char *)s2;
index 38f5df9d4b69339d4e8575fa4b4ae12dccc6b3d8..7d2f2669ac2d257dfb139a77087e3dcdce5806ff 100644 (file)
@@ -1834,7 +1834,7 @@ static int core_expr_lookup(ap_expr_lookup_parms *parms)
             while (prov->func) {
                 const char **name = prov->names;
                 while (*name) {
-                    if (ap_casecmpstr(*name, parms->name) == 0) {
+                    if (ap_cstr_casecmp(*name, parms->name) == 0) {
                         *parms->func = prov->func;
                         *parms->data = name;
                         return OK;
@@ -1867,7 +1867,7 @@ static int core_expr_lookup(ap_expr_lookup_parms *parms)
                 if (parms->type == AP_EXPR_FUNC_OP_UNARY)
                     match = !strcmp(prov->name, parms->name);
                 else
-                    match = !ap_casecmpstr(prov->name, parms->name);
+                    match = !ap_cstr_casecmp(prov->name, parms->name);
                 if (match) {
                     if ((parms->flags & AP_EXPR_FLAG_RESTRICTED)
                         && prov->restricted) {
index ff692b95d9e15ffe89753cdca289021040cec8c6..c9201b49cf9e3056182fb26939d342a04253d391 100644 (file)
@@ -180,10 +180,10 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
          * for no particular reason.
          */
 
-        if (!ap_casecmpstr(hdrs[i].key, "Content-type")) {
+        if (!ap_cstr_casecmp(hdrs[i].key, "Content-type")) {
             apr_table_addn(e, "CONTENT_TYPE", hdrs[i].val);
         }
-        else if (!ap_casecmpstr(hdrs[i].key, "Content-length")) {
+        else if (!ap_cstr_casecmp(hdrs[i].key, "Content-length")) {
             apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
         }
         /*
@@ -192,8 +192,8 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
          * in the environment with "ps -e".  But, if you must...
          */
 #ifndef SECURITY_HOLE_PASS_AUTHORIZATION
-        else if (!ap_casecmpstr(hdrs[i].key, "Authorization")
-                 || !ap_casecmpstr(hdrs[i].key, "Proxy-Authorization")) {
+        else if (!ap_cstr_casecmp(hdrs[i].key, "Authorization")
+                 || !ap_cstr_casecmp(hdrs[i].key, "Proxy-Authorization")) {
             if (conf->cgi_pass_auth == AP_CGI_PASS_AUTH_ON) {
                 add_unless_null(e, http2env(r, hdrs[i].key), hdrs[i].val);
             }
@@ -613,7 +613,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
             ++l;
         }
 
-        if (!ap_casecmpstr(w, "Content-type")) {
+        if (!ap_cstr_casecmp(w, "Content-type")) {
             char *tmp;
 
             /* Nuke trailing whitespace */
@@ -631,7 +631,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
          * If the script returned a specific status, that's what
          * we'll use - otherwise we assume 200 OK.
          */
-        else if (!ap_casecmpstr(w, "Status")) {
+        else if (!ap_cstr_casecmp(w, "Status")) {
             r->status = cgi_status = atoi(l);
             if (!ap_is_HTTP_VALID_RESPONSE(cgi_status))
                 /* Intentional no APLOGNO */
@@ -645,30 +645,30 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
                                  apr_filepath_name_get(r->filename), l);
             r->status_line = apr_pstrdup(r->pool, l);
         }
-        else if (!ap_casecmpstr(w, "Location")) {
+        else if (!ap_cstr_casecmp(w, "Location")) {
             apr_table_set(r->headers_out, w, l);
         }
-        else if (!ap_casecmpstr(w, "Content-Length")) {
+        else if (!ap_cstr_casecmp(w, "Content-Length")) {
             apr_table_set(r->headers_out, w, l);
         }
-        else if (!ap_casecmpstr(w, "Content-Range")) {
+        else if (!ap_cstr_casecmp(w, "Content-Range")) {
             apr_table_set(r->headers_out, w, l);
         }
-        else if (!ap_casecmpstr(w, "Transfer-Encoding")) {
+        else if (!ap_cstr_casecmp(w, "Transfer-Encoding")) {
             apr_table_set(r->headers_out, w, l);
         }
-        else if (!ap_casecmpstr(w, "ETag")) {
+        else if (!ap_cstr_casecmp(w, "ETag")) {
             apr_table_set(r->headers_out, w, l);
         }
         /*
          * If the script gave us a Last-Modified header, we can't just
          * pass it on blindly because of restrictions on future values.
          */
-        else if (!ap_casecmpstr(w, "Last-Modified")) {
+        else if (!ap_cstr_casecmp(w, "Last-Modified")) {
             ap_update_mtime(r, apr_date_parse_http(l));
             ap_set_last_modified(r);
         }
-        else if (!ap_casecmpstr(w, "Set-Cookie")) {
+        else if (!ap_cstr_casecmp(w, "Set-Cookie")) {
             apr_table_add(cookie_table, w, l);
         }
         else {