Revert "Revert "Merge pull request #983 from darkowlzz/bug840314""

This reverts commit 2ab29dfb6a58705e56b7dba8a2bf80c1d376ea71.
Bug 840314 - test the uri scheme after the default uri is applied