ignore upper case in pref

This commit is contained in:
rakslice 2020-11-19 15:43:10 -08:00
parent a1ef6be18a
commit 5163e17f14

View File

@ -72,8 +72,14 @@ int prepare_host_domain_suffixes(char * buf) {
if (buf) buf[pos] = '.'; if (buf) buf[pos] = '.';
pos++; pos++;
} }
if (buf) strcpy(buf + pos, str); if (buf) {
pos += strlen(str); const char * str_pos = str;
while (*str_pos != '\0') {
buf[pos] = tolower(*str_pos);
++pos;
++str_pos;
}
};
// domain to be checked will be FQDN so suffix must have a trailing dot // domain to be checked will be FQDN so suffix must have a trailing dot
if (str[strlen(str) - 1] != '.') { if (str[strlen(str) - 1] != '.') {
if (buf) buf[pos] = '.'; if (buf) buf[pos] = '.';