Hi there,
I think I might have spotted a bug in EnvironmentControl.cfc in
coldbox3 RC1 (CodeName: 318 - Genesis 14:14).
From reading the documentation (http://wiki.coldbox.org/wiki/
Interceptors:EnvironmentControl.cfm) I was expecting the logic to work
like so:
urls is a list - if we find any of the url items in the http_host then
use the corresponding environement.
If that is so then I think the detectEnvironment function should be
changed
From:
if(structKeyExists(XMLAttributes,'urls')){
urls = trim(XMLAttributes.urls);
if (len(urls) and listFindNoCase(urls,cgi.http_host)){
environmentIndex = i;
break;
}
}
To:
if(structKeyExists(XMLAttributes,'urls')){
urls = trim(XMLAttributes.urls);
if (listLen(urls)){
for(j=1; j lte listLen(urls); j=j+1){
if (listFindNoCase(cgi.http_host,listgetat(urls, j),".")){
environmentIndex = i;
break;
}
}
}
}
What's the feeling?
Cheers!