diff --git a/laravel/request.php b/laravel/request.php index fc6b1b51..21ed5cd9 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -33,6 +33,11 @@ public static function uri() */ public static function method() { + if ($_SERVER['REQUEST_METHOD'] == 'HEAD') + { + return 'GET'; + } + return (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD']; } diff --git a/laravel/routing/router.php b/laravel/routing/router.php index 715e920d..a311923f 100644 --- a/laravel/routing/router.php +++ b/laravel/routing/router.php @@ -26,7 +26,13 @@ class Router { * * @var array */ - public static $routes = array(); + public static $routes = array( + 'GET' => array(), + 'POST' => array(), + 'PUT' => array(), + 'DELETE' => array(), + 'HEAD' => array(), + ); /** * All of the "fallback" routes that have been registered.