From 64d57b397ac38080ef7148811b71b6931b7e0ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20W=C3=B6ster?= Date: Tue, 10 Sep 2013 14:33:50 +0200 Subject: [PATCH] add checks for HEAD request --- framework/yii/web/Request.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/yii/web/Request.php b/framework/yii/web/Request.php index 2b9da0a..1482633 100644 --- a/framework/yii/web/Request.php +++ b/framework/yii/web/Request.php @@ -155,6 +155,15 @@ class Request extends \yii\base\Request } /** + * Returns whether this is a HEAD request. + * @return boolean whether this is a HEAD request. + */ + public function getIsHead() + { + return $this->getMethod() === 'HEAD'; + } + + /** * Returns whether this is a POST request. * @return boolean whether this is a POST request. */