]> granicus.if.org Git - apache/commitdiff
End abuse of apr_strnat[case]cmp - it isn't str[case]cmp.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 13 Jul 2005 04:43:59 +0000 (04:43 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 13 Jul 2005 04:43:59 +0000 (04:43 +0000)
  Unsure if apr_strnatcasecmp(conf_ip, uri_ip) was intentional, on the
  off chance that the left or right hand ip string happens to contain
  leading zeros.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@216111 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_http.c

index 0ea9a9a147690a35f5d0cf2a59f1e54bf4969d72..1aead22a411990cc1f6d7583a39215ea036f8699 100644 (file)
@@ -436,8 +436,8 @@ static int compare_client_certs(apr_array_header_t *srcs,
     src = (struct apr_ldap_opt_tls_cert_t *)srcs->elts;
     dest = (struct apr_ldap_opt_tls_cert_t *)dests->elts;
     for (i = 0; i < srcs->nelts; i++) {
-        if (apr_strnatcmp(src[i].path, dest[i].path) ||
-            apr_strnatcmp(src[i].password, dest[i].password) ||
+        if (strcmp(src[i].path, dest[i].path) ||
+            strcmp(src[i].password, dest[i].password) ||
             src[i].type != dest[i].type) {
             return 1;
         }
index 5b120fd9586aaa1134d1e4e206c5673bfb5628ec..791de75ebb3f1b79fc0c71421124fe185c75de27 100644 (file)
@@ -1072,7 +1072,7 @@ static const char *
 
     /* Don't duplicate entries */
     for (i = 0; i < conf->noproxies->nelts; i++) {
-        if (apr_strnatcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
+        if (strcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
             found = 1;
         }
     }
index b9e4b992325e1dc866ec5b772c0657c74b4ca902..337693ec172cfae4bf9a4519f18cdac70bb5b252 100644 (file)
@@ -787,23 +787,24 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
     headers_in_array = apr_table_elts(r->headers_in);
     headers_in = (const apr_table_entry_t *) headers_in_array->elts;
     for (counter = 0; counter < headers_in_array->nelts; counter++) {
-        if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
+        if (headers_in[counter].key == NULL 
+             || headers_in[counter].val == NULL
 
         /* Clear out hop-by-hop request headers not to send
          * RFC2616 13.5.1 says we should strip these headers
          */
                 /* Already sent */
-            || !apr_strnatcasecmp(headers_in[counter].key, "Host")
+             || !strcasecmp(headers_in[counter].key, "Host")
 
-            || !apr_strnatcasecmp(headers_in[counter].key, "Keep-Alive")
-            || !apr_strnatcasecmp(headers_in[counter].key, "TE")
-            || !apr_strnatcasecmp(headers_in[counter].key, "Trailer")
-            || !apr_strnatcasecmp(headers_in[counter].key, "Transfer-Encoding")
-            || !apr_strnatcasecmp(headers_in[counter].key, "Upgrade")
+             || !strcasecmp(headers_in[counter].key, "Keep-Alive")
+             || !strcasecmp(headers_in[counter].key, "TE")
+             || !strcasecmp(headers_in[counter].key, "Trailer")
+             || !strcasecmp(headers_in[counter].key, "Transfer-Encoding")
+             || !strcasecmp(headers_in[counter].key, "Upgrade")
 
             /* We'll add appropriate Content-Length later, if appropriate.
              */
-            || !apr_strnatcasecmp(headers_in[counter].key, "Content-Length")
+             || !strcasecmp(headers_in[counter].key, "Content-Length")
         /* XXX: @@@ FIXME: "Proxy-Authorization" should *only* be 
          * suppressed if THIS server requested the authentication,
          * not when a frontend proxy requested it!
@@ -813,23 +814,23 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
          * code itself, not here. This saves us having to signal
          * somehow whether this request was authenticated or not.
          */
-            || !apr_strnatcasecmp(headers_in[counter].key,"Proxy-Authorization")
-            || !apr_strnatcasecmp(headers_in[counter].key,"Proxy-Authenticate")) {
+             || !strcasecmp(headers_in[counter].key,"Proxy-Authorization")
+             || !strcasecmp(headers_in[counter].key,"Proxy-Authenticate")) {
             continue;
         }
         /* for sub-requests, ignore freshness/expiry headers */
         if (r->main) {
-                if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
-                     || !apr_strnatcasecmp(headers_in[counter].key, "If-Match")
-                     || !apr_strnatcasecmp(headers_in[counter].key, "If-Modified-Since")
-                     || !apr_strnatcasecmp(headers_in[counter].key, "If-Range")
-                     || !apr_strnatcasecmp(headers_in[counter].key, "If-Unmodified-Since")                     
-                     || !apr_strnatcasecmp(headers_in[counter].key, "If-None-Match")) {
-                    continue;
-                }
+            if (headers_in[counter].key == NULL
+                 || headers_in[counter].val == NULL
+                 || !strcasecmp(headers_in[counter].key, "If-Match")
+                 || !strcasecmp(headers_in[counter].key, "If-Modified-Since")
+                 || !strcasecmp(headers_in[counter].key, "If-Range")
+                 || !strcasecmp(headers_in[counter].key, "If-Unmodified-Since")
+                 || !strcasecmp(headers_in[counter].key, "If-None-Match")) {
+                continue;
+            }
         }
 
-
         buf = apr_pstrcat(p, headers_in[counter].key, ": ",
                           headers_in[counter].val, CRLF,
                           NULL);