|
 |
192ec7 |
diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc
|
|
 |
192ec7 |
index 4aa2c90..99b0bf9 100644
|
|
 |
192ec7 |
--- a/src/acl/Ip.cc
|
|
 |
192ec7 |
+++ b/src/acl/Ip.cc
|
|
 |
192ec7 |
@@ -221,7 +221,7 @@ acl_ip_data::FactoryParse(const char *t)
|
|
 |
192ec7 |
debugs(28, 5, "aclIpParseIpData: " << t);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
/* Special ACL RHS "all" matches entire Internet */
|
|
 |
192ec7 |
- if (strcmp(t, "all") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(t, "all") == 0) {
|
|
 |
192ec7 |
debugs(28, 9, "aclIpParseIpData: magic 'all' found.");
|
|
 |
192ec7 |
q->addr1.setAnyAddr();
|
|
 |
192ec7 |
q->addr2.setEmpty();
|
|
 |
192ec7 |
@@ -231,8 +231,8 @@ acl_ip_data::FactoryParse(const char *t)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
/* Detect some old broken strings equivalent to 'all'.
|
|
 |
192ec7 |
* treat them nicely. But be loud until its fixed. */
|
|
 |
192ec7 |
- if (strcmp(t, "0/0") == 0 || strcmp(t, "0.0.0.0/0") == 0 || strcmp(t, "0.0.0.0/0.0.0.0") == 0 ||
|
|
 |
192ec7 |
- strcmp(t, "0.0.0.0-255.255.255.255") == 0 || strcmp(t, "0.0.0.0-0.0.0.0/0") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(t, "0/0") == 0 || strcasecmp(t, "0.0.0.0/0") == 0 || strcasecmp(t, "0.0.0.0/0.0.0.0") == 0 ||
|
|
 |
192ec7 |
+ strcasecmp(t, "0.0.0.0-255.255.255.255") == 0 || strcasecmp(t, "0.0.0.0-0.0.0.0/0") == 0) {
|
|
 |
192ec7 |
|
|
 |
192ec7 |
debugs(28,DBG_CRITICAL, "ERROR: '" << t << "' needs to be replaced by the term 'all'.");
|
|
 |
192ec7 |
debugs(28,DBG_CRITICAL, "SECURITY NOTICE: Overriding config setting. Using 'all' instead.");
|
|
 |
192ec7 |
@@ -245,14 +245,14 @@ acl_ip_data::FactoryParse(const char *t)
|
|
 |
192ec7 |
/* Special ACL RHS "ipv4" matches IPv4 Internet
|
|
 |
192ec7 |
* A nod to IANA; we include the entire class space in case
|
|
 |
192ec7 |
* they manage to find a way to recover and use it */
|
|
 |
192ec7 |
- if (strcmp(t, "ipv4") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(t, "ipv4") == 0) {
|
|
 |
192ec7 |
q->mask.setNoAddr();
|
|
 |
192ec7 |
q->mask.applyMask(0, AF_INET);
|
|
 |
192ec7 |
return q;
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
|
|
 |
192ec7 |
/* Special ACL RHS "ipv6" matches IPv6-Unicast Internet */
|
|
 |
192ec7 |
- if (strcmp(t, "ipv6") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(t, "ipv6") == 0) {
|
|
 |
192ec7 |
debugs(28, 9, "aclIpParseIpData: magic 'ipv6' found.");
|
|
 |
192ec7 |
r = q; // save head of the list for result.
|
|
 |
192ec7 |
|
|
 |
192ec7 |
diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc
|
|
 |
192ec7 |
index cbae4d4..127b591 100644
|
|
 |
192ec7 |
--- a/src/adaptation/ServiceConfig.cc
|
|
 |
192ec7 |
+++ b/src/adaptation/ServiceConfig.cc
|
|
 |
192ec7 |
@@ -55,10 +55,10 @@ Adaptation::ServiceConfig::parseVectPoint(const char *service_configConfig) cons
|
|
 |
192ec7 |
if (q)
|
|
 |
192ec7 |
t = q + 1;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(t, "precache"))
|
|
 |
192ec7 |
+ if (!strcasecmp(t, "precache"))
|
|
 |
192ec7 |
return Adaptation::pointPreCache;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(t, "postcache"))
|
|
 |
192ec7 |
+ if (!strcasecmp(t, "postcache"))
|
|
 |
192ec7 |
return Adaptation::pointPostCache;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
return Adaptation::pointNone;
|
|
 |
192ec7 |
diff --git a/src/auth/Config.cc b/src/auth/Config.cc
|
|
 |
192ec7 |
index d8129c7..a02ccac 100644
|
|
 |
192ec7 |
--- a/src/auth/Config.cc
|
|
 |
192ec7 |
+++ b/src/auth/Config.cc
|
|
 |
192ec7 |
@@ -73,7 +73,7 @@ Auth::Config::registerWithCacheManager(void)
|
|
 |
192ec7 |
void
|
|
 |
192ec7 |
Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (strcmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
if (authenticateProgram)
|
|
 |
192ec7 |
wordlistDestroy(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
@@ -81,7 +81,7 @@ Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
requirePathnameExists("Authentication helper program", authenticateProgram->key);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "realm") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "realm") == 0) {
|
|
 |
192ec7 |
realm.clear();
|
|
 |
192ec7 |
|
|
 |
192ec7 |
char *token = ConfigParser::NextQuotedOrToEol();
|
|
 |
192ec7 |
@@ -97,10 +97,10 @@ Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
realm = token;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "children") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "children") == 0) {
|
|
 |
192ec7 |
authenticateChildren.parseConfig();
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "key_extras") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "key_extras") == 0) {
|
|
 |
192ec7 |
keyExtrasLine = ConfigParser::NextQuotedToken();
|
|
 |
192ec7 |
Format::Format *nlf = new ::Format::Format(scheme->type());
|
|
 |
192ec7 |
if (!nlf->parse(keyExtrasLine.termedBuf())) {
|
|
 |
192ec7 |
diff --git a/src/auth/basic/Config.cc b/src/auth/basic/Config.cc
|
|
 |
192ec7 |
index ae84bed..fb800d3 100644
|
|
 |
192ec7 |
--- a/src/auth/basic/Config.cc
|
|
 |
192ec7 |
+++ b/src/auth/basic/Config.cc
|
|
 |
192ec7 |
@@ -133,11 +133,11 @@ Auth::Basic::Config::Config() :
|
|
 |
192ec7 |
void
|
|
 |
192ec7 |
Auth::Basic::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (strcmp(param_str, "credentialsttl") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(param_str, "credentialsttl") == 0) {
|
|
 |
192ec7 |
parse_time_t(&credentialsTTL);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "casesensitive") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "casesensitive") == 0) {
|
|
 |
192ec7 |
parse_onoff(&casesensitive);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "utf8") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "utf8") == 0) {
|
|
 |
192ec7 |
parse_onoff(&utf8);
|
|
 |
192ec7 |
} else
|
|
 |
192ec7 |
Auth::Config::parse(scheme, n_configured, param_str);
|
|
 |
192ec7 |
diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc
|
|
 |
192ec7 |
index 2d24969..a91225b 100644
|
|
 |
192ec7 |
--- a/src/auth/digest/Config.cc
|
|
 |
192ec7 |
+++ b/src/auth/digest/Config.cc
|
|
 |
192ec7 |
@@ -602,26 +602,26 @@ Auth::Digest::Config::Config() :
|
|
 |
192ec7 |
void
|
|
 |
192ec7 |
Auth::Digest::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (strcmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
if (authenticateProgram)
|
|
 |
192ec7 |
wordlistDestroy(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
parse_wordlist(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
requirePathnameExists("auth_param digest program", authenticateProgram->key);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "nonce_garbage_interval") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "nonce_garbage_interval") == 0) {
|
|
 |
192ec7 |
parse_time_t(&nonceGCInterval);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "nonce_max_duration") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "nonce_max_duration") == 0) {
|
|
 |
192ec7 |
parse_time_t(&noncemaxduration);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "nonce_max_count") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "nonce_max_count") == 0) {
|
|
 |
192ec7 |
parse_int((int *) &noncemaxuses);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "nonce_strictness") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "nonce_strictness") == 0) {
|
|
 |
192ec7 |
parse_onoff(&NonceStrictness);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "check_nonce_count") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "check_nonce_count") == 0) {
|
|
 |
192ec7 |
parse_onoff(&CheckNonceCount);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "post_workaround") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "post_workaround") == 0) {
|
|
 |
192ec7 |
parse_onoff(&PostWorkaround);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "utf8") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "utf8") == 0) {
|
|
 |
192ec7 |
parse_onoff(&utf8);
|
|
 |
192ec7 |
} else
|
|
 |
192ec7 |
Auth::Config::parse(scheme, n_configured, param_str);
|
|
 |
192ec7 |
diff --git a/src/auth/negotiate/Config.cc b/src/auth/negotiate/Config.cc
|
|
 |
192ec7 |
index 0f5b462..e46b98f 100644
|
|
 |
192ec7 |
--- a/src/auth/negotiate/Config.cc
|
|
 |
192ec7 |
+++ b/src/auth/negotiate/Config.cc
|
|
 |
192ec7 |
@@ -97,14 +97,14 @@ Auth::Negotiate::Config::Config() : keep_alive(1)
|
|
 |
192ec7 |
void
|
|
 |
192ec7 |
Auth::Negotiate::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (strcmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
if (authenticateProgram)
|
|
 |
192ec7 |
wordlistDestroy(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
parse_wordlist(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
requirePathnameExists("auth_param negotiate program", authenticateProgram->key);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "keep_alive") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "keep_alive") == 0) {
|
|
 |
192ec7 |
parse_onoff(&keep_alive);
|
|
 |
192ec7 |
} else
|
|
 |
192ec7 |
Auth::Config::parse(scheme, n_configured, param_str);
|
|
 |
192ec7 |
diff --git a/src/auth/ntlm/Config.cc b/src/auth/ntlm/Config.cc
|
|
 |
192ec7 |
index 135e927..27d7904 100644
|
|
 |
192ec7 |
--- a/src/auth/ntlm/Config.cc
|
|
 |
192ec7 |
+++ b/src/auth/ntlm/Config.cc
|
|
 |
192ec7 |
@@ -89,14 +89,14 @@ Auth::Ntlm::Config::Config() : keep_alive(1)
|
|
 |
192ec7 |
void
|
|
 |
192ec7 |
Auth::Ntlm::Config::parse(Auth::Config * scheme, int n_configured, char *param_str)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (strcmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
+ if (strcasecmp(param_str, "program") == 0) {
|
|
 |
192ec7 |
if (authenticateProgram)
|
|
 |
192ec7 |
wordlistDestroy(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
parse_wordlist(&authenticateProgram);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
requirePathnameExists("auth_param ntlm program", authenticateProgram->key);
|
|
 |
192ec7 |
- } else if (strcmp(param_str, "keep_alive") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(param_str, "keep_alive") == 0) {
|
|
 |
192ec7 |
parse_onoff(&keep_alive);
|
|
 |
192ec7 |
} else
|
|
 |
192ec7 |
Auth::Config::parse(scheme, n_configured, param_str);
|
|
 |
192ec7 |
diff --git a/src/cache_cf.cc b/src/cache_cf.cc
|
|
 |
192ec7 |
index fedabc0..8886b68 100644
|
|
 |
192ec7 |
--- a/src/cache_cf.cc
|
|
 |
192ec7 |
+++ b/src/cache_cf.cc
|
|
 |
192ec7 |
@@ -2097,27 +2097,27 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
p->connection_auth = 2; /* auto */
|
|
 |
192ec7 |
|
|
 |
192ec7 |
while ((token = ConfigParser::NextToken())) {
|
|
 |
192ec7 |
- if (!strcmp(token, "proxy-only")) {
|
|
 |
192ec7 |
+ if (!strcasecmp(token, "proxy-only")) {
|
|
 |
192ec7 |
p->options.proxy_only = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "no-query")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "no-query")) {
|
|
 |
192ec7 |
p->options.no_query = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "background-ping")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "background-ping")) {
|
|
 |
192ec7 |
p->options.background_ping = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "no-digest")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "no-digest")) {
|
|
 |
192ec7 |
p->options.no_digest = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "no-tproxy")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "no-tproxy")) {
|
|
 |
192ec7 |
p->options.no_tproxy = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "multicast-responder")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "multicast-responder")) {
|
|
 |
192ec7 |
p->options.mcast_responder = true;
|
|
 |
192ec7 |
#if PEER_MULTICAST_SIBLINGS
|
|
 |
192ec7 |
- } else if (!strcmp(token, "multicast-siblings")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "multicast-siblings")) {
|
|
 |
192ec7 |
p->options.mcast_siblings = true;
|
|
 |
192ec7 |
#endif
|
|
 |
192ec7 |
- } else if (!strncmp(token, "weight=", 7)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "weight=", 7)) {
|
|
 |
192ec7 |
p->weight = xatoi(token + 7);
|
|
 |
192ec7 |
- } else if (!strncmp(token, "basetime=", 9)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "basetime=", 9)) {
|
|
 |
192ec7 |
p->basetime = xatoi(token + 9);
|
|
 |
192ec7 |
- } else if (!strcmp(token, "closest-only")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "closest-only")) {
|
|
 |
192ec7 |
p->options.closest_only = true;
|
|
 |
192ec7 |
} else if (!strncmp(token, "ttl=", 4)) {
|
|
 |
192ec7 |
p->mcast.ttl = xatoi(token + 4);
|
|
 |
192ec7 |
@@ -2127,16 +2127,16 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
if (p->mcast.ttl > 128)
|
|
 |
192ec7 |
p->mcast.ttl = 128;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "default")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "default")) {
|
|
 |
192ec7 |
p->options.default_parent = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "round-robin")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "round-robin")) {
|
|
 |
192ec7 |
p->options.roundrobin = true;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "weighted-round-robin")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "weighted-round-robin")) {
|
|
 |
192ec7 |
p->options.weighted_roundrobin = true;
|
|
 |
192ec7 |
#if USE_HTCP
|
|
 |
192ec7 |
- } else if (!strcmp(token, "htcp")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "htcp")) {
|
|
 |
192ec7 |
p->options.htcp = true;
|
|
 |
192ec7 |
- } else if (!strncmp(token, "htcp=", 5) || !strncmp(token, "htcp-", 5)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "htcp=", 5) || !strncmp(token, "htcp-", 5)) {
|
|
 |
192ec7 |
/* Note: The htcp- form is deprecated, replaced by htcp= */
|
|
 |
192ec7 |
p->options.htcp = true;
|
|
 |
192ec7 |
char *tmp = xstrdup(token+5);
|
|
 |
192ec7 |
@@ -2147,19 +2147,19 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
*nextmode = '\0';
|
|
 |
192ec7 |
++nextmode;
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
- if (!strcmp(mode, "no-clr")) {
|
|
 |
192ec7 |
+ if (!strcasecmp(mode, "no-clr")) {
|
|
 |
192ec7 |
if (p->options.htcp_only_clr)
|
|
 |
192ec7 |
fatalf("parse_peer: can't set htcp-no-clr and htcp-only-clr simultaneously");
|
|
 |
192ec7 |
p->options.htcp_no_clr = true;
|
|
 |
192ec7 |
- } else if (!strcmp(mode, "no-purge-clr")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(mode, "no-purge-clr")) {
|
|
 |
192ec7 |
p->options.htcp_no_purge_clr = true;
|
|
 |
192ec7 |
- } else if (!strcmp(mode, "only-clr")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(mode, "only-clr")) {
|
|
 |
192ec7 |
if (p->options.htcp_no_clr)
|
|
 |
192ec7 |
fatalf("parse_peer: can't set htcp no-clr and only-clr simultaneously");
|
|
 |
192ec7 |
p->options.htcp_only_clr = true;
|
|
 |
192ec7 |
- } else if (!strcmp(mode, "forward-clr")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(mode, "forward-clr")) {
|
|
 |
192ec7 |
p->options.htcp_forward_clr = true;
|
|
 |
192ec7 |
- } else if (!strcmp(mode, "oldsquid")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(mode, "oldsquid")) {
|
|
 |
192ec7 |
p->options.htcp_oldsquid = true;
|
|
 |
192ec7 |
} else {
|
|
 |
192ec7 |
fatalf("invalid HTCP mode '%s'", mode);
|
|
 |
192ec7 |
@@ -2167,15 +2167,15 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
safe_free(tmp);
|
|
 |
192ec7 |
#endif
|
|
 |
192ec7 |
- } else if (!strcmp(token, "no-netdb-exchange")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "no-netdb-exchange")) {
|
|
 |
192ec7 |
p->options.no_netdb_exchange = true;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (!strcmp(token, "carp")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "carp")) {
|
|
 |
192ec7 |
if (p->type != PEER_PARENT)
|
|
 |
192ec7 |
fatalf("parse_peer: non-parent carp peer %s/%d\n", p->host, p->http_port);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
p->options.carp = true;
|
|
 |
192ec7 |
- } else if (!strncmp(token, "carp-key=", 9)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "carp-key=", 9)) {
|
|
 |
192ec7 |
if (p->options.carp != true)
|
|
 |
192ec7 |
fatalf("parse_peer: carp-key specified on non-carp peer %s/%d\n", p->host, p->http_port);
|
|
 |
192ec7 |
p->options.carp_key.set = true;
|
|
 |
192ec7 |
@@ -2183,21 +2183,21 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
for (; key; key = nextkey) {
|
|
 |
192ec7 |
nextkey=strchr(key,',');
|
|
 |
192ec7 |
if (nextkey) ++nextkey; // skip the comma, any
|
|
 |
192ec7 |
- if (0==strncmp(key,"scheme",6)) {
|
|
 |
192ec7 |
+ if (0==strncasecmp(key,"scheme",6)) {
|
|
 |
192ec7 |
p->options.carp_key.scheme = true;
|
|
 |
192ec7 |
- } else if (0==strncmp(key,"host",4)) {
|
|
 |
192ec7 |
+ } else if (0==strncasecmp(key,"host",4)) {
|
|
 |
192ec7 |
p->options.carp_key.host = true;
|
|
 |
192ec7 |
- } else if (0==strncmp(key,"port",4)) {
|
|
 |
192ec7 |
+ } else if (0==strncasecmp(key,"port",4)) {
|
|
 |
192ec7 |
p->options.carp_key.port = true;
|
|
 |
192ec7 |
- } else if (0==strncmp(key,"path",4)) {
|
|
 |
192ec7 |
+ } else if (0==strncasecmp(key,"path",4)) {
|
|
 |
192ec7 |
p->options.carp_key.path = true;
|
|
 |
192ec7 |
- } else if (0==strncmp(key,"params",6)) {
|
|
 |
192ec7 |
+ } else if (0==strncasecmp(key,"params",6)) {
|
|
 |
192ec7 |
p->options.carp_key.params = true;
|
|
 |
192ec7 |
} else {
|
|
 |
192ec7 |
fatalf("invalid carp-key '%s'",key);
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
- } else if (!strcmp(token, "userhash")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "userhash")) {
|
|
 |
192ec7 |
#if USE_AUTH
|
|
 |
192ec7 |
if (p->type != PEER_PARENT)
|
|
 |
192ec7 |
fatalf("parse_peer: non-parent userhash peer %s/%d\n", p->host, p->http_port);
|
|
 |
192ec7 |
@@ -2206,44 +2206,44 @@ parse_peer(CachePeer ** head)
|
|
 |
192ec7 |
#else
|
|
 |
192ec7 |
fatalf("parse_peer: userhash requires authentication. peer %s/%d\n", p->host, p->http_port);
|
|
 |
192ec7 |
#endif
|
|
 |
192ec7 |
- } else if (!strcmp(token, "sourcehash")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "sourcehash")) {
|
|
 |
192ec7 |
if (p->type != PEER_PARENT)
|
|
 |
192ec7 |
fatalf("parse_peer: non-parent sourcehash peer %s/%d\n", p->host, p->http_port);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
p->options.sourcehash = true;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (!strcmp(token, "no-delay")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "no-delay")) {
|
|
 |
192ec7 |
#if USE_DELAY_POOLS
|
|
 |
192ec7 |
p->options.no_delay = true;
|
|
 |
192ec7 |
#else
|
|
 |
192ec7 |
debugs(0, DBG_CRITICAL, "WARNING: cache_peer option 'no-delay' requires --enable-delay-pools");
|
|
 |
192ec7 |
#endif
|
|
 |
192ec7 |
- } else if (!strncmp(token, "login=", 6)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "login=", 6)) {
|
|
 |
192ec7 |
p->login = xstrdup(token + 6);
|
|
 |
192ec7 |
rfc1738_unescape(p->login);
|
|
 |
192ec7 |
- } else if (!strncmp(token, "connect-timeout=", 16)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "connect-timeout=", 16)) {
|
|
 |
192ec7 |
p->connect_timeout = xatoi(token + 16);
|
|
 |
192ec7 |
- } else if (!strncmp(token, "connect-fail-limit=", 19)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "connect-fail-limit=", 19)) {
|
|
 |
192ec7 |
p->connect_fail_limit = xatoi(token + 19);
|
|
 |
192ec7 |
#if USE_CACHE_DIGESTS
|
|
 |
192ec7 |
- } else if (!strncmp(token, "digest-url=", 11)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "digest-url=", 11)) {
|
|
 |
192ec7 |
p->digest_url = xstrdup(token + 11);
|
|
 |
192ec7 |
#endif
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- } else if (!strcmp(token, "allow-miss")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "allow-miss")) {
|
|
 |
192ec7 |
p->options.allow_miss = true;
|
|
 |
192ec7 |
- } else if (!strncmp(token, "max-conn=", 9)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "max-conn=", 9)) {
|
|
 |
192ec7 |
p->max_conn = xatoi(token + 9);
|
|
 |
192ec7 |
- } else if (!strncmp(token, "standby=", 8)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "standby=", 8)) {
|
|
 |
192ec7 |
p->standby.limit = xatoi(token + 8);
|
|
 |
192ec7 |
- } else if (!strcmp(token, "originserver")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "originserver")) {
|
|
 |
192ec7 |
p->options.originserver = true;
|
|
 |
192ec7 |
- } else if (!strncmp(token, "name=", 5)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "name=", 5)) {
|
|
 |
192ec7 |
safe_free(p->name);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
if (token[5])
|
|
 |
192ec7 |
p->name = xstrdup(token + 5);
|
|
 |
192ec7 |
- } else if (!strncmp(token, "forceddomain=", 13)) {
|
|
 |
192ec7 |
+ } else if (!strncasecmp(token, "forceddomain=", 13)) {
|
|
 |
192ec7 |
safe_free(p->domain);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
if (token[13])
|
|
 |
192ec7 |
@@ -2601,14 +2601,14 @@ parse_onoff(int *var)
|
|
 |
192ec7 |
if (token == NULL)
|
|
 |
192ec7 |
self_destruct();
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(token, "on")) {
|
|
 |
192ec7 |
+ if (!strcasecmp(token, "on")) {
|
|
 |
192ec7 |
*var = 1;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "enable")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "enable")) {
|
|
 |
192ec7 |
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use 'on'.");
|
|
 |
192ec7 |
*var = 1;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "off")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "off")) {
|
|
 |
192ec7 |
*var = 0;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "disable")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "disable")) {
|
|
 |
192ec7 |
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use 'off'.");
|
|
 |
192ec7 |
*var = 0;
|
|
 |
192ec7 |
} else {
|
|
 |
192ec7 |
@@ -2642,16 +2642,16 @@ parse_tristate(int *var)
|
|
 |
192ec7 |
if (token == NULL)
|
|
 |
192ec7 |
self_destruct();
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(token, "on")) {
|
|
 |
192ec7 |
+ if (!strcasecmp(token, "on")) {
|
|
 |
192ec7 |
*var = 1;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "enable")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "enable")) {
|
|
 |
192ec7 |
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use value 'on'.");
|
|
 |
192ec7 |
*var = 1;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "warn")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "warn")) {
|
|
 |
192ec7 |
*var = -1;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "off")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "off")) {
|
|
 |
192ec7 |
*var = 0;
|
|
 |
192ec7 |
- } else if (!strcmp(token, "disable")) {
|
|
 |
192ec7 |
+ } else if (!strcasecmp(token, "disable")) {
|
|
 |
192ec7 |
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use value 'off'.");
|
|
 |
192ec7 |
*var = 0;
|
|
 |
192ec7 |
} else {
|
|
 |
192ec7 |
@@ -3249,15 +3249,15 @@ parse_uri_whitespace(int *var)
|
|
 |
192ec7 |
if (token == NULL)
|
|
 |
192ec7 |
self_destruct();
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(token, "strip"))
|
|
 |
192ec7 |
+ if (!strcasecmp(token, "strip"))
|
|
 |
192ec7 |
*var = URI_WHITESPACE_STRIP;
|
|
 |
192ec7 |
- else if (!strcmp(token, "deny"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token, "deny"))
|
|
 |
192ec7 |
*var = URI_WHITESPACE_DENY;
|
|
 |
192ec7 |
- else if (!strcmp(token, "allow"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token, "allow"))
|
|
 |
192ec7 |
*var = URI_WHITESPACE_ALLOW;
|
|
 |
192ec7 |
- else if (!strcmp(token, "encode"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token, "encode"))
|
|
 |
192ec7 |
*var = URI_WHITESPACE_ENCODE;
|
|
 |
192ec7 |
- else if (!strcmp(token, "chop"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token, "chop"))
|
|
 |
192ec7 |
*var = URI_WHITESPACE_CHOP;
|
|
 |
192ec7 |
else {
|
|
 |
192ec7 |
debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'uri_whitespace' accepts 'strip', 'deny', 'allow', 'encode', and 'chop'.");
|
|
 |
192ec7 |
@@ -3399,19 +3399,19 @@ dump_memcachemode(StoreEntry * entry, const char *name, SquidConfig &config)
|
|
 |
192ec7 |
peer_t
|
|
 |
192ec7 |
parseNeighborType(const char *s)
|
|
 |
192ec7 |
{
|
|
 |
192ec7 |
- if (!strcmp(s, "parent"))
|
|
 |
192ec7 |
+ if (!strcasecmp(s, "parent"))
|
|
 |
192ec7 |
return PEER_PARENT;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(s, "neighbor"))
|
|
 |
192ec7 |
+ if (!strcasecmp(s, "neighbor"))
|
|
 |
192ec7 |
return PEER_SIBLING;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(s, "neighbour"))
|
|
 |
192ec7 |
+ if (!strcasecmp(s, "neighbour"))
|
|
 |
192ec7 |
return PEER_SIBLING;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(s, "sibling"))
|
|
 |
192ec7 |
+ if (!strcasecmp(s, "sibling"))
|
|
 |
192ec7 |
return PEER_SIBLING;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (!strcmp(s, "multicast"))
|
|
 |
192ec7 |
+ if (!strcasecmp(s, "multicast"))
|
|
 |
192ec7 |
return PEER_MULTICAST;
|
|
 |
192ec7 |
|
|
 |
192ec7 |
debugs(15, DBG_CRITICAL, "WARNING: Unknown neighbor type: " << s);
|
|
 |
192ec7 |
@@ -3689,11 +3689,11 @@ parse_port_option(AnyP::PortCfgPointer &s, char *token)
|
|
 |
192ec7 |
} else if (strcmp(token, "connection-auth=on") == 0) {
|
|
 |
192ec7 |
s->connection_auth_disabled = false;
|
|
 |
192ec7 |
} else if (strncmp(token, "disable-pmtu-discovery=", 23) == 0) {
|
|
 |
192ec7 |
- if (!strcmp(token + 23, "off"))
|
|
 |
192ec7 |
+ if (!strcasecmp(token + 23, "off"))
|
|
 |
192ec7 |
s->disable_pmtu_discovery = DISABLE_PMTU_OFF;
|
|
 |
192ec7 |
- else if (!strcmp(token + 23, "transparent"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token + 23, "transparent"))
|
|
 |
192ec7 |
s->disable_pmtu_discovery = DISABLE_PMTU_TRANSPARENT;
|
|
 |
192ec7 |
- else if (!strcmp(token + 23, "always"))
|
|
 |
192ec7 |
+ else if (!strcasecmp(token + 23, "always"))
|
|
 |
192ec7 |
s->disable_pmtu_discovery = DISABLE_PMTU_ALWAYS;
|
|
 |
192ec7 |
else
|
|
 |
192ec7 |
self_destruct();
|
|
 |
192ec7 |
@@ -3719,7 +3719,7 @@ parse_port_option(AnyP::PortCfgPointer &s, char *token)
|
|
 |
192ec7 |
s->tcp_keepalive.timeout = xatoui(t);
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
#if USE_OPENSSL
|
|
 |
192ec7 |
- } else if (strcmp(token, "sslBump") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(token, "sslBump") == 0) {
|
|
 |
192ec7 |
debugs(3, DBG_CRITICAL, "WARNING: '" << token << "' is deprecated " <<
|
|
 |
192ec7 |
"in " << cfg_directive << ". Use 'ssl-bump' instead.");
|
|
 |
192ec7 |
s->flags.tunnelSslBumping = true;
|
|
 |
192ec7 |
diff --git a/src/dns_internal.cc b/src/dns_internal.cc
|
|
 |
192ec7 |
index 699301e..ef0644d 100644
|
|
 |
192ec7 |
--- a/src/dns_internal.cc
|
|
 |
192ec7 |
+++ b/src/dns_internal.cc
|
|
 |
192ec7 |
@@ -396,7 +396,7 @@ idnsParseResolvConf(void)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
if (NULL == t) {
|
|
 |
192ec7 |
continue;
|
|
 |
192ec7 |
- } else if (strcmp(t, "nameserver") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(t, "nameserver") == 0) {
|
|
 |
192ec7 |
t = strtok(NULL, w_space);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
if (NULL == t)
|
|
 |
192ec7 |
@@ -406,7 +406,7 @@ idnsParseResolvConf(void)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
idnsAddNameserver(t);
|
|
 |
192ec7 |
result = true;
|
|
 |
192ec7 |
- } else if (strcmp(t, "domain") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(t, "domain") == 0) {
|
|
 |
192ec7 |
idnsFreeSearchpath();
|
|
 |
192ec7 |
t = strtok(NULL, w_space);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
@@ -416,7 +416,7 @@ idnsParseResolvConf(void)
|
|
 |
192ec7 |
debugs(78, DBG_IMPORTANT, "Adding domain " << t << " from " << _PATH_RESCONF);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
idnsAddPathComponent(t);
|
|
 |
192ec7 |
- } else if (strcmp(t, "search") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(t, "search") == 0) {
|
|
 |
192ec7 |
idnsFreeSearchpath();
|
|
 |
192ec7 |
while (NULL != t) {
|
|
 |
192ec7 |
t = strtok(NULL, w_space);
|
|
 |
192ec7 |
@@ -428,7 +428,7 @@ idnsParseResolvConf(void)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
idnsAddPathComponent(t);
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
- } else if (strcmp(t, "options") == 0) {
|
|
 |
192ec7 |
+ } else if (strcasecmp(t, "options") == 0) {
|
|
 |
192ec7 |
while (NULL != t) {
|
|
 |
192ec7 |
t = strtok(NULL, w_space);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc
|
|
 |
192ec7 |
index 8c7729e..1ec4e15 100644
|
|
 |
192ec7 |
--- a/tools/cachemgr.cc
|
|
 |
192ec7 |
+++ b/tools/cachemgr.cc
|
|
 |
192ec7 |
@@ -1018,23 +1018,23 @@ read_request(void)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
rfc1738_unescape(q);
|
|
 |
192ec7 |
|
|
 |
192ec7 |
- if (0 == strcmp(t, "server") && strlen(q))
|
|
 |
192ec7 |
+ if (0 == strcasecmp(t, "server") && strlen(q))
|
|
 |
192ec7 |
req->server = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "host") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "host") && strlen(q))
|
|
 |
192ec7 |
req->hostname = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "port") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "port") && strlen(q))
|
|
 |
192ec7 |
req->port = atoi(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "user_name") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "user_name") && strlen(q))
|
|
 |
192ec7 |
req->user_name = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "passwd") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "passwd") && strlen(q))
|
|
 |
192ec7 |
req->passwd = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "auth") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "auth") && strlen(q))
|
|
 |
192ec7 |
req->pub_auth = xstrdup(q), decode_pub_auth(req);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "operation"))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "operation"))
|
|
 |
192ec7 |
req->action = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "workers") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "workers") && strlen(q))
|
|
 |
192ec7 |
req->workers = xstrdup(q);
|
|
 |
192ec7 |
- else if (0 == strcmp(t, "processes") && strlen(q))
|
|
 |
192ec7 |
+ else if (0 == strcasecmp(t, "processes") && strlen(q))
|
|
 |
192ec7 |
req->processes = xstrdup(q);
|
|
 |
192ec7 |
}
|
|
 |
192ec7 |
safe_free(t);
|
|
 |
192ec7 |
@@ -1254,7 +1254,7 @@ check_target_acl(const char *hostname, int port)
|
|
 |
192ec7 |
if (strcmp(token, "*") == 0)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
; /* Wildcard port specification */
|
|
 |
192ec7 |
- else if (strcmp(token, "any") == 0)
|
|
 |
192ec7 |
+ else if (strcasecmp(token, "any") == 0)
|
|
 |
192ec7 |
|
|
 |
192ec7 |
; /* Wildcard port specification */
|
|
 |
192ec7 |
else if (sscanf(token, "%d", &i) != 1)
|