Fix bug on https test

According to [php.net](http://www.php.net/manual/en/reserved.variables.server.php). The request is HTTPS if `$_SERVER['HTTPS']` is not empty and different to `'off'`