Redirect loop due to capitalization

I have already fixed this problem on my own site by editing the Domain Mapping source code, but I think it should be fixed properly in the plugin.

My multisite installation is using Nginx and I was periodically getting a redirect loop error on one of my client's sites. Then Nginx would cache the redirect loop, causing it to display for everyone. If I purged the cache then visited the site, the problem was always fixed. But then it always came back again at some point.

After much debugging, I realized the problem was due to someone entering in the site URL in all caps (like EXAMPLE.COM instead of This caused the redirect loop, then Nginx cached the error so it displayed to other people as well.

I fixed this problem by editing the domain-mapping/classes/Domainmap/Module/Mapping.php file.

Line 286: if ( $mapped_url != $current_url )
Edited to: if ( strtolower($mapped_url) != strtolower($current_url) )