fixed hostheader import: subdomain pointer gets assigned to parent instead of
subdomain
This commit is contained in:
parent
1d3c5a8a29
commit
dbab36dbd9
1 changed files with 7 additions and 5 deletions
|
@ -3760,19 +3760,21 @@ Please ensure the space has been allocated {0} IP address as a dedicated one and
|
||||||
private static int FindDomainForHeader(string header, List<DomainInfo> domains)
|
private static int FindDomainForHeader(string header, List<DomainInfo> domains)
|
||||||
{
|
{
|
||||||
int domainId = 0;
|
int domainId = 0;
|
||||||
|
int counter = 0;
|
||||||
while (header.IndexOf(".") != -1)
|
while ((header.IndexOf(".") != -1) & (counter < 2))
|
||||||
{
|
{
|
||||||
header = header.Substring(header.IndexOf(".") + 1);
|
|
||||||
|
|
||||||
foreach (DomainInfo d in domains)
|
foreach (DomainInfo d in domains)
|
||||||
{
|
{
|
||||||
if ((header == d.DomainName.ToLower()) && (!d.IsDomainPointer))
|
if ((header == d.DomainName.ToLower()) && (!d.IsDomainPointer))
|
||||||
{
|
{
|
||||||
domainId = d.DomainId;
|
return d.DomainId;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header = header.Substring(header.IndexOf(".") + 1);
|
||||||
|
counter++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return domainId;
|
return domainId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue