return NULL;
}
-
-static apr_status_t valid_hostname(const char* name)
-{
- if (ap_strchr_c(name, '*') || ap_strchr_c(name, '?') ||
- ap_strchr_c(name, '[') || ap_strchr_c(name, ']')) {
- return APR_EINVAL;
- }
- return APR_SUCCESS;
-}
/*
* The ServerName directive takes one argument with format
* [scheme://]fully-qualified-domain-name[:port], for instance
return err;
}
- if (valid_hostname(arg) != APR_SUCCESS)
+ if (apr_fnmatch_test(arg))
return apr_pstrcat(cmd->temp_pool, "Invalid ServerName \"", arg,
"\" use ServerAlias to set multiple server names.", NULL);