Mailing List Archive

svn commit: r1885697 [1/2] - in /httpd/httpd/branches/2.4.x: ./ modules/aaa/ modules/dav/main/ modules/filters/ modules/generators/ modules/http/ modules/loggers/ modules/mappers/ modules/metadata/ modules/proxy/ modules/ssl/ server/
Author: jailletc36
Date: Tue Jan 19 19:29:43 2021
New Revision: 1885697

URL: http://svn.apache.org/viewvc?rev=1885697&view=rev
Log:
Merge most of r1747469 from trunk

* When ap_cstr_casecmp[n] have been introduced, in r1747469, it has
introduced many differences between 2.4.x and trunk.
Direct backporting was not that easy because:
- it was initialy introduced as ap_casecmpstr[n] with several patches
- it touched some files that were not in 2.4.x branch
Later, parts of it have already been backported.

This patch tries to clean all this.

Submitted by: many people
Reviewed by: jailletc36, minfrin, ylavic
Backported by: jailletc36

Modified:
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_basic.c
httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_digest.c
httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_form.c
httpd/httpd/branches/2.4.x/modules/aaa/mod_authnz_fcgi.c
httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c
httpd/httpd/branches/2.4.x/modules/dav/main/util.c
httpd/httpd/branches/2.4.x/modules/filters/mod_charset_lite.c
httpd/httpd/branches/2.4.x/modules/filters/mod_deflate.c
httpd/httpd/branches/2.4.x/modules/filters/mod_include.c
httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
httpd/httpd/branches/2.4.x/modules/generators/mod_autoindex.c
httpd/httpd/branches/2.4.x/modules/generators/mod_info.c
httpd/httpd/branches/2.4.x/modules/http/http_filters.c
httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c
httpd/httpd/branches/2.4.x/modules/mappers/mod_negotiation.c
httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c
httpd/httpd/branches/2.4.x/modules/mappers/mod_vhost_alias.c
httpd/httpd/branches/2.4.x/modules/metadata/mod_cern_meta.c
httpd/httpd/branches/2.4.x/modules/metadata/mod_headers.c
httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fdpass.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_scgi.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_wstunnel.c
httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c
httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_ocsp.c
httpd/httpd/branches/2.4.x/server/config.c
httpd/httpd/branches/2.4.x/server/core.c
httpd/httpd/branches/2.4.x/server/mpm_unix.c
httpd/httpd/branches/2.4.x/server/protocol.c
httpd/httpd/branches/2.4.x/server/util.c
httpd/httpd/branches/2.4.x/server/util_expr_eval.c
httpd/httpd/branches/2.4.x/server/util_script.c

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Jan 19 19:29:43 2021
@@ -137,26 +137,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]

- *) Synch 2.4.x and trunk
- When ap_cstr_casecmp[n] have been introduced, in r1747469, it has introduced
- many differences between 2.4.x and trunk.
- Direct backporting was not that easy because:
- - it was initialy introduced as ap_casecmpstr[n] with several patches
- - it touched some files that were not in 2.4.x branch
- Later, parts of it have already been backported.
- The proposed patch try to clean all this.
- I've done my best to remove parts that rely on code that has not been
- been backported in 2.4.x yet (r1610674 for example). Should it be done
- one day, leaving it as-is can ease the backport.
- To ease the review, a few greps:
- grep "^-.*strcasecmp" r1747469-v2.diff | wc -l --> 233
- grep "^+.*ap_cstr_casecmp[^n]" r1747469-v2.diff | wc -l --> 233
- grep "^-.*strncasecmp" r1747469-v2.diff | wc -l --> 49
- grep "^+.*ap_cstr_casecmpn" r1747469-v2.diff | wc -l --> 49
- It has been compile tested.
- 2.4.x patch: http://home.apache.org/~jailletc36/r1747469-v2.diff
- +1: jailletc36, minfrin, ylavic
-
*) Fix some Windows 64 compilation warnings (if I get positive feedbacks
on such patches, I'll try to group more changes in future commits. However
fixing these warnings looks like a long and boring task)

Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_basic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_basic.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_basic.c (original)
+++ httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_basic.c Tue Jan 19 19:29:43 2021
@@ -238,7 +238,7 @@ static void note_basic_auth_failure(requ

static int hook_note_basic_auth_failure(request_rec *r, const char *auth_type)
{
- if (strcasecmp(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
return HTTP_UNAUTHORIZED;
}

- if (strcasecmp(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(reque

/* Are we configured to be Basic auth? */
current_auth = ap_auth_type(r);
- if (!current_auth || strcasecmp(current_auth, "Basic")) {
+ if (!current_auth || ap_cstr_casecmp(current_auth, "Basic")) {
return DECLINED;
}


Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_digest.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_digest.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_digest.c Tue Jan 19 19:29:43 2021
@@ -566,7 +566,7 @@ static const char *set_qop(cmd_parms *cm
if (!strcasecmp(op, "auth-int")) {
return "AuthDigestQop auth-int is not implemented";
}
- else if (strcasecmp(op, "auth")) {
+ else if (ap_cstr_casecmp(op, "auth")) {
return apr_pstrcat(cmd->pool, "Unrecognized qop: ", op, NULL);
}

@@ -618,7 +618,7 @@ static const char *set_algorithm(cmd_par
return "AuthDigestAlgorithm: ERROR: algorithm `MD5-sess' "
"is not implemented";
}
- else if (strcasecmp(alg, "MD5")) {
+ else if (ap_cstr_casecmp(alg, "MD5")) {
return apr_pstrcat(cmd->pool, "Invalid algorithm in AuthDigestAlgorithm: ", alg, NULL);
}

@@ -931,7 +931,7 @@ static int get_digest_rec(request_rec *r
}

resp->scheme = ap_getword_white(r->pool, &auth_line);
- if (strcasecmp(resp->scheme, "Digest")) {
+ if (ap_cstr_casecmp(resp->scheme, "Digest")) {
resp->auth_hdr_sts = NOT_DIGEST;
return !OK;
}
@@ -995,25 +995,25 @@ static int get_digest_rec(request_rec *r
auth_line++;
}

- if (!strcasecmp(key, "username"))
+ if (!ap_cstr_casecmp(key, "username"))
resp->username = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "realm"))
+ else if (!ap_cstr_casecmp(key, "realm"))
resp->realm = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "nonce"))
+ else if (!ap_cstr_casecmp(key, "nonce"))
resp->nonce = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "uri"))
+ else if (!ap_cstr_casecmp(key, "uri"))
resp->uri = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "response"))
+ else if (!ap_cstr_casecmp(key, "response"))
resp->digest = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "algorithm"))
+ else if (!ap_cstr_casecmp(key, "algorithm"))
resp->algorithm = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "cnonce"))
+ else if (!ap_cstr_casecmp(key, "cnonce"))
resp->cnonce = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "opaque"))
+ else if (!ap_cstr_casecmp(key, "opaque"))
resp->opaque = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "qop"))
+ else if (!ap_cstr_casecmp(key, "qop"))
resp->message_qop = apr_pstrdup(r->pool, value);
- else if (!strcasecmp(key, "nc"))
+ else if (!ap_cstr_casecmp(key, "nc"))
resp->nonce_count = apr_pstrdup(r->pool, value);
}

@@ -1186,7 +1186,7 @@ static void note_digest_auth_failure(req
if (apr_is_empty_array(conf->qop_list)) {
qop = ", qop=\"auth\"";
}
- else if (!strcasecmp(*(const char **)(conf->qop_list->elts), "none")) {
+ else if (!ap_cstr_casecmp(*(const char **)(conf->qop_list->elts), "none")) {
qop = "";
}
else {
@@ -1275,7 +1275,7 @@ static int hook_note_digest_auth_failure
digest_header_rec *resp;
digest_config_rec *conf;

- if (strcasecmp(auth_type, "Digest"))
+ if (ap_cstr_casecmp(auth_type, "Digest"))
return DECLINED;

/* get the client response and mark */
@@ -1385,7 +1385,7 @@ static int check_nc(const request_rec *r
}

if (!apr_is_empty_array(conf->qop_list) &&
- !strcasecmp(*(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)
@@ -1590,7 +1590,7 @@ static int authenticate_digest_user(requ

/* do we require Digest auth for this URI? */

- if (!(t = ap_auth_type(r)) || strcasecmp(t, "Digest")) {
+ if (!(t = ap_auth_type(r)) || ap_cstr_casecmp(t, "Digest")) {
return DECLINED;
}

@@ -1758,7 +1758,7 @@ static int authenticate_digest_user(requ
}

if (resp->algorithm != NULL
- && strcasecmp(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);
@@ -1809,7 +1809,7 @@ static int authenticate_digest_user(requ
int match = 0, idx;
const char **tmp = (const char **)(conf->qop_list->elts);
for (idx = 0; idx < conf->qop_list->nelts; idx++) {
- if (!strcasecmp(*tmp, resp->message_qop)) {
+ if (!ap_cstr_casecmp(*tmp, resp->message_qop)) {
match = 1;
break;
}
@@ -1818,7 +1818,7 @@ static int authenticate_digest_user(requ

if (!match
&& !(apr_is_empty_array(conf->qop_list)
- && !strcasecmp(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);
@@ -1900,7 +1900,7 @@ static int add_auth_info(request_rec *r)
/* do rfc-2069 digest
*/
if (!apr_is_empty_array(conf->qop_list) &&
- !strcasecmp(*(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;

Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_form.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_form.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_form.c (original)
+++ httpd/httpd/branches/2.4.x/modules/aaa/mod_auth_form.c Tue Jan 19 19:29:43 2021
@@ -419,7 +419,7 @@ static void note_cookie_auth_failure(req
static int hook_note_cookie_auth_failure(request_rec * r,
const char *auth_type)
{
- if (strcasecmp(auth_type, "form"))
+ if (ap_cstr_casecmp(auth_type, "form"))
return DECLINED;

note_cookie_auth_failure(r);
@@ -891,7 +891,7 @@ static int authenticate_form_authn(reque

/* Are we configured to be Form auth? */
current_auth = ap_auth_type(r);
- if (!current_auth || strcasecmp(current_auth, "form")) {
+ if (!current_auth || ap_cstr_casecmp(current_auth, "form")) {
return DECLINED;
}


Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_authnz_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_authnz_fcgi.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/aaa/mod_authnz_fcgi.c (original)
+++ httpd/httpd/branches/2.4.x/modules/aaa/mod_authnz_fcgi.c Tue Jan 19 19:29:43 2021
@@ -681,7 +681,7 @@ static int mod_fcgid_modify_auth_header(
/* 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 (strncasecmp(key, "Variable-", 9) == 0)
+ if (ap_cstr_casecmpn(key, "Variable-", 9) == 0)
apr_table_setn(vars, key, val);
return 1;
}
@@ -809,7 +809,7 @@ static int fcgi_check_authn(request_rec

prov = dconf && dconf->name ? dconf->name : NULL;

- if (!prov || !strcasecmp(prov, "None")) {
+ if (!prov || !ap_cstr_casecmp(prov, "None")) {
return DECLINED;
}

@@ -824,7 +824,7 @@ static int fcgi_check_authn(request_rec
dconf->user_expr ? "yes" : "no",
auth_type);

- if (auth_type && !strcasecmp(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 "

Modified: httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c Tue Jan 19 19:29:43 2021
@@ -677,7 +677,7 @@ DAV_DECLARE(int) dav_get_depth(request_r
return def_depth;
}

- if (strcasecmp(depth, "infinity") == 0) {
+ if (ap_cstr_casecmp(depth, "infinity") == 0) {
return DAV_INFINITY;
}
else if (strcmp(depth, "0") == 0) {
@@ -806,7 +806,7 @@ static int dav_parse_range(request_rec *
return 0;

range = apr_pstrdup(r->pool, range_c);
- if (strncasecmp(range, "bytes ", 6) != 0
+ if (ap_cstr_casecmpn(range, "bytes ", 6) != 0
|| (dash = ap_strchr(range + 6, '-')) == NULL
|| (slash = ap_strchr(range + 6, '/')) == NULL) {
/* malformed header */
@@ -2473,7 +2473,7 @@ static int process_mkcol_body(request_re
r->remaining = 0;

if (tenc) {
- if (strcasecmp(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);

Modified: httpd/httpd/branches/2.4.x/modules/dav/main/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/main/util.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/main/util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/main/util.c Tue Jan 19 19:29:43 2021
@@ -244,7 +244,7 @@ DAV_DECLARE(dav_lookup_result) dav_looku
request. the port must match our port.
*/
port = r->connection->local_addr->port;
- if (strcasecmp(comp.scheme, scheme) != 0
+ if (ap_cstr_casecmp(comp.scheme, scheme) != 0
#ifdef APACHE_PORT_HANDLING_IS_BUSTED
|| comp.port != port
#endif

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_charset_lite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_charset_lite.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_charset_lite.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_charset_lite.c Tue Jan 19 19:29:43 2021
@@ -790,7 +790,7 @@ static apr_status_t xlate_out_filter(ap_
if (!ctx->noop && ctx->xlate == NULL) {
const char *mime_type = f->r->content_type;

- if (mime_type && (strncasecmp(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_
*/
strcmp(mime_type, DIR_MAGIC_TYPE) == 0 ||
#endif
- strncasecmp(mime_type, "message/", 8) == 0 ||
+ ap_cstr_casecmpn(mime_type, "message/", 8) == 0 ||
dc->force_xlate == FX_FORCE)) {

rv = apr_xlate_open(&ctx->xlate,

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_deflate.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_deflate.c Tue Jan 19 19:29:43 2021
@@ -118,8 +118,8 @@ static int check_gzip(request_rec *r, ap
if (encoding && *encoding) {

/* check the usual/simple case first */
- if (!strcasecmp(encoding, "gzip")
- || !strcasecmp(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");
@@ -137,8 +137,8 @@ static int check_gzip(request_rec *r, ap
for(;;) {
char *token = ap_strrchr(new_encoding, ',');
if (!token) { /* gzip:identity or other:identity */
- if (!strcasecmp(new_encoding, "gzip")
- || !strcasecmp(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");
@@ -150,8 +150,8 @@ static int check_gzip(request_rec *r, ap
break; /* seen all tokens */
}
for (ptr=token+1; apr_isspace(*ptr); ++ptr);
- if (!strcasecmp(ptr, "gzip")
- || !strcasecmp(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);
@@ -161,7 +161,7 @@ static int check_gzip(request_rec *r, ap
}
found = 1;
}
- else if (!ptr[0] || !strcasecmp(ptr, "identity")) {
+ else if (!ptr[0] || !ap_cstr_casecmp(ptr, "identity")) {
*token = '\0';
continue; /* strip the token and find the next one */
}
@@ -709,7 +709,7 @@ static apr_status_t deflate_out_filter(a
}

token = ap_get_token(r->pool, &accepts, 0);
- while (token && token[0] && strcasecmp(token, "gzip")) {
+ while (token && token[0] && ap_cstr_casecmp(token, "gzip")) {
/* skip parameters, XXX: ;q=foo evaluation? */
while (*accepts == ';') {
++accepts;
@@ -794,7 +794,7 @@ static apr_status_t deflate_out_filter(a
*/

/* If the entire Content-Encoding is "identity", we can replace it. */
- if (!encoding || !strcasecmp(encoding, "identity")) {
+ if (!encoding || !ap_cstr_casecmp(encoding, "identity")) {
apr_table_setn(r->headers_out, "Content-Encoding", "gzip");
}
else {

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_include.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_include.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_include.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_include.c Tue Jan 19 19:29:43 2021
@@ -1967,25 +1967,25 @@ static apr_status_t handle_echo(include_
token = apr_strtok(d, ", \t", &last);

while (token) {
- if (!strcasecmp(token, "none")) {
+ if (!ap_cstr_casecmp(token, "none")) {
/* do nothing */
}
- else if (!strcasecmp(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 (!strcasecmp(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 (!strcasecmp(token, "entity")) {
+ else if (!ap_cstr_casecmp(token, "entity")) {
char *buf = apr_pstrdup(ctx->pool, echo_text);
decodehtml(buf);
echo_text = buf;
}
- else if (!strcasecmp(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_
token = apr_strtok(e, ", \t", &last);

while (token) {
- if (!strcasecmp(token, "none")) {
+ if (!ap_cstr_casecmp(token, "none")) {
/* do nothing */
}
- else if (!strcasecmp(token, "url")) {
+ else if (!ap_cstr_casecmp(token, "url")) {
echo_text = ap_escape_uri(ctx->dpool, echo_text);
}
- else if (!strcasecmp(token, "urlencoded")) {
+ else if (!ap_cstr_casecmp(token, "urlencoded")) {
echo_text = ap_escape_urlencoded(ctx->dpool, echo_text);
}
- else if (!strcasecmp(token, "entity")) {
+ else if (!ap_cstr_casecmp(token, "entity")) {
echo_text = ap_escape_html2(ctx->dpool, echo_text, 0);
}
- else if (!strcasecmp(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_c
token = apr_strtok(d, ", \t", &last);

while (token) {
- if (!strcasecmp(token, "none")) {
+ if (!ap_cstr_casecmp(token, "none")) {
/* do nothing */
}
- else if (!strcasecmp(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 (!strcasecmp(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 (!strcasecmp(token, "entity")) {
+ else if (!ap_cstr_casecmp(token, "entity")) {
char *buf = apr_pstrdup(ctx->pool, parsed_string);
decodehtml(buf);
parsed_string = buf;
}
- else if (!strcasecmp(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_c
token = apr_strtok(e, ", \t", &last);

while (token) {
- if (!strcasecmp(token, "none")) {
+ if (!ap_cstr_casecmp(token, "none")) {
/* do nothing */
}
- else if (!strcasecmp(token, "url")) {
+ else if (!ap_cstr_casecmp(token, "url")) {
parsed_string = ap_escape_uri(ctx->dpool, parsed_string);
}
- else if (!strcasecmp(token, "urlencoded")) {
+ else if (!ap_cstr_casecmp(token, "urlencoded")) {
parsed_string = ap_escape_urlencoded(ctx->dpool, parsed_string);
}
- else if (!strcasecmp(token, "entity")) {
+ else if (!ap_cstr_casecmp(token, "entity")) {
parsed_string = ap_escape_html2(ctx->dpool, parsed_string, 0);
}
- else if (!strcasecmp(token, "base64")) {
+ else if (!ap_cstr_casecmp(token, "base64")) {
char *buf;
buf = ap_pbase64encode(ctx->dpool, (char *)parsed_string);
parsed_string = buf;

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c Tue Jan 19 19:29:43 2021
@@ -679,7 +679,7 @@ static meta *metafix(request_rec *r, con
while (!apr_isalpha(*++p));
for (q = p; apr_isalnum(*q) || (*q == '-'); ++q);
header = apr_pstrmemdup(r->pool, p, q-p);
- if (strncasecmp(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);
@@ -707,7 +707,7 @@ static meta *metafix(request_rec *r, con
}
}
}
- else if (!strncasecmp(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;
@@ -836,8 +836,8 @@ static saxctxt *check_filter_init (ap_fi
else if (!f->r->content_type) {
errmsg = "No content-type; bailing out of proxy-html filter";
}
- else if (strncasecmp(f->r->content_type, "text/html", 9) &&
- strncasecmp(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";
}

Modified: httpd/httpd/branches/2.4.x/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/generators/mod_autoindex.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/branches/2.4.x/modules/generators/mod_autoindex.c Tue Jan 19 19:29:43 2021
@@ -1070,7 +1070,7 @@ static void emit_head(request_rec *r, ch
emit_H1 = 1;
}
}
- else if (!strncasecmp("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
@@ -1165,7 +1165,7 @@ static void emit_tail(request_rec *r, ch
suppress_post = suppress_amble;
}
}
- else if (!strncasecmp("text/", rr->content_type, 5)) {
+ else if (!ap_cstr_casecmpn("text/", rr->content_type, 5)) {
/*
* If we can open the file, suppress the signature.
*/

Modified: httpd/httpd/branches/2.4.x/modules/generators/mod_info.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/generators/mod_info.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/generators/mod_info.c (original)
+++ httpd/httpd/branches/2.4.x/modules/generators/mod_info.c Tue Jan 19 19:29:43 2021
@@ -785,7 +785,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 || strcasecmp(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>, "
@@ -819,19 +819,19 @@ static int display_info(request_rec * r)
ap_rputs("</tt></dt></dl><hr />", r);
}

- if (!r->args || !strcasecmp(r->args, "server")) {
+ if (!r->args || !ap_cstr_casecmp(r->args, "server")) {
show_server_settings(r);
}

- if (!r->args || !strcasecmp(r->args, "hooks")) {
+ if (!r->args || !ap_cstr_casecmp(r->args, "hooks")) {
show_active_hooks(r);
}

- if (!r->args || !strcasecmp(r->args, "providers")) {
+ if (!r->args || !ap_cstr_casecmp(r->args, "providers")) {
show_providers(r);
}

- if (r->args && 0 == strcasecmp(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);
@@ -842,7 +842,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 || !strcasecmp(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",
@@ -940,7 +940,7 @@ static int display_info(request_rec * r)
}
}
}
- if (!modp && r->args && strcasecmp(r->args, "server")) {
+ if (!modp && r->args && ap_cstr_casecmp(r->args, "server")) {
ap_rputs("<p><b>No such module</b></p>\n", r);
}
}

Modified: httpd/httpd/branches/2.4.x/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/http_filters.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/http_filters.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/http_filters.c Tue Jan 19 19:29:43 2021
@@ -873,7 +873,7 @@ static int uniq_field_values(void *d, co
*/
for (i = 0, strpp = (char **) values->elts; i < values->nelts;
++i, ++strpp) {
- if (*strpp && strcasecmp(*strpp, start) == 0) {
+ if (*strpp && ap_cstr_casecmp(*strpp, start) == 0) {
break;
}
}
@@ -1455,7 +1455,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_

while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) {
for (i = 0; i < r->content_languages->nelts; ++i) {
- if (!strcasecmp(token, languages[i]))
+ if (!ap_cstr_casecmp(token, languages[i]))
break;
}
if (i == r->content_languages->nelts) {
@@ -1718,7 +1718,7 @@ AP_DECLARE(int) ap_setup_client_block(re
r->remaining = 0;

if (tenc) {
- if (strcasecmp(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;

Modified: httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/branches/2.4.x/modules/loggers/mod_log_config.c Tue Jan 19 19:29:43 2021
@@ -473,7 +473,7 @@ static APR_INLINE char *find_multiple_he
result_list = rp = NULL;

do {
- if (!strcasecmp(t_elt->key, key)) {
+ if (!ap_cstr_casecmp(t_elt->key, key)) {
if (!result_list) {
result_list = rp = apr_palloc(pool, sizeof(*rp));
}
@@ -517,10 +517,10 @@ static const char *log_header_out(reques
{
const char *cp = NULL;

- if (!strcasecmp(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 (!strcasecmp(a, "Set-Cookie")) {
+ else if (!ap_cstr_casecmp(a, "Set-Cookie")) {
cp = find_multiple_headers(r->pool, r->headers_out, a);
}
else {
@@ -576,7 +576,7 @@ static const char *log_cookie(request_re
--last;
}

- if (!strcasecmp(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);

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_negotiation.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_negotiation.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_negotiation.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_negotiation.c Tue Jan 19 19:29:43 2021
@@ -774,7 +774,7 @@ static enum header_state get_header_line
/* We need to shortcut the rest of this block following the Body:
* tag - we will not look for continutation after this line.
*/
- if (!strncasecmp(buffer, "Body:", 5))
+ if (!ap_cstr_casecmpn(buffer, "Body:", 5))
return header_seen;

while (apr_file_getc(&c, map) != APR_EOF) {

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c Tue Jan 19 19:29:43 2021
@@ -524,7 +524,7 @@ static unsigned is_absolute_uri(char *ur
switch (*uri++) {
case 'a':
case 'A':
- if (!strncasecmp(uri, "jp://", 5)) { /* ajp:// */
+ if (!ap_cstr_casecmpn(uri, "jp://", 5)) { /* ajp:// */
*sqs = 1;
return 6;
}
@@ -532,7 +532,7 @@ static unsigned is_absolute_uri(char *ur

case 'b':
case 'B':
- if (!strncasecmp(uri, "alancer://", 10)) { /* balancer:// */
+ if (!ap_cstr_casecmpn(uri, "alancer://", 10)) { /* balancer:// */
*sqs = 1;
return 11;
}
@@ -540,10 +540,10 @@ static unsigned is_absolute_uri(char *ur

case 'f':
case 'F':
- if (!strncasecmp(uri, "tp://", 5)) { /* ftp:// */
+ if (!ap_cstr_casecmpn(uri, "tp://", 5)) { /* ftp:// */
return 6;
}
- if (!strncasecmp(uri, "cgi://", 6)) { /* fcgi:// */
+ if (!ap_cstr_casecmpn(uri, "cgi://", 6)) { /* fcgi:// */
*sqs = 1;
return 7;
}
@@ -551,26 +551,26 @@ static unsigned is_absolute_uri(char *ur

case 'g':
case 'G':
- if (!strncasecmp(uri, "opher://", 8)) { /* gopher:// */
+ if (!ap_cstr_casecmpn(uri, "opher://", 8)) { /* gopher:// */
return 9;
}
break;

case 'h':
case 'H':
- if (!strncasecmp(uri, "ttp://", 6)) { /* http:// */
+ if (!ap_cstr_casecmpn(uri, "ttp://", 6)) { /* http:// */
*sqs = 1;
return 7;
}
- else if (!strncasecmp(uri, "ttps://", 7)) { /* https:// */
+ else if (!ap_cstr_casecmpn(uri, "ttps://", 7)) { /* https:// */
*sqs = 1;
return 8;
}
- else if (!strncasecmp(uri, "2://", 4)) { /* h2:// */
+ else if (!ap_cstr_casecmpn(uri, "2://", 4)) { /* h2:// */
*sqs = 1;
return 5;
}
- else if (!strncasecmp(uri, "2c://", 5)) { /* h2c:// */
+ else if (!ap_cstr_casecmpn(uri, "2c://", 5)) { /* h2c:// */
*sqs = 1;
return 6;
}
@@ -578,14 +578,14 @@ static unsigned is_absolute_uri(char *ur

case 'l':
case 'L':
- if (!strncasecmp(uri, "dap://", 6)) { /* ldap:// */
+ if (!ap_cstr_casecmpn(uri, "dap://", 6)) { /* ldap:// */
return 7;
}
break;

case 'm':
case 'M':
- if (!strncasecmp(uri, "ailto:", 6)) { /* mailto: */
+ if (!ap_cstr_casecmpn(uri, "ailto:", 6)) { /* mailto: */
*sqs = 1;
return 7;
}
@@ -593,17 +593,17 @@ static unsigned is_absolute_uri(char *ur

case 'n':
case 'N':
- if (!strncasecmp(uri, "ews:", 4)) { /* news: */
+ if (!ap_cstr_casecmpn(uri, "ews:", 4)) { /* news: */
return 5;
}
- else if (!strncasecmp(uri, "ntp://", 6)) { /* nntp:// */
+ else if (!ap_cstr_casecmpn(uri, "ntp://", 6)) { /* nntp:// */
return 7;
}
break;

case 's':
case 'S':
- if (!strncasecmp(uri, "cgi://", 6)) { /* scgi:// */
+ if (!ap_cstr_casecmpn(uri, "cgi://", 6)) { /* scgi:// */
*sqs = 1;
return 7;
}
@@ -611,11 +611,11 @@ static unsigned is_absolute_uri(char *ur

case 'w':
case 'W':
- if (!strncasecmp(uri, "s://", 4)) { /* ws:// */
+ if (!ap_cstr_casecmpn(uri, "s://", 4)) { /* ws:// */
*sqs = 1;
return 5;
}
- else if (!strncasecmp(uri, "ss://", 5)) { /* wss:// */
+ else if (!ap_cstr_casecmpn(uri, "ss://", 5)) { /* wss:// */
*sqs = 1;
return 6;
}
@@ -723,7 +723,7 @@ static char *escape_absolute_uri(apr_poo
* [dn ["?" [attributes] ["?" [scope]
* ["?" [filter] ["?" extensions]]]]]]
*/
- if (!strncasecmp(uri, "ldap", 4)) {
+ if (!ap_cstr_casecmpn(uri, "ldap", 4)) {
char *token[5];
int c = 0;

@@ -825,7 +825,7 @@ static void reduce_uri(request_rec *r)
cp = (char *)ap_http_scheme(r);
l = strlen(cp);
if ( strlen(r->filename) > l+3
- && strncasecmp(r->filename, cp, l) == 0
+ && ap_cstr_casecmpn(r->filename, cp, l) == 0
&& r->filename[l] == ':'
&& r->filename[l+1] == '/'
&& r->filename[l+2] == '/' ) {
@@ -2601,14 +2601,14 @@ static void add_cookie(request_rec *r, c
: NULL,
expires ? (exp_time ? exp_time : "")
: NULL,
- (secure && (!strcasecmp(secure, "true")
+ (secure && (!ap_cstr_casecmp(secure, "true")
|| !strcmp(secure, "1")
- || !strcasecmp(secure,
+ || !ap_cstr_casecmp(secure,
"secure"))) ?
"; secure" : NULL,
- (httponly && (!strcasecmp(httponly, "true")
+ (httponly && (!ap_cstr_casecmp(httponly, "true")
|| !strcmp(httponly, "1")
- || !strcasecmp(httponly,
+ || !ap_cstr_casecmp(httponly,
"HttpOnly"))) ?
"; HttpOnly" : NULL,
NULL);

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_vhost_alias.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_vhost_alias.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_vhost_alias.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_vhost_alias.c Tue Jan 19 19:29:43 2021
@@ -152,7 +152,7 @@ static const char *vhost_alias_set(cmd_p
}

if (!ap_os_is_path_absolute(cmd->pool, map)) {
- if (strcasecmp(map, "none")) {
+ if (ap_cstr_casecmp(map, "none")) {
return "format string must be an absolute path, or 'none'";
}
*pmap = NULL;

Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_cern_meta.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_cern_meta.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/metadata/mod_cern_meta.c (original)
+++ httpd/httpd/branches/2.4.x/modules/metadata/mod_cern_meta.c Tue Jan 19 19:29:43 2021
@@ -240,7 +240,7 @@ static int scan_meta_file(request_rec *r
while (apr_isspace(*l))
++l;

- if (!strcasecmp(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
ap_content_type_tolower(tmp);
ap_set_content_type(r, tmp);
}
- else if (!strcasecmp(w, "Status")) {
+ else if (!ap_cstr_casecmp(w, "Status")) {
sscanf(l, "%d", &r->status);
r->status_line = apr_pstrdup(r->pool, l);
}

Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_headers.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/branches/2.4.x/modules/metadata/mod_headers.c Tue Jan 19 19:29:43 2021
@@ -791,14 +791,14 @@ static int do_headers_fixup(request_rec
}
break;
case hdr_set:
- if (!strcasecmp(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 (!strcasecmp(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));
@@ -814,7 +814,7 @@ static int do_headers_fixup(request_rec
break;
case hdr_edit:
case hdr_edit_r:
- if (!strcasecmp(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;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c Tue Jan 19 19:29:43 2021
@@ -633,15 +633,15 @@ static apr_status_t ajp_unmarshal_respon
}

/* Set-Cookie need additional processing */
- if (!strcasecmp(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 (!strcasecmp(stringname, "Location")
- || !strcasecmp(stringname, "Content-Location")
- || !strcasecmp(stringname, "URI")
- || !strcasecmp(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);
}
@@ -654,7 +654,7 @@ static apr_status_t ajp_unmarshal_respon
apr_table_add(r->headers_out, stringname, value);

/* Content-type needs an additional handling */
- if (strcasecmp(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,

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Tue Jan 19 19:29:43 2021
@@ -586,7 +586,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
- && !strcasecmp(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))))) {
@@ -995,7 +995,7 @@ static int proxy_needsdomain(request_rec
/* 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 */
- || strcasecmp(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");
@@ -1202,9 +1202,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 && strcasecmp(scheme, ents[i].scheme) == 0) ||
+ (p2 == NULL && ap_cstr_casecmp(scheme, ents[i].scheme) == 0) ||
(p2 != NULL &&
- strncasecmp(url, ents[i].scheme,
+ ap_cstr_casecmpn(url, ents[i].scheme,
strlen(ents[i].scheme)) == 0)) {

/* handle the scheme */
@@ -1728,7 +1728,7 @@ PROXY_DECLARE(const char *) ap_proxy_de_
* We could be passed a URL during the config stage that contains
* the UDS path... ignore it
*/
- if (!strncasecmp(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;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c Tue Jan 19 19:29:43 2021
@@ -35,7 +35,7 @@ static int proxy_ajp_canon(request_rec *
apr_port_t port, def_port;

/* ap_port_of_scheme() */
- if (strncasecmp(url, "ajp:", 4) == 0) {
+ if (ap_cstr_casecmpn(url, "ajp:", 4) == 0) {
url += 4;
}
else {
@@ -246,7 +246,7 @@ static int ap_proxy_ajp_request(apr_pool
/* read the first block of data */
input_brigade = apr_brigade_create(p, r->connection->bucket_alloc);
tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
- if (tenc && (strcasecmp(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 {
@@ -739,7 +739,7 @@ static int proxy_ajp_handler(request_rec
apr_pool_t *p = r->pool;
apr_uri_t *uri;

- if (strncasecmp(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;
}

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c Tue Jan 19 19:29:43 2021
@@ -75,7 +75,7 @@ static int proxy_balancer_canon(request_
apr_port_t port = 0;

/* TODO: offset of BALANCER_PREFIX ?? */
- if (strncasecmp(url, "balancer:", 9) == 0) {
+ if (ap_cstr_casecmpn(url, "balancer:", 9) == 0) {
url += 9;
}
else {
@@ -1312,7 +1312,7 @@ static int balancer_handler(request_rec
if ((val = apr_table_get(params, "w_hm"))) {
proxy_hcmethods_t *method = proxy_hcmethods;
for (; method->name; method++) {
- if (!strcasecmp(method->name, val) && method->implemented)
+ if (!ap_cstr_casecmp(method->name, val) && method->implemented)
wsel->s->method = method->method;
}
}
@@ -1613,7 +1613,7 @@ static int balancer_handler(request_rec
ap_rprintf(r, " <httpd:lbset>%d</httpd:lbset>\n",
worker->s->lbset);
/* End proxy_worker_stat */
- if (!strcasecmp(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:

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fdpass.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fdpass.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fdpass.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fdpass.c Tue Jan 19 19:29:43 2021
@@ -32,7 +32,7 @@ static int proxy_fdpass_canon(request_re
{
const char *path;

- if (strncasecmp(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_
apr_socket_t *sock;
apr_socket_t *clientsock;

- if (strncasecmp(url, "fd://", 5) == 0) {
+ if (ap_cstr_casecmpn(url, "fd://", 5) == 0) {
url += 5;
}
else {

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c Tue Jan 19 19:29:43 2021
@@ -296,7 +296,7 @@ static int proxy_ftp_canon(request_rec *
apr_port_t port, def_port;

/* */
- if (strncasecmp(url, "ftp:", 4) == 0) {
+ if (ap_cstr_casecmpn(url, "ftp:", 4) == 0) {
url += 4;
}
else {
@@ -504,7 +504,7 @@ static apr_status_t proxy_send_dir_filte
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 (strncasecmp(path, "/%2f", 4) == 0) {
+ if (ap_cstr_casecmpn(path, "/%2f", 4) == 0) {
basedir = "/%2f";
}

@@ -1017,7 +1017,7 @@ static int proxy_ftp_handler(request_rec
proxyhost);
return DECLINED; /* proxy connections are via HTTP */
}
- if (strncasecmp(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 */
@@ -1089,7 +1089,7 @@ static int proxy_ftp_handler(request_rec
* still smaller that the URL is logged regularly.
*/
if ((password = apr_table_get(r->headers_in, "Authorization")) != NULL
- && strcasecmp(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)) {
@@ -1324,7 +1324,7 @@ static int proxy_ftp_handler(request_rec
/* Special handling for leading "%2f": this enforces a "cwd /"
* out of the $HOME directory which was the starting point after login
*/
- if (strncasecmp(path, "%2f", 3) == 0) {
+ if (ap_cstr_casecmpn(path, "%2f", 3) == 0) {
path += 3;
while (*path == '/') /* skip leading '/' (after root %2f) */
++path;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c Tue Jan 19 19:29:43 2021
@@ -767,14 +767,14 @@ static void process_proxy_header(request
};
int i;
for (i = 0; date_hdrs[i]; ++i) {
- if (!strcasecmp(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 (!strcasecmp(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;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_scgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_scgi.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_scgi.c Tue Jan 19 19:29:43 2021
@@ -180,7 +180,7 @@ static int scgi_canon(request_rec *r, ch
const char *err, *path;
apr_port_t port, def_port;

- if (strncasecmp(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,
if (location && *location == '/') {
scgi_request_config *req_conf = apr_palloc(r->pool,
sizeof(*req_conf));
- if (strcasecmp(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,
apr_uri_t *uri;
char dummy;

- if (strncasecmp(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;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_wstunnel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_wstunnel.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_wstunnel.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_wstunnel.c Tue Jan 19 19:29:43 2021
@@ -64,12 +64,12 @@ static int proxy_wstunnel_canon(request_
}

/* ap_port_of_scheme() */
- if (strncasecmp(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 (strncasecmp(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");
@@ -329,11 +329,11 @@ static int proxy_wstunnel_handler(reques
return DECLINED;
}

- if (strncasecmp(url, "wss:", 4) == 0) {
+ if (ap_cstr_casecmpn(url, "wss:", 4) == 0) {
scheme = "WSS";
is_ssl = 1;
}
- else if (strncasecmp(url, "ws:", 3) == 0) {
+ else if (ap_cstr_casecmpn(url, "ws:", 3) == 0) {
scheme = "WS";
}
else {

Modified: httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c Tue Jan 19 19:29:43 2021
@@ -1077,7 +1077,7 @@ PROXY_DECLARE(int) ap_proxy_valid_balanc
{
if (!i)
i = sizeof(BALANCER_PREFIX)-1;
- return (!strncasecmp(name, BALANCER_PREFIX, i));
+ return (!ap_cstr_casecmpn(name, BALANCER_PREFIX, i));
}


@@ -1838,7 +1838,7 @@ PROXY_DECLARE(char *) ap_proxy_define_wo
if (ptr) {
*ptr = '\0';
rv = apr_uri_parse(p, url, &urisock);
- if (rv == APR_SUCCESS && !strcasecmp(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 */
}
@@ -3883,7 +3883,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbr

/* Add the Expect header if not already there. */
if (((val = apr_table_get(r->headers_in, "Expect")) == NULL)
- || (strcasecmp(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");
}
@@ -3948,15 +3948,15 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbr
|| headers_in[counter].val == NULL

/* Already sent */
- || !strcasecmp(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
*/
- || !strcasecmp(headers_in[counter].key, "Keep-Alive")
- || !strcasecmp(headers_in[counter].key, "TE")
- || !strcasecmp(headers_in[counter].key, "Trailer")
- || !strcasecmp(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;
@@ -3966,7 +3966,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbr
* If we have used it then MAYBE: RFC2616 says we MAY propagate it.
* So let's make it configurable by env.
*/
- if (!strcasecmp(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;
@@ -3976,22 +3976,22 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbr

/* Skip Transfer-Encoding and Content-Length for now.
*/
- if (!strcasecmp(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 (!strcasecmp(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 ( !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")) {
+ 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;
}
}
@@ -4342,7 +4342,7 @@ PROXY_DECLARE(apr_port_t) ap_proxy_port_
} else {
proxy_schemes_t *pscheme;
for (pscheme = pschemes; pscheme->name != NULL; ++pscheme) {
- if (strcasecmp(scheme, pscheme->name) == 0) {
+ if (ap_cstr_casecmp(scheme, pscheme->name) == 0) {
return pscheme->default_port;
}
}

Modified: httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_ocsp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_ocsp.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_ocsp.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_ocsp.c Tue Jan 19 19:29:43 2021
@@ -86,7 +86,7 @@ static apr_uri_t *determine_responder_ur
return NULL;
}

- if (strcasecmp(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;

Modified: httpd/httpd/branches/2.4.x/server/config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/config.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/config.c (original)
+++ httpd/httpd/branches/2.4.x/server/config.c Tue Jan 19 19:29:43 2021
@@ -1037,11 +1037,11 @@ static const char *invoke_cmd(const comm
*/
w = ap_getword_conf(parms->temp_pool, &args);

- if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(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, strcasecmp(w, "off") != 0);
+ return cmd->AP_FLAG(parms, mconfig, ap_cstr_casecmp(w, "off") != 0);

default:
return apr_pstrcat(parms->pool, cmd->name,
@@ -1054,7 +1054,7 @@ AP_CORE_DECLARE(const command_rec *) ap_
const command_rec *cmds)
{
while (cmds->name) {
- if (!strcasecmp(name, cmds->name))
+ if (!ap_cstr_casecmp(name, cmds->name))
return cmds;

++cmds;
@@ -1223,7 +1223,7 @@ static const char *ap_build_config_sub(a

*bracket = '\0';

- if (strcasecmp(cmd_name + 2,
+ if (ap_cstr_casecmp(cmd_name + 2,
(*curr_parent)->directive + 1) != 0) {
parms->err_directive = newdir;
return apr_pstrcat(p, "Expected </",
@@ -1270,7 +1270,7 @@ AP_DECLARE(const char *) ap_build_cont_c
while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, max_len))
== APR_SUCCESS) {
if (!memcmp(vb.buf, "</", 2)
- && (strcasecmp(vb.buf + 2, bracket) == 0)
+ && (ap_cstr_casecmp(vb.buf + 2, bracket) == 0)
&& (*curr_parent == NULL)) {
break;
}
@@ -1647,7 +1647,7 @@ AP_DECLARE(const char *) ap_soak_end_con
if (cmd_name[1] == '/') {
cmd_name[strlen(cmd_name) - 1] = '\0';

- if (strcasecmp(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);
@@ -2536,7 +2536,7 @@ static int count_directives_sub(const ch
while (current != NULL) {
if (current->first_child != NULL)
count += count_directives_sub(directive, current->first_child);
- if (strcasecmp(current->directive, directive) == 0)
+ if (ap_cstr_casecmp(current->directive, directive) == 0)
count++;
current = current->next;
}