You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2015/12/29 16:32:28 UTC
svn commit: r1722150 - in /httpd/httpd/trunk: modules/filters/
modules/generators/ modules/loggers/ modules/mappers/ modules/proxy/
modules/slotmem/ server/
Author: ylavic
Date: Tue Dec 29 15:32:27 2015
New Revision: 1722150
URL: http://svn.apache.org/viewvc?rev=1722150&view=rev
Log:
Follow up to r1715880: revert more abusive ap_casecmpstr[n]() usages.
Modified:
httpd/httpd/trunk/modules/filters/mod_include.c
httpd/httpd/trunk/modules/generators/mod_cgi.c
httpd/httpd/trunk/modules/generators/mod_cgid.c
httpd/httpd/trunk/modules/loggers/mod_log_config.c
httpd/httpd/trunk/modules/mappers/mod_rewrite.c
httpd/httpd/trunk/modules/proxy/mod_proxy.c
httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
httpd/httpd/trunk/server/util_expr_eval.c
Modified: httpd/httpd/trunk/modules/filters/mod_include.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_include.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_include.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_include.c Tue Dec 29 15:32:27 2015
@@ -620,16 +620,16 @@ static void add_include_vars(request_rec
static const char *add_include_vars_lazy(request_rec *r, const char *var, const char *timefmt)
{
char *val;
- if (!ap_casecmpstr(var, "DATE_LOCAL")) {
+ if (!strcasecmp(var, "DATE_LOCAL")) {
val = ap_ht_time(r->pool, r->request_time, timefmt, 0);
}
- else if (!ap_casecmpstr(var, "DATE_GMT")) {
+ else if (!strcasecmp(var, "DATE_GMT")) {
val = ap_ht_time(r->pool, r->request_time, timefmt, 1);
}
- else if (!ap_casecmpstr(var, "LAST_MODIFIED")) {
+ else if (!strcasecmp(var, "LAST_MODIFIED")) {
val = ap_ht_time(r->pool, r->finfo.mtime, timefmt, 0);
}
- else if (!ap_casecmpstr(var, "USER_NAME")) {
+ else if (!strcasecmp(var, "USER_NAME")) {
if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
val = "<unknown>";
}
@@ -714,9 +714,9 @@ static int include_expr_lookup(ap_expr_l
{
switch (parms->type) {
case AP_EXPR_FUNC_STRING:
- if (ap_casecmpstr(parms->name, "v") == 0 ||
- ap_casecmpstr(parms->name, "reqenv") == 0 ||
- ap_casecmpstr(parms->name, "env") == 0) {
+ if (strcasecmp(parms->name, "v") == 0 ||
+ strcasecmp(parms->name, "reqenv") == 0 ||
+ strcasecmp(parms->name, "env") == 0) {
*parms->func = include_expr_var_fn;
*parms->data = parms->name;
return OK;
Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Tue Dec 29 15:32:27 2015
@@ -78,7 +78,7 @@ static void discard_script_output(apr_bu
static int is_scriptaliased(request_rec *r)
{
const char *t = apr_table_get(r->notes, "alias-forced-type");
- return t && (!ap_casecmpstr(t, "cgi-script"));
+ return t && (!strcasecmp(t, "cgi-script"));
}
/* Configuration stuff */
Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Tue Dec 29 15:32:27 2015
@@ -131,7 +131,7 @@ static ap_unix_identity_t *cgid_suexec_i
static int is_scriptaliased(request_rec *r)
{
const char *t = apr_table_get(r->notes, "alias-forced-type");
- return t && (!ap_casecmpstr(t, "cgi-script"));
+ return t && (!strcasecmp(t, "cgi-script"));
}
/* Configuration stuff */
Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Tue Dec 29 15:32:27 2015
@@ -808,13 +808,13 @@ static const char *log_request_duration_
static const char *log_request_duration_scaled(request_rec *r, char *a)
{
apr_time_t duration = get_request_end_time(r) - r->request_time;
- if (*a == '\0' || !ap_casecmpstr(a, "s")) {
+ if (*a == '\0' || !strcasecmp(a, "s")) {
duration = apr_time_sec(duration);
}
- else if (!ap_casecmpstr(a, "ms")) {
+ else if (!strcasecmp(a, "ms")) {
duration = apr_time_as_msec(duration);
}
- else if (!ap_casecmpstr(a, "us")) {
+ else if (!strcasecmp(a, "us")) {
}
else {
/* bogus format */
@@ -835,13 +835,13 @@ static const char *log_server_port(reque
{
apr_port_t port;
- if (*a == '\0' || !ap_casecmpstr(a, "canonical")) {
+ if (*a == '\0' || !strcasecmp(a, "canonical")) {
port = r->server->port ? r->server->port : ap_default_port(r);
}
- else if (!ap_casecmpstr(a, "remote")) {
+ else if (!strcasecmp(a, "remote")) {
port = r->useragent_addr->port;
}
- else if (!ap_casecmpstr(a, "local")) {
+ else if (!strcasecmp(a, "local")) {
port = r->connection->local_addr->port;
}
else {
@@ -861,10 +861,10 @@ static const char *log_server_name(reque
static const char *log_pid_tid(request_rec *r, char *a)
{
- if (*a == '\0' || !ap_casecmpstr(a, "pid")) {
+ if (*a == '\0' || !strcasecmp(a, "pid")) {
return ap_append_pid(r->pool, "", "");
}
- else if (!ap_casecmpstr(a, "tid") || !ap_casecmpstr(a, "hextid")) {
+ else if (!strcasecmp(a, "tid") || !strcasecmp(a, "hextid")) {
#if APR_HAS_THREADS
apr_os_thread_t tid = apr_os_thread_current();
#else
@@ -1335,14 +1335,14 @@ static const char *add_custom_log(cmd_pa
cls->condition_var = NULL;
cls->condition_expr = NULL;
if (envclause != NULL) {
- if (ap_casecmpstrn(envclause, "env=", 4) == 0) {
+ if (strncasecmp(envclause, "env=", 4) == 0) {
if ((envclause[4] == '\0')
|| ((envclause[4] == '!') && (envclause[5] == '\0'))) {
return "missing environment variable name";
}
cls->condition_var = apr_pstrdup(cmd->pool, &envclause[4]);
}
- else if (ap_casecmpstrn(envclause, "expr=", 5) == 0) {
+ else if (strncasecmp(envclause, "expr=", 5) == 0) {
const char *err;
if ((envclause[5] == '\0'))
return "missing condition";
Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Tue Dec 29 15:32:27 2015
@@ -1576,7 +1576,7 @@ static char *lookup_map_program(request_
}
/* catch the "failed" case */
- if (i == 4 && !ap_casecmpstr(buf, "NULL")) {
+ if (i == 4 && !strcasecmp(buf, "NULL")) {
return NULL;
}
@@ -1829,7 +1829,7 @@ static char *lookup_variable(char *var,
/* fast tests for variable length variables (sic) first */
if (var[3] == ':') {
- if (var[4] && !ap_casecmpstrn(var, "ENV", 3)) {
+ if (var[4] && !strncasecmp(var, "ENV", 3)) {
var += 4;
result = apr_table_get(r->notes, var);
@@ -1840,7 +1840,7 @@ static char *lookup_variable(char *var,
result = getenv(var);
}
}
- else if (var[4] && !ap_casecmpstrn(var, "SSL", 3) && rewrite_ssl_lookup) {
+ else if (var[4] && !strncasecmp(var, "SSL", 3) && rewrite_ssl_lookup) {
result = rewrite_ssl_lookup(r->pool, r->server, r->connection, r,
var + 4);
}
@@ -1850,10 +1850,10 @@ static char *lookup_variable(char *var,
request_rec *rr;
const char *path;
- if (!ap_casecmpstrn(var, "HTTP", 4)) {
+ if (!strncasecmp(var, "HTTP", 4)) {
result = lookup_header(var+5, ctx);
}
- else if (!ap_casecmpstrn(var, "LA-U", 4)) {
+ else if (!strncasecmp(var, "LA-U", 4)) {
if (ctx->uri && subreq_ok(r)) {
path = ctx->perdir ? la_u(ctx) : ctx->uri;
rr = ap_sub_req_lookup_uri(path, r, NULL);
@@ -1868,7 +1868,7 @@ static char *lookup_variable(char *var,
return (char *)result;
}
}
- else if (!ap_casecmpstrn(var, "LA-F", 4)) {
+ else if (!strncasecmp(var, "LA-F", 4)) {
if (ctx->uri && subreq_ok(r)) {
path = ctx->uri;
if (ctx->perdir && *path == '/') {
@@ -3477,13 +3477,13 @@ static const char *cmd_rewriterule_setfl
switch (*key++) {
case 'b':
case 'B':
- if (!*key || !ap_casecmpstr(key, "ackrefescaping")) {
+ if (!*key || !strcasecmp(key, "ackrefescaping")) {
cfg->flags |= RULEFLAG_ESCAPEBACKREF;
if (val && *val) {
cfg->escapes = val;
}
}
- else if (!ap_casecmpstr(key, "NP") || !ap_casecmpstr(key, "ackrefernoplus")) {
+ else if (!strcasecmp(key, "NP") || !strcasecmp(key, "ackrefernoplus")) {
cfg->flags |= RULEFLAG_ESCAPENOPLUS;
}
else {
@@ -3492,11 +3492,11 @@ static const char *cmd_rewriterule_setfl
break;
case 'c':
case 'C':
- if (!*key || !ap_casecmpstr(key, "hain")) { /* chain */
+ if (!*key || !strcasecmp(key, "hain")) { /* chain */
cfg->flags |= RULEFLAG_CHAIN;
}
else if (((*key == 'O' || *key == 'o') && !key[1])
- || !ap_casecmpstr(key, "ookie")) { /* cookie */
+ || !strcasecmp(key, "ookie")) { /* cookie */
data_item *cp = cfg->cookie;
if (!cp) {
@@ -3519,13 +3519,13 @@ static const char *cmd_rewriterule_setfl
break;
case 'd':
case 'D':
- if (!*key || !ap_casecmpstr(key, "PI") || !ap_casecmpstr(key,"iscardpath")) {
+ if (!*key || !strcasecmp(key, "PI") || !strcasecmp(key,"iscardpath")) {
cfg->flags |= (RULEFLAG_DISCARDPATHINFO);
}
break;
case 'e':
case 'E':
- if (!*key || !ap_casecmpstr(key, "nv")) { /* env */
+ if (!*key || !strcasecmp(key, "nv")) { /* env */
data_item *cp = cfg->env;
if (!cp) {
@@ -3542,7 +3542,7 @@ static const char *cmd_rewriterule_setfl
cp->next = NULL;
cp->data = val;
}
- else if (!ap_casecmpstr(key, "nd")) { /* end */
+ else if (!strcasecmp(key, "nd")) { /* end */
cfg->flags |= RULEFLAG_END;
}
else {
@@ -3552,7 +3552,7 @@ static const char *cmd_rewriterule_setfl
case 'f':
case 'F':
- if (!*key || !ap_casecmpstr(key, "orbidden")) { /* forbidden */
+ if (!*key || !strcasecmp(key, "orbidden")) { /* forbidden */
cfg->flags |= (RULEFLAG_STATUS | RULEFLAG_NOSUB);
cfg->forced_responsecode = HTTP_FORBIDDEN;
}
@@ -3563,7 +3563,7 @@ static const char *cmd_rewriterule_setfl
case 'g':
case 'G':
- if (!*key || !ap_casecmpstr(key, "one")) { /* gone */
+ if (!*key || !strcasecmp(key, "one")) { /* gone */
cfg->flags |= (RULEFLAG_STATUS | RULEFLAG_NOSUB);
cfg->forced_responsecode = HTTP_GONE;
}
@@ -3574,7 +3574,7 @@ static const char *cmd_rewriterule_setfl
case 'h':
case 'H':
- if (!*key || !ap_casecmpstr(key, "andler")) { /* handler */
+ if (!*key || !strcasecmp(key, "andler")) { /* handler */
cfg->forced_handler = val;
}
else {
@@ -3583,7 +3583,7 @@ static const char *cmd_rewriterule_setfl
break;
case 'l':
case 'L':
- if (!*key || !ap_casecmpstr(key, "ast")) { /* last */
+ if (!*key || !strcasecmp(key, "ast")) { /* last */
cfg->flags |= RULEFLAG_LASTRULE;
}
else {
@@ -3594,10 +3594,10 @@ static const char *cmd_rewriterule_setfl
case 'n':
case 'N':
if (((*key == 'E' || *key == 'e') && !key[1])
- || !ap_casecmpstr(key, "oescape")) { /* noescape */
+ || !strcasecmp(key, "oescape")) { /* noescape */
cfg->flags |= RULEFLAG_NOESCAPE;
}
- else if (!*key || !ap_casecmpstr(key, "ext")) { /* next */
+ else if (!*key || !strcasecmp(key, "ext")) { /* next */
cfg->flags |= RULEFLAG_NEWROUND;
if (val && *val) {
cfg->maxrounds = atoi(val);
@@ -3605,11 +3605,11 @@ static const char *cmd_rewriterule_setfl
}
else if (((*key == 'S' || *key == 's') && !key[1])
- || !ap_casecmpstr(key, "osubreq")) { /* nosubreq */
+ || !strcasecmp(key, "osubreq")) { /* nosubreq */
cfg->flags |= RULEFLAG_IGNOREONSUBREQ;
}
else if (((*key == 'C' || *key == 'c') && !key[1])
- || !ap_casecmpstr(key, "ocase")) { /* nocase */
+ || !strcasecmp(key, "ocase")) { /* nocase */
cfg->flags |= RULEFLAG_NOCASE;
}
else {
@@ -3619,11 +3619,11 @@ static const char *cmd_rewriterule_setfl
case 'p':
case 'P':
- if (!*key || !ap_casecmpstr(key, "roxy")) { /* proxy */
+ if (!*key || !strcasecmp(key, "roxy")) { /* proxy */
cfg->flags |= RULEFLAG_PROXY;
}
else if (((*key == 'T' || *key == 't') && !key[1])
- || !ap_casecmpstr(key, "assthrough")) { /* passthrough */
+ || !strcasecmp(key, "assthrough")) { /* passthrough */
cfg->flags |= RULEFLAG_PASSTHROUGH;
}
else {
@@ -3633,11 +3633,11 @@ static const char *cmd_rewriterule_setfl
case 'q':
case 'Q':
- if ( !ap_casecmpstr(key, "SA")
- || !ap_casecmpstr(key, "sappend")) { /* qsappend */
+ if ( !strcasecmp(key, "SA")
+ || !strcasecmp(key, "sappend")) { /* qsappend */
cfg->flags |= RULEFLAG_QSAPPEND;
- } else if ( !ap_casecmpstr(key, "SD")
- || !ap_casecmpstr(key, "sdiscard") ) { /* qsdiscard */
+ } else if ( !strcasecmp(key, "SD")
+ || !strcasecmp(key, "sdiscard") ) { /* qsdiscard */
cfg->flags |= RULEFLAG_QSDISCARD;
}
else {
@@ -3647,18 +3647,18 @@ static const char *cmd_rewriterule_setfl
case 'r':
case 'R':
- if (!*key || !ap_casecmpstr(key, "edirect")) { /* redirect */
+ if (!*key || !strcasecmp(key, "edirect")) { /* redirect */
int status = 0;
cfg->flags |= RULEFLAG_FORCEREDIRECT;
if (*val) {
- if (ap_casecmpstr(val, "permanent") == 0) {
+ if (strcasecmp(val, "permanent") == 0) {
status = HTTP_MOVED_PERMANENTLY;
}
- else if (ap_casecmpstr(val, "temp") == 0) {
+ else if (strcasecmp(val, "temp") == 0) {
status = HTTP_MOVED_TEMPORARILY;
}
- else if (ap_casecmpstr(val, "seeother") == 0) {
+ else if (strcasecmp(val, "seeother") == 0) {
status = HTTP_SEE_OTHER;
}
else if (apr_isdigit(*val)) {
@@ -3688,7 +3688,7 @@ static const char *cmd_rewriterule_setfl
case 's':
case 'S':
- if (!*key || !ap_casecmpstr(key, "kip")) { /* skip */
+ if (!*key || !strcasecmp(key, "kip")) { /* skip */
cfg->skip = atoi(val);
}
else {
@@ -3698,7 +3698,7 @@ static const char *cmd_rewriterule_setfl
case 't':
case 'T':
- if (!*key || !ap_casecmpstr(key, "ype")) { /* type */
+ if (!*key || !strcasecmp(key, "ype")) { /* type */
cfg->forced_mimetype = val;
}
else {
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Tue Dec 29 15:32:27 2015
@@ -64,7 +64,7 @@ static const char *set_worker_param(apr_
int ival;
apr_interval_time_t timeout;
- if (!ap_casecmpstr(key, "loadfactor")) {
+ if (!strcasecmp(key, "loadfactor")) {
/* Normalized load factor. Used with BalancerMember,
* it is a number between 1 and 100.
*/
@@ -73,7 +73,7 @@ static const char *set_worker_param(apr_
return "LoadFactor must be a number between 1..100";
worker->s->lbfactor = ival;
}
- else if (!ap_casecmpstr(key, "retry")) {
+ else if (!strcasecmp(key, "retry")) {
/* If set it will give the retry timeout for the worker
* The default value is 60 seconds, meaning that if
* in error state, it will be retried after that timeout.
@@ -84,7 +84,7 @@ static const char *set_worker_param(apr_
worker->s->retry = apr_time_from_sec(ival);
worker->s->retry_set = 1;
}
- else if (!ap_casecmpstr(key, "ttl")) {
+ else if (!strcasecmp(key, "ttl")) {
/* Time in seconds that will destroy all the connections
* that exceed the smax
*/
@@ -93,7 +93,7 @@ static const char *set_worker_param(apr_
return "TTL must be at least one second";
worker->s->ttl = apr_time_from_sec(ival);
}
- else if (!ap_casecmpstr(key, "min")) {
+ else if (!strcasecmp(key, "min")) {
/* Initial number of connections to remote
*/
ival = atoi(val);
@@ -101,7 +101,7 @@ static const char *set_worker_param(apr_
return "Min must be a positive number";
worker->s->min = ival;
}
- else if (!ap_casecmpstr(key, "max")) {
+ else if (!strcasecmp(key, "max")) {
/* Maximum number of connections to remote
*/
ival = atoi(val);
@@ -110,7 +110,7 @@ static const char *set_worker_param(apr_
worker->s->hmax = ival;
}
/* XXX: More inteligent naming needed */
- else if (!ap_casecmpstr(key, "smax")) {
+ else if (!strcasecmp(key, "smax")) {
/* Maximum number of connections to remote that
* will not be destroyed
*/
@@ -119,7 +119,7 @@ static const char *set_worker_param(apr_
return "Smax must be a positive number";
worker->s->smax = ival;
}
- else if (!ap_casecmpstr(key, "acquire")) {
+ else if (!strcasecmp(key, "acquire")) {
/* Acquire timeout in given unit (default is milliseconds).
* If set this will be the maximum time to
* wait for a free connection.
@@ -131,7 +131,7 @@ static const char *set_worker_param(apr_
worker->s->acquire = timeout;
worker->s->acquire_set = 1;
}
- else if (!ap_casecmpstr(key, "timeout")) {
+ else if (!strcasecmp(key, "timeout")) {
/* Connection timeout in seconds.
* Defaults to server timeout.
*/
@@ -141,7 +141,7 @@ static const char *set_worker_param(apr_
worker->s->timeout = apr_time_from_sec(ival);
worker->s->timeout_set = 1;
}
- else if (!ap_casecmpstr(key, "iobuffersize")) {
+ else if (!strcasecmp(key, "iobuffersize")) {
long s = atol(val);
if (s < 512 && s) {
return "IOBufferSize must be >= 512 bytes, or 0 for system default.";
@@ -149,7 +149,7 @@ static const char *set_worker_param(apr_
worker->s->io_buffer_size = (s ? s : AP_IOBUFSIZE);
worker->s->io_buffer_size_set = 1;
}
- else if (!ap_casecmpstr(key, "receivebuffersize")) {
+ else if (!strcasecmp(key, "receivebuffersize")) {
ival = atoi(val);
if (ival < 512 && ival != 0) {
return "ReceiveBufferSize must be >= 512 bytes, or 0 for system default.";
@@ -157,34 +157,34 @@ static const char *set_worker_param(apr_
worker->s->recv_buffer_size = ival;
worker->s->recv_buffer_size_set = 1;
}
- else if (!ap_casecmpstr(key, "keepalive")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "keepalive")) {
+ if (!strcasecmp(val, "on"))
worker->s->keepalive = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
worker->s->keepalive = 0;
else
return "KeepAlive must be On|Off";
worker->s->keepalive_set = 1;
}
- else if (!ap_casecmpstr(key, "disablereuse")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "disablereuse")) {
+ if (!strcasecmp(val, "on"))
worker->s->disablereuse = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
worker->s->disablereuse = 0;
else
return "DisableReuse must be On|Off";
worker->s->disablereuse_set = 1;
}
- else if (!ap_casecmpstr(key, "enablereuse")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "enablereuse")) {
+ if (!strcasecmp(val, "on"))
worker->s->disablereuse = 0;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
worker->s->disablereuse = 1;
else
return "EnableReuse must be On|Off";
worker->s->disablereuse_set = 1;
}
- else if (!ap_casecmpstr(key, "route")) {
+ else if (!strcasecmp(key, "route")) {
/* Worker route.
*/
if (strlen(val) >= sizeof(worker->s->route))
@@ -192,7 +192,7 @@ static const char *set_worker_param(apr_
(int)sizeof(worker->s->route));
PROXY_STRNCPY(worker->s->route, val);
}
- else if (!ap_casecmpstr(key, "redirect")) {
+ else if (!strcasecmp(key, "redirect")) {
/* Worker redirection route.
*/
if (strlen(val) >= sizeof(worker->s->redirect))
@@ -200,7 +200,7 @@ static const char *set_worker_param(apr_
(int)sizeof(worker->s->redirect));
PROXY_STRNCPY(worker->s->redirect, val);
}
- else if (!ap_casecmpstr(key, "status")) {
+ else if (!strcasecmp(key, "status")) {
const char *v;
int mode = 1;
apr_status_t rv;
@@ -220,17 +220,17 @@ static const char *set_worker_param(apr_
return "Unknown status parameter option";
}
}
- else if (!ap_casecmpstr(key, "flushpackets")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "flushpackets")) {
+ if (!strcasecmp(val, "on"))
worker->s->flush_packets = flush_on;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
worker->s->flush_packets = flush_off;
- else if (!ap_casecmpstr(val, "auto"))
+ else if (!strcasecmp(val, "auto"))
worker->s->flush_packets = flush_auto;
else
return "flushpackets must be on|off|auto";
}
- else if (!ap_casecmpstr(key, "flushwait")) {
+ else if (!strcasecmp(key, "flushwait")) {
ival = atoi(val);
if (ival > 1000 || ival < 0) {
return "flushwait must be <= 1000, or 0 for system default of 10 millseconds.";
@@ -240,7 +240,7 @@ static const char *set_worker_param(apr_
else
worker->s->flush_wait = ival * 1000; /* change to microseconds */
}
- else if (!ap_casecmpstr(key, "ping")) {
+ else if (!strcasecmp(key, "ping")) {
/* Ping/Pong timeout in given unit (default is second).
*/
if (ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS)
@@ -250,13 +250,13 @@ static const char *set_worker_param(apr_
worker->s->ping_timeout = timeout;
worker->s->ping_timeout_set = 1;
}
- else if (!ap_casecmpstr(key, "lbset")) {
+ else if (!strcasecmp(key, "lbset")) {
ival = atoi(val);
if (ival < 0 || ival > 99)
return "lbset must be between 0 and 99";
worker->s->lbset = ival;
}
- else if (!ap_casecmpstr(key, "connectiontimeout")) {
+ else if (!strcasecmp(key, "connectiontimeout")) {
/* Request timeout in given unit (default is second).
* Defaults to connection timeout
*/
@@ -267,7 +267,7 @@ static const char *set_worker_param(apr_
worker->s->conn_timeout = timeout;
worker->s->conn_timeout_set = 1;
}
- else if (!ap_casecmpstr(key, "flusher")) {
+ else if (!strcasecmp(key, "flusher")) {
if (strlen(val) >= sizeof(worker->s->flusher))
apr_psprintf(p, "flusher name length must be < %d characters",
(int)sizeof(worker->s->flusher));
@@ -287,7 +287,7 @@ static const char *set_balancer_param(pr
{
int ival;
- if (!ap_casecmpstr(key, "stickysession")) {
+ if (!strcasecmp(key, "stickysession")) {
char *path;
/* Balancer sticky session name.
* Set to something like JSESSIONID or
@@ -304,12 +304,12 @@ static const char *set_balancer_param(pr
PROXY_STRNCPY(balancer->s->sticky_path, path);
}
}
- else if (!ap_casecmpstr(key, "stickysessionsep")) {
+ else if (!strcasecmp(key, "stickysessionsep")) {
/* separator/delimiter for sessionid and route,
* normally '.'
*/
if (strlen(val) != 1) {
- if (!ap_casecmpstr(val, "off"))
+ if (!strcasecmp(val, "off"))
balancer->s->sticky_separator = 0;
else
return "stickysessionsep must be a single character or Off";
@@ -318,20 +318,20 @@ static const char *set_balancer_param(pr
balancer->s->sticky_separator = *val;
balancer->s->sticky_separator_set = 1;
}
- else if (!ap_casecmpstr(key, "nofailover")) {
+ else if (!strcasecmp(key, "nofailover")) {
/* If set to 'on' the session will break
* if the worker is in error state or
* disabled.
*/
- if (!ap_casecmpstr(val, "on"))
+ if (!strcasecmp(val, "on"))
balancer->s->sticky_force = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
balancer->s->sticky_force = 0;
else
return "failover must be On|Off";
balancer->s->sticky_force_set = 1;
}
- else if (!ap_casecmpstr(key, "timeout")) {
+ else if (!strcasecmp(key, "timeout")) {
/* Balancer timeout in seconds.
* If set this will be the maximum time to
* wait for a free worker.
@@ -342,7 +342,7 @@ static const char *set_balancer_param(pr
return "timeout must be at least one second";
balancer->s->timeout = apr_time_from_sec(ival);
}
- else if (!ap_casecmpstr(key, "maxattempts")) {
+ else if (!strcasecmp(key, "maxattempts")) {
/* Maximum number of failover attempts before
* giving up.
*/
@@ -352,7 +352,7 @@ static const char *set_balancer_param(pr
balancer->s->max_attempts = ival;
balancer->s->max_attempts_set = 1;
}
- else if (!ap_casecmpstr(key, "lbmethod")) {
+ else if (!strcasecmp(key, "lbmethod")) {
proxy_balancer_method *provider;
if (strlen(val) > (sizeof(balancer->s->lbpname)-1))
return "unknown lbmethod";
@@ -369,20 +369,20 @@ static const char *set_balancer_param(pr
}
return "unknown lbmethod";
}
- else if (!ap_casecmpstr(key, "scolonpathdelim")) {
+ else if (!strcasecmp(key, "scolonpathdelim")) {
/* If set to 'on' then ';' will also be
* used as a session path separator/delim (ala
* mod_jk)
*/
- if (!ap_casecmpstr(val, "on"))
+ if (!strcasecmp(val, "on"))
balancer->s->scolonsep = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
balancer->s->scolonsep = 0;
else
return "scolonpathdelim must be On|Off";
balancer->s->scolonsep_set = 1;
}
- else if (!ap_casecmpstr(key, "failonstatus")) {
+ else if (!strcasecmp(key, "failonstatus")) {
char *val_split;
char *status;
char *tok_state;
@@ -404,17 +404,17 @@ static const char *set_balancer_param(pr
}
}
- else if (!ap_casecmpstr(key, "failontimeout")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "failontimeout")) {
+ if (!strcasecmp(val, "on"))
balancer->failontimeout = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
balancer->failontimeout = 0;
else
return "failontimeout must be On|Off";
balancer->failontimeout_set = 1;
}
- else if (!ap_casecmpstr(key, "nonce")) {
- if (!ap_casecmpstr(val, "None")) {
+ else if (!strcasecmp(key, "nonce")) {
+ if (!strcasecmp(val, "None")) {
*balancer->s->nonce = '\0';
}
else {
@@ -424,17 +424,17 @@ static const char *set_balancer_param(pr
}
balancer->s->nonce_set = 1;
}
- else if (!ap_casecmpstr(key, "growth")) {
+ else if (!strcasecmp(key, "growth")) {
ival = atoi(val);
if (ival < 1 || ival > 100) /* arbitrary limit here */
return "growth must be between 1 and 100";
balancer->growth = ival;
balancer->growth_set = 1;
}
- else if (!ap_casecmpstr(key, "forcerecovery")) {
- if (!ap_casecmpstr(val, "on"))
+ else if (!strcasecmp(key, "forcerecovery")) {
+ if (!strcasecmp(val, "on"))
balancer->s->forcerecovery = 1;
- else if (!ap_casecmpstr(val, "off"))
+ else if (!strcasecmp(val, "off"))
balancer->s->forcerecovery = 0;
else
return "forcerecovery must be On|Off";
Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Tue Dec 29 15:32:27 2015
@@ -111,7 +111,7 @@ static int slotmem_filenames(apr_pool_t
{
const char *fname = NULL, *pname = NULL;
- if (slotname && *slotname && ap_casecmpstr(slotname, "none") != 0) {
+ if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
if (slotname[0] != '/') {
#if !SLOTMEM_UNLINK_SEMANTIC
/* Each generation needs its own file name. */
Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1722150&r1=1722149&r2=1722150&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Tue Dec 29 15:32:27 2015
@@ -1710,13 +1710,13 @@ static int op_T(ap_expr_eval_ctx_t *ctx,
return FALSE;
case 'o':
case 'O':
- return ap_casecmpstr(arg, "off") == 0 ? FALSE : TRUE;
+ return strcasecmp(arg, "off") == 0 ? FALSE : TRUE;
case 'n':
case 'N':
- return ap_casecmpstr(arg, "no") == 0 ? FALSE : TRUE;
+ return strcasecmp(arg, "no") == 0 ? FALSE : TRUE;
case 'f':
case 'F':
- return ap_casecmpstr(arg, "false") == 0 ? FALSE : TRUE;
+ return strcasecmp(arg, "false") == 0 ? FALSE : TRUE;
case '0':
return arg[1] == '\0' ? FALSE : TRUE;
default: