fix handling of HEAD http requests.

This commit is contained in:
Taylor Otwell
2012-02-23 08:43:55 -06:00
parent e70261e962
commit f624a6849f
2 changed files with 12 additions and 1 deletions

View File

@@ -33,6 +33,11 @@ class Request {
*/
public static function method()
{
if ($_SERVER['REQUEST_METHOD'] == 'HEAD')
{
return 'GET';
}
return (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD'];
}