getMethod should return uppercase string.

pull/178/head
Mike Cao 10 years ago
parent 0c8b665304
commit a32f2c2087

@ -1 +1 @@
1.2.10 1.2.11

@ -218,14 +218,16 @@ class Request {
* @return string * @return string
*/ */
public static function getMethod() { public static function getMethod() {
$method = self::getVar('REQUEST_METHOD', 'GET');
if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { 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'])) { elseif (isset($_REQUEST['_method'])) {
return $_REQUEST['_method']; $method = $_REQUEST['_method'];
} }
return self::getVar('REQUEST_METHOD', 'GET'); return strtoupper($method);
} }
/** /**

Loading…
Cancel
Save