Added isHttps

And refined the scheme detection and assignation in the constructor.