diff --git a/VERSION b/VERSION index 963ed7c..c114700 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.10 +1.2.11 diff --git a/flight/net/Request.php b/flight/net/Request.php index e9dac8e..97f2608 100644 --- a/flight/net/Request.php +++ b/flight/net/Request.php @@ -218,14 +218,16 @@ class Request { * @return string */ public static function getMethod() { + $method = self::getVar('REQUEST_METHOD', 'GET'); + if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { - return $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']; + $method = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']; } elseif (isset($_REQUEST['_method'])) { - return $_REQUEST['_method']; + $method = $_REQUEST['_method']; } - return self::getVar('REQUEST_METHOD', 'GET'); + return strtoupper($method); } /**