Mailing List Archive

svn commit: r1885697 [2/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/
Modified: httpd/httpd/branches/2.4.x/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/core.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/core.c (original)
+++ httpd/httpd/branches/2.4.x/server/core.c Tue Jan 19 19:29:43 2021
@@ -1268,7 +1268,7 @@ static const ap_directive_t * find_paren
dirp = dirp->parent;

/* ### it would be nice to have atom-ized directives */
- if (strcasecmp(dirp->directive, what) == 0)
+ if (ap_cstr_casecmp(dirp->directive, what) == 0)
return dirp;
}

@@ -1564,10 +1564,10 @@ static const char *set_add_default_chars
{
core_dir_config *d = d_;

- if (!strcasecmp(arg, "Off")) {
+ if (!ap_cstr_casecmp(arg, "Off")) {
d->add_default_charset = ADD_DEFAULT_CHARSET_OFF;
}
- else if (!strcasecmp(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;
}
@@ -1684,7 +1684,7 @@ static const char *set_error_document(cm
conf->response_code_exprs = apr_hash_make(cmd->pool);
}

- if (strcasecmp(msg, "default") == 0) {
+ if (ap_cstr_casecmp(msg, "default") == 0) {
/* special case: ErrorDocument 404 default restores the
* canned server error response
*/
@@ -1740,36 +1740,36 @@ static const char *set_allow_opts(cmd_pa
first = 0;
}

- if (!strcasecmp(w, "Indexes")) {
+ if (!ap_cstr_casecmp(w, "Indexes")) {
opt = OPT_INDEXES;
}
- else if (!strcasecmp(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 (!strcasecmp(w, "IncludesNOEXEC")) {
+ else if (!ap_cstr_casecmp(w, "IncludesNOEXEC")) {
opt = OPT_INCLUDES;
}
- else if (!strcasecmp(w, "FollowSymLinks")) {
+ else if (!ap_cstr_casecmp(w, "FollowSymLinks")) {
opt = OPT_SYM_LINKS;
}
- else if (!strcasecmp(w, "SymLinksIfOwnerMatch")) {
+ else if (!ap_cstr_casecmp(w, "SymLinksIfOwnerMatch")) {
opt = OPT_SYM_OWNER;
}
- else if (!strcasecmp(w, "ExecCGI")) {
+ else if (!ap_cstr_casecmp(w, "ExecCGI")) {
opt = OPT_EXECCGI;
}
- else if (!strcasecmp(w, "MultiViews")) {
+ else if (!ap_cstr_casecmp(w, "MultiViews")) {
opt = OPT_MULTI;
}
- else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
+ else if (!ap_cstr_casecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
opt = OPT_MULTI|OPT_EXECCGI;
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_cstr_casecmp(w, "None")) {
opt = OPT_NONE;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_cstr_casecmp(w, "All")) {
opt = OPT_ALL;
}
else {
@@ -1810,43 +1810,43 @@ static const char *set_override(cmd_parm
*v++ = '\0';
}

- if (!strcasecmp(w, "Limit")) {
+ if (!ap_cstr_casecmp(w, "Limit")) {
d->override |= OR_LIMIT;
}
- else if (!strcasecmp(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 (!strcasecmp(w, "FileInfo")) {
+ else if (!ap_cstr_casecmp(w, "FileInfo")) {
d->override |= OR_FILEINFO;
}
- else if (!strcasecmp(w, "AuthConfig")) {
+ else if (!ap_cstr_casecmp(w, "AuthConfig")) {
d->override |= OR_AUTHCFG;
}
- else if (!strcasecmp(w, "Indexes")) {
+ else if (!ap_cstr_casecmp(w, "Indexes")) {
d->override |= OR_INDEXES;
}
- else if (!strcasecmp(w, "Nonfatal")) {
+ else if (!ap_cstr_casecmp(w, "Nonfatal")) {
if (!v) {
return apr_pstrcat(cmd->pool, "=Override, =Unknown or =All expected after ", w, NULL);
}
- else if (!strcasecmp(v, "Override")) {
+ else if (!ap_cstr_casecmp(v, "Override")) {
d->override |= NONFATAL_OVERRIDE;
}
- else if (!strcasecmp(v, "Unknown")) {
+ else if (!ap_cstr_casecmp(v, "Unknown")) {
d->override |= NONFATAL_UNKNOWN;
}
- else if (!strcasecmp(v, "All")) {
+ else if (!ap_cstr_casecmp(v, "All")) {
d->override |= NONFATAL_ALL;
}
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_cstr_casecmp(w, "None")) {
d->override = OR_NONE;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_cstr_casecmp(w, "All")) {
d->override = OR_ALL;
}
else {
@@ -1927,7 +1927,7 @@ static const char *set_override_list(cmd
d->override_list = apr_table_make(cmd->pool, argc);

for (i = 0; i < argc; i++) {
- if (!strcasecmp(argv[i], "None")) {
+ if (!ap_cstr_casecmp(argv[i], "None")) {
if (argc != 1) {
return "'None' not allowed with other directives in "
"AllowOverrideList";
@@ -1991,31 +1991,31 @@ static const char *set_options(cmd_parms
return "Either all Options must start with + or -, or no Option may.";
}

- if (!strcasecmp(w, "Indexes")) {
+ if (!ap_cstr_casecmp(w, "Indexes")) {
opt = OPT_INDEXES;
}
- else if (!strcasecmp(w, "Includes")) {
+ else if (!ap_cstr_casecmp(w, "Includes")) {
opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC);
}
- else if (!strcasecmp(w, "IncludesNOEXEC")) {
+ else if (!ap_cstr_casecmp(w, "IncludesNOEXEC")) {
opt = OPT_INCLUDES;
}
- else if (!strcasecmp(w, "FollowSymLinks")) {
+ else if (!ap_cstr_casecmp(w, "FollowSymLinks")) {
opt = OPT_SYM_LINKS;
}
- else if (!strcasecmp(w, "SymLinksIfOwnerMatch")) {
+ else if (!ap_cstr_casecmp(w, "SymLinksIfOwnerMatch")) {
opt = OPT_SYM_OWNER;
}
- else if (!strcasecmp(w, "ExecCGI")) {
+ else if (!ap_cstr_casecmp(w, "ExecCGI")) {
opt = OPT_EXECCGI;
}
- else if (!strcasecmp(w, "MultiViews")) {
+ else if (!ap_cstr_casecmp(w, "MultiViews")) {
opt = OPT_MULTI;
}
- else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
+ else if (!ap_cstr_casecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
opt = OPT_MULTI|OPT_EXECCGI;
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_cstr_casecmp(w, "None")) {
if (!first) {
return "'Options None' must be the first Option given.";
}
@@ -2025,7 +2025,7 @@ static const char *set_options(cmd_parms
opt = OPT_NONE;
all_none = 1;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_cstr_casecmp(w, "All")) {
if (!first) {
return "'Options All' must be the first option given.";
}
@@ -2066,7 +2066,7 @@ static const char *set_options(cmd_parms
static const char *set_default_type(cmd_parms *cmd, void *d_,
const char *arg)
{
- if ((strcasecmp(arg, "off") != 0) && (strcasecmp(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);
@@ -2136,7 +2136,7 @@ static const char *set_etag_bits(cmd_par
}
}

- if (strcasecmp(token, "None") == 0) {
+ if (ap_cstr_casecmp(token, "None") == 0) {
if (action != '*') {
valid = 0;
}
@@ -2145,7 +2145,7 @@ static const char *set_etag_bits(cmd_par
explicit = 1;
}
}
- else if (strcasecmp(token, "All") == 0) {
+ else if (ap_cstr_casecmp(token, "All") == 0) {
if (action != '*') {
valid = 0;
}
@@ -2154,15 +2154,15 @@ static const char *set_etag_bits(cmd_par
cfg->etag_bits = bit = ETAG_ALL;
}
}
- else if (strcasecmp(token, "Size") == 0) {
+ else if (ap_cstr_casecmp(token, "Size") == 0) {
bit = ETAG_SIZE;
}
- else if ((strcasecmp(token, "LMTime") == 0)
- || (strcasecmp(token, "MTime") == 0)
- || (strcasecmp(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 (strcasecmp(token, "INode") == 0) {
+ else if (ap_cstr_casecmp(token, "INode") == 0) {
bit = ETAG_INODE;
}
else {
@@ -2229,10 +2229,10 @@ static const char *set_enable_mmap(cmd_p
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
d->enable_mmap = ENABLE_MMAP_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
d->enable_mmap = ENABLE_MMAP_OFF;
}
else {
@@ -2247,10 +2247,10 @@ static const char *set_enable_sendfile(c
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
d->enable_sendfile = ENABLE_SENDFILE_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
d->enable_sendfile = ENABLE_SENDFILE_OFF;
}
else {
@@ -3163,13 +3163,13 @@ static const char *set_signature_flag(cm
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "On") == 0) {
+ if (ap_cstr_casecmp(arg, "On") == 0) {
d->server_signature = srv_sig_on;
}
- else if (strcasecmp(arg, "Off") == 0) {
+ else if (ap_cstr_casecmp(arg, "Off") == 0) {
d->server_signature = srv_sig_off;
}
- else if (strcasecmp(arg, "EMail") == 0) {
+ else if (ap_cstr_casecmp(arg, "EMail") == 0) {
d->server_signature = srv_sig_withmail;
}
else {
@@ -3231,13 +3231,13 @@ static const char *set_allow2f(cmd_parms
{
core_dir_config *d = d_;

- if (0 == strcasecmp(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 == strcasecmp(arg, "off")) {
+ } else if (0 == ap_cstr_casecmp(arg, "off")) {
d->allow_encoded_slashes = 0;
d->decode_encoded_slashes = 0;
- } else if (0 == strcasecmp(arg, "nodecode")) {
+ } else if (0 == ap_cstr_casecmp(arg, "nodecode")) {
d->allow_encoded_slashes = 1;
d->decode_encoded_slashes = 0;
} else {
@@ -3253,13 +3253,13 @@ static const char *set_hostname_lookups(
{
core_dir_config *d = d_;

- if (!strcasecmp(arg, "on")) {
+ if (!ap_cstr_casecmp(arg, "on")) {
d->hostname_lookups = HOSTNAME_LOOKUP_ON;
}
- else if (!strcasecmp(arg, "off")) {
+ else if (!ap_cstr_casecmp(arg, "off")) {
d->hostname_lookups = HOSTNAME_LOOKUP_OFF;
}
- else if (!strcasecmp(arg, "double")) {
+ else if (!ap_cstr_casecmp(arg, "double")) {
d->hostname_lookups = HOSTNAME_LOOKUP_DOUBLE;
}
else {
@@ -3295,13 +3295,13 @@ static const char *set_accept_path_info(
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
d->accept_path_info = AP_REQ_ACCEPT_PATH_INFO;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
d->accept_path_info = AP_REQ_REJECT_PATH_INFO;
}
- else if (strcasecmp(arg, "default") == 0) {
+ else if (ap_cstr_casecmp(arg, "default") == 0) {
d->accept_path_info = AP_REQ_DEFAULT_PATH_INFO;
}
else {
@@ -3316,13 +3316,13 @@ static const char *set_use_canonical_nam
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_OFF;
}
- else if (strcasecmp(arg, "dns") == 0) {
+ else if (ap_cstr_casecmp(arg, "dns") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_DNS;
}
else {
@@ -3337,10 +3337,10 @@ static const char *set_use_canonical_phy
{
core_dir_config *d = d_;

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_OFF;
}
else {
@@ -3636,22 +3636,22 @@ static const char *set_serv_tokens(cmd_p
return err;
}

- if (!strcasecmp(arg, "OS")) {
+ if (!ap_cstr_casecmp(arg, "OS")) {
ap_server_tokens = SrvTk_OS;
}
- else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
+ else if (!ap_cstr_casecmp(arg, "Min") || !ap_cstr_casecmp(arg, "Minimal")) {
ap_server_tokens = SrvTk_MINIMAL;
}
- else if (!strcasecmp(arg, "Major")) {
+ else if (!ap_cstr_casecmp(arg, "Major")) {
ap_server_tokens = SrvTk_MAJOR;
}
- else if (!strcasecmp(arg, "Minor") ) {
+ else if (!ap_cstr_casecmp(arg, "Minor") ) {
ap_server_tokens = SrvTk_MINOR;
}
- else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
+ else if (!ap_cstr_casecmp(arg, "Prod") || !ap_cstr_casecmp(arg, "ProductOnly")) {
ap_server_tokens = SrvTk_PRODUCT_ONLY;
}
- else if (!strcasecmp(arg, "Full")) {
+ else if (!ap_cstr_casecmp(arg, "Full")) {
ap_server_tokens = SrvTk_FULL;
}
else {
@@ -3756,13 +3756,13 @@ static const char *set_max_ranges(cmd_pa
core_dir_config *conf = conf_;
int val = 0;

- if (!strcasecmp(arg, "none")) {
+ if (!ap_cstr_casecmp(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_cstr_casecmp(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_cstr_casecmp(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
@@ -3782,13 +3782,13 @@ static const char *set_max_overlaps(cmd_
core_dir_config *conf = conf_;
int val = 0;

- if (!strcasecmp(arg, "none")) {
+ if (!ap_cstr_casecmp(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_cstr_casecmp(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_cstr_casecmp(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
@@ -3808,13 +3808,13 @@ static const char *set_max_reversals(cmd
core_dir_config *conf = conf_;
int val = 0;

- if (!strcasecmp(arg, "none")) {
+ if (!ap_cstr_casecmp(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_cstr_casecmp(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_cstr_casecmp(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
@@ -4020,13 +4020,13 @@ static const char *set_trace_enable(cmd_
core_server_config *conf =
ap_get_core_module_config(cmd->server->module_config);

- if (strcasecmp(arg1, "on") == 0) {
+ if (ap_cstr_casecmp(arg1, "on") == 0) {
conf->trace_enable = AP_TRACE_ENABLE;
}
- else if (strcasecmp(arg1, "off") == 0) {
+ else if (ap_cstr_casecmp(arg1, "off") == 0) {
conf->trace_enable = AP_TRACE_DISABLE;
}
- else if (strcasecmp(arg1, "extended") == 0) {
+ else if (ap_cstr_casecmp(arg1, "extended") == 0) {
conf->trace_enable = AP_TRACE_EXTENDED;
}
else {
@@ -4065,10 +4065,10 @@ static const char *set_protocols_honor_o
return err;
}

- if (strcasecmp(arg, "on") == 0) {
+ if (ap_cstr_casecmp(arg, "on") == 0) {
conf->protocols_honor_order = 1;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_cstr_casecmp(arg, "off") == 0) {
conf->protocols_honor_order = 0;
}
else {
@@ -4338,7 +4338,7 @@ static const char *set_errorlog_format(c
conf->error_log_format = parse_errorlog_string(cmd->pool, arg1,
&err_string, 1);
}
- else if (!strcasecmp(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 *));
@@ -4350,7 +4350,7 @@ static const char *set_errorlog_format(c
*e = parse_errorlog_string(cmd->pool, arg2, &err_string, 0);
}
}
- else if (!strcasecmp(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 *));

Modified: httpd/httpd/branches/2.4.x/server/mpm_unix.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/mpm_unix.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/mpm_unix.c (original)
+++ httpd/httpd/branches/2.4.x/server/mpm_unix.c Tue Jan 19 19:29:43 2021
@@ -638,7 +638,7 @@ static apr_status_t dummy_connection(ap_
* 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 && strcasecmp(lp->protocol, "http") != 0) {
+ while (lp && lp->protocol && ap_cstr_casecmp(lp->protocol, "http") != 0) {
lp = lp->next;
}
if (!lp) {
@@ -686,7 +686,7 @@ static apr_status_t dummy_connection(ap_
return rv;
}

- if (lp->protocol && strcasecmp(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

Modified: httpd/httpd/branches/2.4.x/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/protocol.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/protocol.c (original)
+++ httpd/httpd/branches/2.4.x/server/protocol.c Tue Jan 19 19:29:43 2021
@@ -601,7 +601,7 @@ AP_CORE_DECLARE(void) ap_parse_uri(reque
if (status == APR_SUCCESS) {
/* if it has a scheme we may need to do absoluteURI vhost stuff */
if (r->parsed_uri.scheme
- && !strcasecmp(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) {
@@ -1498,7 +1498,7 @@ request_rec *ap_read_request(conn_rec *c
* unfortunately, to signal a poor man's mandatory extension that
* the server must understand or return 417 Expectation Failed.
*/
- if (strcasecmp(expect, "100-continue") == 0) {
+ if (ap_cstr_casecmp(expect, "100-continue") == 0) {
r->expecting_100 = 1;
}
else {
@@ -1651,7 +1651,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(req
: "Authorization");
const char *t;

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

if (!ap_auth_name(r)) {
@@ -1665,7 +1665,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(req
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_INFO, 0, r, APLOGNO(00573)
"client used wrong authentication scheme: %s", r->uri);

Modified: httpd/httpd/branches/2.4.x/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util.c (original)
+++ httpd/httpd/branches/2.4.x/server/util.c Tue Jan 19 19:29:43 2021
@@ -941,7 +941,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfil

if (finfo.filetype != APR_REG &&
#if defined(WIN32) || defined(OS2) || defined(NETWARE)
- strcasecmp(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 */
@@ -1698,7 +1698,7 @@ AP_DECLARE(int) ap_find_token(apr_pool_t
while (*s && !TEST_CHAR(*s, T_HTTP_TOKEN_STOP)) {
++s;
}
- if (!strncasecmp((const char *)start_token, (const char *)tok,
+ if (!ap_cstr_casecmpn((const char *)start_token, (const char *)tok,
s - start_token)) {
return 1;
}
@@ -2712,7 +2712,7 @@ AP_DECLARE(int) ap_parse_form_data(reque

/* sanity check - we only support forms for now */
ct = apr_table_get(r->headers_in, "Content-Type");
- if (!ct || strncasecmp("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);
}


Modified: httpd/httpd/branches/2.4.x/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_expr_eval.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_expr_eval.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_expr_eval.c Tue Jan 19 19:29:43 2021
@@ -1706,7 +1706,7 @@ static int core_expr_lookup(ap_expr_look
while (prov->func) {
const char **name = prov->names;
while (*name) {
- if (strcasecmp(*name, parms->name) == 0) {
+ if (ap_cstr_casecmp(*name, parms->name) == 0) {
*parms->func = prov->func;
*parms->data = name;
return OK;
@@ -1739,7 +1739,7 @@ static int core_expr_lookup(ap_expr_look
if (parms->type == AP_EXPR_FUNC_OP_UNARY)
match = !strcmp(prov->name, parms->name);
else
- match = !strcasecmp(prov->name, parms->name);
+ match = !ap_cstr_casecmp(prov->name, parms->name);
if (match) {
if ((parms->flags & AP_EXPR_FLAG_RESTRICTED)
&& prov->restricted) {

Modified: httpd/httpd/branches/2.4.x/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_script.c?rev=1885697&r1=1885696&r2=1885697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_script.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_script.c Tue Jan 19 19:29:43 2021
@@ -180,10 +180,10 @@ AP_DECLARE(void) ap_add_common_vars(requ
* for no particular reason.
*/

- if (!strcasecmp(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 (!strcasecmp(hdrs[i].key, "Content-length")) {
+ else if (!ap_cstr_casecmp(hdrs[i].key, "Content-length")) {
apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
}
/* HTTP_PROXY collides with a popular envvar used to configure
@@ -200,8 +200,8 @@ AP_DECLARE(void) ap_add_common_vars(requ
* in the environment with "ps -e". But, if you must...
*/
#ifndef SECURITY_HOLE_PASS_AUTHORIZATION
- else if (!strcasecmp(hdrs[i].key, "Authorization")
- || !strcasecmp(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);
}
@@ -620,7 +620,7 @@ AP_DECLARE(int) ap_scan_script_header_er
++l;
}

- if (!strcasecmp(w, "Content-type")) {
+ if (!ap_cstr_casecmp(w, "Content-type")) {
char *tmp;

/* Nuke trailing whitespace */
@@ -638,7 +638,7 @@ AP_DECLARE(int) ap_scan_script_header_er
* If the script returned a specific status, that's what
* we'll use - otherwise we assume 200 OK.
*/
- else if (!strcasecmp(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 */
@@ -652,26 +652,26 @@ AP_DECLARE(int) ap_scan_script_header_er
apr_filepath_name_get(r->filename), l);
r->status_line = apr_pstrdup(r->pool, l);
}
- else if (!strcasecmp(w, "Location")) {
+ else if (!ap_cstr_casecmp(w, "Location")) {
apr_table_set(r->headers_out, w, l);
}
- else if (!strcasecmp(w, "Content-Length")) {
+ else if (!ap_cstr_casecmp(w, "Content-Length")) {
apr_table_set(r->headers_out, w, l);
}
- else if (!strcasecmp(w, "Content-Range")) {
+ else if (!ap_cstr_casecmp(w, "Content-Range")) {
apr_table_set(r->headers_out, w, l);
}
- else if (!strcasecmp(w, "Transfer-Encoding")) {
+ else if (!ap_cstr_casecmp(w, "Transfer-Encoding")) {
apr_table_set(r->headers_out, w, l);
}
- else if (!strcasecmp(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 or invalid values.
*/
- else if (!strcasecmp(w, "Last-Modified")) {
+ else if (!ap_cstr_casecmp(w, "Last-Modified")) {
apr_time_t parsed_date = apr_date_parse_http(l);
if (parsed_date != APR_DATE_BAD) {
ap_update_mtime(r, parsed_date);
@@ -718,7 +718,7 @@ AP_DECLARE(int) ap_scan_script_header_er
"Ignored invalid header value: Last-Modified: '%s'", l);
}
}
- else if (!strcasecmp(w, "Set-Cookie")) {
+ else if (!ap_cstr_casecmp(w, "Set-Cookie")) {
apr_table_add(cookie_table, w, l);
}
else {