fix handling of HEAD http requests.
This commit is contained in:
parent
e70261e962
commit
f624a6849f
|
@ -33,6 +33,11 @@ public static function uri()
|
||||||
*/
|
*/
|
||||||
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 {
|
||||||
*
|
*
|
||||||
* @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.
|
||||||
|
|
Loading…
Reference in New Issue