static const char *set_define(cmd_parms *cmd, void *dummy,
const char *name, const char *value)
{
- if (cmd->parent && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) {
+ if (cmd->parent && ap_casecmpstr(cmd->parent->directive, "<VirtualHost")) {
return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ",
cmd->parent->directive, " context", NULL);
}
{
core_dir_config *d = d_;
- if (!strcasecmp(arg, "Off")) {
+ if (!ap_casecmpstr(arg, "Off")) {
d->add_default_charset = ADD_DEFAULT_CHARSET_OFF;
}
- else if (!strcasecmp(arg, "On")) {
+ else if (!ap_casecmpstr(arg, "On")) {
d->add_default_charset = ADD_DEFAULT_CHARSET_ON;
d->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
}
conf->response_code_exprs = apr_hash_make(cmd->pool);
}
- if (strcasecmp(msg, "default") == 0) {
+ if (ap_casecmpstr(msg, "default") == 0) {
/* special case: ErrorDocument 404 default restores the
* canned server error response
*/
first = 0;
}
- if (!strcasecmp(w, "Indexes")) {
+ if (!ap_casecmpstr(w, "Indexes")) {
opt = OPT_INDEXES;
}
- else if (!strcasecmp(w, "Includes")) {
+ else if (!ap_casecmpstr(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_casecmpstr(w, "IncludesNOEXEC")) {
opt = OPT_INCLUDES;
}
- else if (!strcasecmp(w, "FollowSymLinks")) {
+ else if (!ap_casecmpstr(w, "FollowSymLinks")) {
opt = OPT_SYM_LINKS;
}
- else if (!strcasecmp(w, "SymLinksIfOwnerMatch")) {
+ else if (!ap_casecmpstr(w, "SymLinksIfOwnerMatch")) {
opt = OPT_SYM_OWNER;
}
- else if (!strcasecmp(w, "ExecCGI")) {
+ else if (!ap_casecmpstr(w, "ExecCGI")) {
opt = OPT_EXECCGI;
}
- else if (!strcasecmp(w, "MultiViews")) {
+ else if (!ap_casecmpstr(w, "MultiViews")) {
opt = OPT_MULTI;
}
- else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
+ else if (!ap_casecmpstr(w, "RunScripts")) { /* AI backcompat. Yuck */
opt = OPT_MULTI|OPT_EXECCGI;
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_casecmpstr(w, "None")) {
opt = OPT_NONE;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_casecmpstr(w, "All")) {
opt = OPT_ALL;
}
else {
*v++ = '\0';
}
- if (!strcasecmp(w, "Limit")) {
+ if (!ap_casecmpstr(w, "Limit")) {
d->override |= OR_LIMIT;
}
- else if (!strcasecmp(k, "Options")) {
+ else if (!ap_casecmpstr(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_casecmpstr(w, "FileInfo")) {
d->override |= OR_FILEINFO;
}
- else if (!strcasecmp(w, "AuthConfig")) {
+ else if (!ap_casecmpstr(w, "AuthConfig")) {
d->override |= OR_AUTHCFG;
}
- else if (!strcasecmp(w, "Indexes")) {
+ else if (!ap_casecmpstr(w, "Indexes")) {
d->override |= OR_INDEXES;
}
- else if (!strcasecmp(w, "Nonfatal")) {
- if (!strcasecmp(v, "Override")) {
+ else if (!ap_casecmpstr(w, "Nonfatal")) {
+ if (!ap_casecmpstr(v, "Override")) {
d->override |= NONFATAL_OVERRIDE;
}
- else if (!strcasecmp(v, "Unknown")) {
+ else if (!ap_casecmpstr(v, "Unknown")) {
d->override |= NONFATAL_UNKNOWN;
}
- else if (!strcasecmp(v, "All")) {
+ else if (!ap_casecmpstr(v, "All")) {
d->override |= NONFATAL_ALL;
}
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_casecmpstr(w, "None")) {
d->override = OR_NONE;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_casecmpstr(w, "All")) {
d->override = OR_ALL;
}
else {
d->override_list = apr_table_make(cmd->pool, argc);
for (i = 0; i < argc; i++) {
- if (!strcasecmp(argv[i], "None")) {
+ if (!ap_casecmpstr(argv[i], "None")) {
if (argc != 1) {
return "'None' not allowed with other directives in "
"AllowOverrideList";
return "Either all Options must start with + or -, or no Option may.";
}
- if (!strcasecmp(w, "Indexes")) {
+ if (!ap_casecmpstr(w, "Indexes")) {
opt = OPT_INDEXES;
}
- else if (!strcasecmp(w, "Includes")) {
+ else if (!ap_casecmpstr(w, "Includes")) {
opt = (OPT_INCLUDES | OPT_INC_WITH_EXEC);
}
- else if (!strcasecmp(w, "IncludesNOEXEC")) {
+ else if (!ap_casecmpstr(w, "IncludesNOEXEC")) {
opt = OPT_INCLUDES;
}
- else if (!strcasecmp(w, "FollowSymLinks")) {
+ else if (!ap_casecmpstr(w, "FollowSymLinks")) {
opt = OPT_SYM_LINKS;
}
- else if (!strcasecmp(w, "SymLinksIfOwnerMatch")) {
+ else if (!ap_casecmpstr(w, "SymLinksIfOwnerMatch")) {
opt = OPT_SYM_OWNER;
}
- else if (!strcasecmp(w, "ExecCGI")) {
+ else if (!ap_casecmpstr(w, "ExecCGI")) {
opt = OPT_EXECCGI;
}
- else if (!strcasecmp(w, "MultiViews")) {
+ else if (!ap_casecmpstr(w, "MultiViews")) {
opt = OPT_MULTI;
}
- else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
+ else if (!ap_casecmpstr(w, "RunScripts")) { /* AI backcompat. Yuck */
opt = OPT_MULTI|OPT_EXECCGI;
}
- else if (!strcasecmp(w, "None")) {
+ else if (!ap_casecmpstr(w, "None")) {
if (!first) {
return "'Options None' must be the first Option given.";
}
opt = OPT_NONE;
all_none = 1;
}
- else if (!strcasecmp(w, "All")) {
+ else if (!ap_casecmpstr(w, "All")) {
if (!first) {
return "'Options All' must be the first option given.";
}
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_casecmpstr(arg, "off") != 0 && ap_casecmpstr(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);
}
}
- if (strcasecmp(token, "None") == 0) {
+ if (ap_casecmpstr(token, "None") == 0) {
if (action != '*') {
valid = 0;
}
explicit = 1;
}
}
- else if (strcasecmp(token, "All") == 0) {
+ else if (ap_casecmpstr(token, "All") == 0) {
if (action != '*') {
valid = 0;
}
cfg->etag_bits = bit = ETAG_ALL;
}
}
- else if (strcasecmp(token, "Size") == 0) {
+ else if (ap_casecmpstr(token, "Size") == 0) {
bit = ETAG_SIZE;
}
- else if ((strcasecmp(token, "LMTime") == 0)
- || (strcasecmp(token, "MTime") == 0)
- || (strcasecmp(token, "LastModified") == 0)) {
+ else if ((ap_casecmpstr(token, "LMTime") == 0)
+ || (ap_casecmpstr(token, "MTime") == 0)
+ || (ap_casecmpstr(token, "LastModified") == 0)) {
bit = ETAG_MTIME;
}
- else if (strcasecmp(token, "INode") == 0) {
+ else if (ap_casecmpstr(token, "INode") == 0) {
bit = ETAG_INODE;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
d->enable_mmap = ENABLE_MMAP_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
d->enable_mmap = ENABLE_MMAP_OFF;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
d->enable_sendfile = ENABLE_SENDFILE_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
d->enable_sendfile = ENABLE_SENDFILE_OFF;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "On") == 0) {
+ if (ap_casecmpstr(arg, "On") == 0) {
d->server_signature = srv_sig_on;
}
- else if (strcasecmp(arg, "Off") == 0) {
+ else if (ap_casecmpstr(arg, "Off") == 0) {
d->server_signature = srv_sig_off;
}
- else if (strcasecmp(arg, "EMail") == 0) {
+ else if (ap_casecmpstr(arg, "EMail") == 0) {
d->server_signature = srv_sig_withmail;
}
else {
{
core_dir_config *d = d_;
- if (0 == strcasecmp(arg, "on")) {
+ if (0 == ap_casecmpstr(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_casecmpstr(arg, "off")) {
d->allow_encoded_slashes = 0;
d->decode_encoded_slashes = 0;
- } else if (0 == strcasecmp(arg, "nodecode")) {
+ } else if (0 == ap_casecmpstr(arg, "nodecode")) {
d->allow_encoded_slashes = 1;
d->decode_encoded_slashes = 0;
} else {
{
core_dir_config *d = d_;
- if (!strcasecmp(arg, "on")) {
+ if (!ap_casecmpstr(arg, "on")) {
d->hostname_lookups = HOSTNAME_LOOKUP_ON;
}
- else if (!strcasecmp(arg, "off")) {
+ else if (!ap_casecmpstr(arg, "off")) {
d->hostname_lookups = HOSTNAME_LOOKUP_OFF;
}
- else if (!strcasecmp(arg, "double")) {
+ else if (!ap_casecmpstr(arg, "double")) {
d->hostname_lookups = HOSTNAME_LOOKUP_DOUBLE;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
d->accept_path_info = AP_REQ_ACCEPT_PATH_INFO;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
d->accept_path_info = AP_REQ_REJECT_PATH_INFO;
}
- else if (strcasecmp(arg, "default") == 0) {
+ else if (ap_casecmpstr(arg, "default") == 0) {
d->accept_path_info = AP_REQ_DEFAULT_PATH_INFO;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_OFF;
}
- else if (strcasecmp(arg, "dns") == 0) {
+ else if (ap_casecmpstr(arg, "dns") == 0) {
d->use_canonical_name = USE_CANONICAL_NAME_DNS;
}
else {
{
core_dir_config *d = d_;
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_ON;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_OFF;
}
else {
return err;
}
- if (!strcasecmp(arg, "OS")) {
+ if (!ap_casecmpstr(arg, "OS")) {
ap_server_tokens = SrvTk_OS;
}
- else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
+ else if (!ap_casecmpstr(arg, "Min") || !ap_casecmpstr(arg, "Minimal")) {
ap_server_tokens = SrvTk_MINIMAL;
}
- else if (!strcasecmp(arg, "Major")) {
+ else if (!ap_casecmpstr(arg, "Major")) {
ap_server_tokens = SrvTk_MAJOR;
}
- else if (!strcasecmp(arg, "Minor") ) {
+ else if (!ap_casecmpstr(arg, "Minor") ) {
ap_server_tokens = SrvTk_MINOR;
}
- else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
+ else if (!ap_casecmpstr(arg, "Prod") || !ap_casecmpstr(arg, "ProductOnly")) {
ap_server_tokens = SrvTk_PRODUCT_ONLY;
}
- else if (!strcasecmp(arg, "Full")) {
+ else if (!ap_casecmpstr(arg, "Full")) {
ap_server_tokens = SrvTk_FULL;
}
else {
core_dir_config *conf = conf_;
int val = 0;
- if (!strcasecmp(arg, "none")) {
+ if (!ap_casecmpstr(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_casecmpstr(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_casecmpstr(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
core_dir_config *conf = conf_;
int val = 0;
- if (!strcasecmp(arg, "none")) {
+ if (!ap_casecmpstr(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_casecmpstr(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_casecmpstr(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
core_dir_config *conf = conf_;
int val = 0;
- if (!strcasecmp(arg, "none")) {
+ if (!ap_casecmpstr(arg, "none")) {
val = AP_MAXRANGES_NORANGES;
}
- else if (!strcasecmp(arg, "default")) {
+ else if (!ap_casecmpstr(arg, "default")) {
val = AP_MAXRANGES_DEFAULT;
}
- else if (!strcasecmp(arg, "unlimited")) {
+ else if (!ap_casecmpstr(arg, "unlimited")) {
val = AP_MAXRANGES_UNLIMITED;
}
else {
core_server_config *conf =
ap_get_core_module_config(cmd->server->module_config);
- if (strcasecmp(arg1, "on") == 0) {
+ if (ap_casecmpstr(arg1, "on") == 0) {
conf->trace_enable = AP_TRACE_ENABLE;
}
- else if (strcasecmp(arg1, "off") == 0) {
+ else if (ap_casecmpstr(arg1, "off") == 0) {
conf->trace_enable = AP_TRACE_DISABLE;
}
- else if (strcasecmp(arg1, "extended") == 0) {
+ else if (ap_casecmpstr(arg1, "extended") == 0) {
conf->trace_enable = AP_TRACE_EXTENDED;
}
else {
return err;
}
- if (strcasecmp(arg, "on") == 0) {
+ if (ap_casecmpstr(arg, "on") == 0) {
conf->protocols_honor_order = 1;
}
- else if (strcasecmp(arg, "off") == 0) {
+ else if (ap_casecmpstr(arg, "off") == 0) {
conf->protocols_honor_order = 0;
}
else {
return err;
}
- if (strcasecmp(arg, "network") == 0) {
+ if (ap_casecmpstr(arg, "network") == 0) {
conf->async_filter = AP_FTYPE_NETWORK;
}
- else if (strcasecmp(arg, "connection") == 0) {
+ else if (ap_casecmpstr(arg, "connection") == 0) {
conf->async_filter = AP_FTYPE_CONNECTION;
}
- else if (strcasecmp(arg, "request") == 0) {
+ else if (ap_casecmpstr(arg, "request") == 0) {
conf->async_filter = 0;
}
else {
conf->error_log_format = parse_errorlog_string(cmd->pool, arg1,
&err_string, 1);
}
- else if (!strcasecmp(arg1, "connection")) {
+ else if (!ap_casecmpstr(arg1, "connection")) {
if (!conf->error_log_conn) {
conf->error_log_conn = apr_array_make(cmd->pool, 5,
sizeof(apr_array_header_t *));
*e = parse_errorlog_string(cmd->pool, arg2, &err_string, 0);
}
}
- else if (!strcasecmp(arg1, "request")) {
+ else if (!ap_casecmpstr(arg1, "request")) {
if (!conf->error_log_req) {
conf->error_log_req = apr_array_make(cmd->pool, 5,
sizeof(apr_array_header_t *));