fixed isHttps test for relative protocols.  indexOf('//:') should have been indexOf('//') - a simple regex is more accurate here.