Commit 0b7dbab0 authored by Taylor Otwell's avatar Taylor Otwell

adjusted method order in request class.

parent b7b258a1
...@@ -110,23 +110,23 @@ class Request { ...@@ -110,23 +110,23 @@ class Request {
} }
/** /**
* Determine if the request is using HTTPS. * Get the HTTP protocol for the request.
* *
* @return bool * @return string
*/ */
public static function is_secure() public static function protocol()
{ {
return (static::protocol() == 'https'); return (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
} }
/** /**
* Get the HTTP protocol for the request. * Determine if the request is using HTTPS.
* *
* @return string * @return bool
*/ */
public static function protocol() public static function is_secure()
{ {
return (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; return (static::protocol() == 'https');
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment