improved scheme detection and changed default scheme to httpl