aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-10-24 13:57:24 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-10-24 13:57:24 +0200
commita7833b48a3ed179b12bfab4e25a0ed36d9d6735b (patch)
tree6e9c6af327b365173f455bbe6eeb4a033e5bccd2
parentaf5bf75de2ff0a26d97e10a22b31684fe84c59d0 (diff)
downloadRouter-a7833b48a3ed179b12bfab4e25a0ed36d9d6735b.zip
Router-a7833b48a3ed179b12bfab4e25a0ed36d9d6735b.tar.gz
Router-a7833b48a3ed179b12bfab4e25a0ed36d9d6735b.tar.bz2
Update PR.
-rw-r--r--Http.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/Http.php b/Http.php
index cb6492f..4796764 100644
--- a/Http.php
+++ b/Http.php
@@ -75,18 +75,18 @@ namespace Hoa\Router {
class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
/**
- * Connection unsecure
+ * Secure connection.
*
- * @const boolean
+ * @const bool
*/
- const UNSECURE = false;
+ const SECURE = true;
/**
- * Connection secure
+ * Unsecure connection.
*
- * @const boolean
+ * @const bool
*/
- const SECURE = true;
+ const UNSECURE = false;
/**
* Parameters.
@@ -940,9 +940,11 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
public static function isSecure ( ) {
if(!isset($_SERVER['HTTPS']))
- return false;
+ return static::UNSECURE;
- return !empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS'];
+ return (!empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS'])
+ ? static::SECURE
+ : static::UNSECURE;
}
}