Commit f624a684 authored by Taylor Otwell's avatar Taylor Otwell

fix handling of HEAD http requests.

parent e70261e9
...@@ -33,6 +33,11 @@ class Request { ...@@ -33,6 +33,11 @@ class Request {
*/ */
public static function method() public static function method()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'HEAD')
{
return 'GET';
}
return (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD']; return (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD'];
} }
......
...@@ -26,7 +26,13 @@ class Router { ...@@ -26,7 +26,13 @@ class Router {
* *
* @var array * @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. * All of the "fallback" routes that have been registered.
......
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